protected Object getValue(final IConfigurationParam parameter) { checkRefresh(); return this.configurationParamMap.get(parameter); }
public boolean isCostConfigured() { return getBooleanValue(ConfigurationParam.COST_CONFIGURED); }
public boolean isBookManagementConfigured() { return getTaskIdValue(ConfigurationParam.DEFAULT_TASK_ID_4_BOOKS) != null; }
/** * @return The string value of the given parameter stored as ConfigurationDO in the data base. * @throws ClassCastException if configuration parameter is from the wrong type. */ public String getStringValue(final IConfigurationParam parameter) { return (String) getValue(parameter); }
@Override protected void refresh() final String identifier = getIdentifier4LogMessage(); final Map<ConfigurationParam, Object> newMap = new HashMap<ConfigurationParam, Object>(); log.info("Initializing " + identifier + " (ConfigurationDO parameters) ..."); list = loadParameters(); } catch (final Exception ex) { log.error(
/** * @see org.projectforge.framework.cache.AbstractCache#setExpired() */ @Override public void setExpired() { super.setExpired(); this.multitenancyMode = null; }
/** * @return The BigDecimal value of the given parameter stored as ConfigurationDO in the data base. * @throws ClassCastException if configuration parameter is from the wrong type. */ public BigDecimal getPercentValue(final IConfigurationParam parameter) { return (BigDecimal) getValue(parameter); }
/** * @return The boolean value of the given parameter stored as ConfigurationDO in the data base. * @throws ClassCastException if configuration parameter is from the wrong type. */ public boolean getBooleanValue(final IConfigurationParam parameter) { final Object obj = getValue(parameter); if (obj != null && Boolean.TRUE.equals(obj)) { return true; } else { return false; } }
public void putParameterManual(final ConfigurationParam param, final Object value) { checkRefresh(); this.configurationParamMap.put(param, value); }
/** * @return The Integer value of the given parameter stored as ConfigurationDO in the data base. * @throws ClassCastException if configuration parameter is from the wrong type. */ public Integer getTaskIdValue(final IConfigurationParam parameter) { final TaskDO task = (TaskDO) getValue(parameter); if (task != null) { return task.getId(); } return null; }
/** * @see org.projectforge.framework.configuration.AbstractConfiguration#getValue(org.projectforge.framework.configuration.ConfigurationParam) */ @Override protected Object getValue(final IConfigurationParam parameter) { final Object obj = super.getValue(parameter); if (parameter.getType() == ConfigurationType.TASK) { final TaskTree taskTree = TaskTreeHelper.getTaskTree(); final Integer taskId = (Integer) obj; if (taskId != null) { return taskTree.getTaskById(taskId); } else { return null; } } return obj; }