/** * Sets if the subscription functionality is enabled.<p> * * @param enabled the flag indicating if the subscription functionality is enabled */ public void setEnabled(String enabled) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0)); } m_enabled = Boolean.valueOf(enabled).booleanValue(); }
/** * Not implemented. * * @throws CmsIllegalArgumentException always to signal that remove is not implemented * (<b>interface contract defines {@link UnsupportedOperationException}</b>) */ public final void remove() throws CmsIllegalArgumentException { throw new CmsRuntimeException(org.opencms.db.Messages.get().container( org.opencms.db.Messages.ERR_UNSUPPORTED_OPERATION_2, getClass().getName(), "remove()")); } }
/** * Message accessor.<p> * * @param locale the message locale * * @return the message string */ private String messageImportOk(Locale locale) { return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_OK_0); }
/** * Message accessor.<p> * * @param locale the message locale * @param path a path * * @return the message string */ private String messageImportInvalidAliasPath(Locale locale, String path) { return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_INVALID_ALIAS_PATH_0); }
/** * Message accessor.<p> * * @param locale the message locale * * @return the message string */ private String messageImportUpdate(Locale locale) { return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_UPDATED_0); }
/** * Checks if this message is frozen.<p> * * @throws CmsRuntimeException in case the message is already frozen */ protected void checkFrozen() throws CmsRuntimeException { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_FROZEN_0)); } }
/** * Sets the name of the database pool to use.<p> * * @param poolName the name of the database pool to use */ public void setPoolName(String poolName) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0)); } m_poolName = poolName; }
/** * Sets the security manager during initialization.<p> * * @param securityManager the security manager */ public void setSecurityManager(CmsSecurityManager securityManager) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0)); } m_securityManager = securityManager; }
/** * Message accessor.<p> * * @param locale the message locale * @param path a path * * @return the message string */ private String messageImportCantReadResource(Locale locale, String path) { return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_COULD_NOT_READ_RESOURCE_0); }
/** * Sets if the subscription functionality is enabled.<p> * * @param enabled the flag indicating if the subscription functionality is enabled */ public void setEnabled(boolean enabled) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0)); } m_enabled = enabled; }
/** * Message accessor.<p> * * @param locale the message locale * * @return the message string */ private String messageImportInvalidFormat(Locale locale) { return Messages.get().getBundle(locale).key(Messages.ERR_ALIAS_IMPORT_BAD_FORMAT_0); }
/** * Checks if this message is frozen.<p> * * @throws CmsRuntimeException in case the message is already frozen */ protected void checkFrozen() throws CmsRuntimeException { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_LOGIN_MESSAGE_FROZEN_0)); } }
/** * Sets the maximum number of visited resources to store per user.<p> * * @param maxVisitedCount the maximum number of visited resources to store per user */ public void setMaxVisitedCount(String maxVisitedCount) { if (m_frozen) { throw new CmsRuntimeException(Messages.get().container(Messages.ERR_CONFIG_SUBSCRIPTIONMANAGER_FROZEN_0)); } try { int intValue = Integer.parseInt(maxVisitedCount); m_maxVisitedCount = (intValue > 0) ? intValue : DEFAULT_MAX_VISITEDCOUNT; } catch (NumberFormatException e) { // use default value m_maxVisitedCount = DEFAULT_MAX_VISITEDCOUNT; } }
/** * Sets the time when to start displaying this message.<p> * * @param timeStart the time to set */ public void setTimeStart(long timeStart) { checkFrozen(); if (timeStart < 0) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1, new Long(timeStart))); } if (timeStart == 0) { timeStart = DEFAULT_TIME_START; } m_timeStart = timeStart; }
/** * Sets the time when to start displaying this message.<p> * * @param timeStart the time to set */ public void setTimeStart(long timeStart) { checkFrozen(); if (timeStart < 0) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_LOGIN_MESSAGE_BAD_TIME_1, new Long(timeStart))); } if (timeStart == 0) { timeStart = DEFAULT_TIME_START; } m_timeStart = timeStart; }
/** * @see org.opencms.file.wrapper.A_CmsResourceWrapper#moveResource(org.opencms.file.CmsObject, java.lang.String, java.lang.String) */ @Override public boolean moveResource(CmsObject cms, String source, String destination) throws CmsException, CmsIllegalArgumentException { String name = CmsResource.getName(destination); if (m_disabledNames.contains(name)) { throw new CmsPermissionViolationException( Messages.get().container(Messages.ERR_PERM_DENIED_2, destination, "+c")); } else { return false; } }
/** * Sets the description of this organizational unit.<p> * * @param description the principal organizational unit to set */ public void setDescription(String description) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(description)) { throw new CmsIllegalArgumentException( org.opencms.db.Messages.get().container(org.opencms.db.Messages.ERR_BAD_OU_DESCRIPTION_EMPTY_0)); } m_description = description; }
/** * Processes the current database context.<p> * * @throws CmsException if something goes wrong */ public void pop() throws CmsException { if (!isDefaultDbContext()) { throw new CmsException(Messages.get().container(Messages.ERR_PROCESS_DB_CONTEXT_0)); } }
/** * Processes the current database context.<p> * * @throws CmsException if something goes wrong */ public void pop() throws CmsException { if (!isDefaultDbContext()) { throw new CmsException(Messages.get().container(Messages.ERR_PROCESS_DB_CONTEXT_0)); } }
/** * Sets the description of this organizational unit.<p> * * @param description the principal organizational unit to set */ public void setDescription(String description) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(description)) { throw new CmsIllegalArgumentException(org.opencms.db.Messages.get().container( org.opencms.db.Messages.ERR_BAD_OU_DESCRIPTION_EMPTY_0)); } m_description = description; }