/** * Finishes the startup sequence after last runlevel upgrade.<p> */ private void afterUpgradeRunlevel() { try { // read the persistent locks m_instance.m_securityManager.readLocks(); } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error( org.opencms.lock.Messages.get().getBundle().key(org.opencms.lock.Messages.ERR_READ_LOCKS_0), e); } } // everything is initialized, now start publishing m_publishManager.startPublishing(); }
/** * Takes care of the persistence of data normally held in memory.<p> */ protected void persistData() { try { // save the resource locks to db m_securityManager.writeLocks(); // save the log entries to db m_securityManager.updateLog(); } catch (Throwable t) { if (LOG.isErrorEnabled()) { LOG.error( org.opencms.lock.Messages.get().getBundle().key(org.opencms.lock.Messages.ERR_WRITE_LOCKS_0), t); } } }
} catch (Throwable t) { if (LOG.isErrorEnabled()) { LOG.error(org.opencms.lock.Messages.get().getBundle().key( org.opencms.lock.Messages.ERR_WRITE_LOCKS_FINAL_0), t);
if (LOG.isErrorEnabled()) { LOG.error( org.opencms.lock.Messages.get().getBundle().key( org.opencms.lock.Messages.ERR_WRITE_LOCKS_FINAL_0), t);
} catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error(org.opencms.lock.Messages.get().getBundle().key( org.opencms.lock.Messages.ERR_READ_LOCKS_0), e);
} catch (Throwable t) { if (LOG.isErrorEnabled()) { LOG.error(org.opencms.lock.Messages.get().getBundle().key( org.opencms.lock.Messages.ERR_WRITE_LOCKS_0), t);
message = Messages.get().container( Messages.ERR_RESOURCE_LOCKED_FORPUBLISH_1, dbc.getRequestContext().getSitePath(resource)); } else if (currentLock.getEditionLock().isInherited()) { message = Messages.get().container( Messages.ERR_RESOURCE_LOCKED_INHERITED_1, dbc.getRequestContext().getSitePath(resource)); } else { message = Messages.get().container( Messages.ERR_RESOURCE_LOCKED_BYOTHERUSER_1, dbc.getRequestContext().getSitePath(resource));
message = Messages.get().container( Messages.ERR_RESOURCE_LOCKED_FORPUBLISH_1, dbc.getRequestContext().getSitePath(resource)); } else if (currentLock.getEditionLock().isInherited()) { message = Messages.get().container( Messages.ERR_RESOURCE_LOCKED_INHERITED_1, dbc.getRequestContext().getSitePath(resource)); } else { message = Messages.get().container( Messages.ERR_RESOURCE_LOCKED_BYOTHERUSER_1, dbc.getRequestContext().getSitePath(resource));
/** * 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_INVALID_LOCK_TYPE_1, type.toString()));
throw new CmsLockException(Messages.get().container(Messages.ERR_INVALID_LOCK_TYPE_1, type.toString()));
} 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,
me.addException(new CmsLockException(org.opencms.lock.Messages.get().container( org.opencms.lock.Messages.ERR_SIBLING_LOCKED_2, context.getSitePath(currentResource),
me.addException( new CmsLockException( org.opencms.lock.Messages.get().container( org.opencms.lock.Messages.ERR_SIBLING_LOCKED_2, context.getSitePath(currentResource),
org.opencms.jsp.util.Messages.get(), org.opencms.loader.Messages.get(), org.opencms.lock.Messages.get(), org.opencms.mail.Messages.get(), org.opencms.main.Messages.get(),
org.opencms.jsp.util.Messages.get(), org.opencms.loader.Messages.get(), org.opencms.lock.Messages.get(), org.opencms.mail.Messages.get(), org.opencms.main.Messages.get(),