/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsLockException(container, cause); } }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsLockException(container, cause); } }
/** * Checks if the given resource contains a resource that has a system lock.<p> * * @param dbc the current database context * @param resource the resource to check * * @throws CmsException in case there is a system lock contained in the given resource */ protected void checkSystemLocks(CmsDbContext dbc, CmsResource resource) throws CmsException { if (m_lockManager.hasSystemLocks(dbc, resource)) { throw new CmsLockException( Messages.get().container( Messages.ERR_RESOURCE_SYSTEM_LOCKED_1, dbc.removeSiteRoot(resource.getRootPath()))); } }
/** * Checks if the given resource contains a resource that has a system lock.<p> * * @param dbc the current database context * @param resource the resource to check * * @throws CmsException in case there is a system lock contained in the given resource */ protected void checkSystemLocks(CmsDbContext dbc, CmsResource resource) throws CmsException { if (m_lockManager.hasSystemLocks(dbc, resource)) { throw new CmsLockException(Messages.get().container( Messages.ERR_RESOURCE_SYSTEM_LOCKED_1, dbc.removeSiteRoot(resource.getRootPath()))); } }
/** * Enumeration class for the mode parameter in the * {@link CmsDriverManager#readChangedResourcesInsideProject(CmsDbContext, CmsUUID, CmsReadChangedProjectResourceMode)} * method.<p> */ private static class CmsReadChangedProjectResourceMode { /** * Default constructor.<p> */ protected CmsReadChangedProjectResourceMode() { // noop } }
/** * Removes a resource after it has been deleted by the driver manager.<p> * * @param dbc the current database context * @param resourceName the root path of the deleted resource * @throws CmsException if something goes wrong */ public void removeDeletedResource(CmsDbContext dbc, String resourceName) throws CmsException { try { m_driverManager.getVfsDriver().readResource(dbc, dbc.currentProject().getUuid(), resourceName, false); throw new CmsLockException(Messages.get().container( Messages.ERR_REMOVING_UNDELETED_RESOURCE_1, dbc.getRequestContext().removeSiteRoot(resourceName))); } catch (CmsVfsResourceNotFoundException e) { // ok, ignore } unlockResource(resourceName, true); unlockResource(resourceName, false); }
/** * Removes a resource after it has been deleted by the driver manager.<p> * * @param dbc the current database context * @param resourceName the root path of the deleted resource * @throws CmsException if something goes wrong */ public void removeDeletedResource(CmsDbContext dbc, String resourceName) throws CmsException { try { m_driverManager.getVfsDriver(dbc).readResource(dbc, dbc.currentProject().getUuid(), resourceName, false); throw new CmsLockException( Messages.get().container( Messages.ERR_REMOVING_UNDELETED_RESOURCE_1, dbc.getRequestContext().removeSiteRoot(resourceName))); } catch (CmsVfsResourceNotFoundException e) { // ok, ignore } unlockResource(resourceName, true); unlockResource(resourceName, false); }
throw new CmsLockException( Messages.get().container(Messages.ERR_RESOURCE_UNLOCK_1, dbc.removeSiteRoot(resourcename))); throw new CmsLockException( Messages.get().container(Messages.ERR_UNLOCK_LOCK_INHERITED_1, dbc.removeSiteRoot(resourcename)));
throw new CmsLockException(Messages.get().container(Messages.ERR_INVALID_LOCK_TYPE_1, type.toString()));
throw new CmsLockException(Messages.get().container( Messages.ERR_RESOURCE_UNLOCK_1, dbc.removeSiteRoot(resourcename))); throw new CmsLockException(Messages.get().container( Messages.ERR_UNLOCK_LOCK_INHERITED_1, dbc.removeSiteRoot(resourcename)));
throw new CmsLockException(Messages.get().container(Messages.ERR_INVALID_LOCK_TYPE_1, type.toString()));
currentLock.setRelatedLock(lock); } else { throw new CmsLockException( Messages.get().container(Messages.ERR_LOCK_ILLEGAL_STATE_2, currentLock, lock));
currentLock.setRelatedLock(lock); } else { throw new CmsLockException(Messages.get().container( Messages.ERR_LOCK_ILLEGAL_STATE_2, currentLock,
throw new CmsConfigurationException(e1.getMessageContainer(), e1); throw new CmsLockException(msg);
throw new CmsLockException( Messages.get().container( Messages.ERR_PERM_NOTLOCKED_2,
throw new CmsLockException(Messages.get().container( Messages.ERR_PERM_NOTLOCKED_2, context.getSitePath(resource),
dbc.getRequestContext().getSitePath(resource)); throw new CmsLockException(message);
dbc.getRequestContext().getSitePath(resource)); throw new CmsLockException(message);
throw new CmsLockException( Messages.get().container( Messages.ERR_CHANGE_LOCK_UNLOCKED_RESOURCE_1,
throw new CmsLockException(Messages.get().container( Messages.ERR_CHANGE_LOCK_UNLOCKED_RESOURCE_1, dbc.getRequestContext().getSitePath(resource)));