public AddNamespacesPlugin(InitParams params) { PropertiesParam param = params.getPropertiesParam("namespaces"); if (param != null) { namespaces = param.getProperties(); } }
private void putConfiguredValues(InitParams initParams, MappedParametrizedObjectEntry qmEntry) { PropertiesParam props = initParams.getPropertiesParam(BaseQuotaManager.CACHE_CONFIGURATION_PROPERTIES_PARAM); for (Iterator<Property> iter = props.getPropertyIterator(); iter.hasNext();) { Property prop = iter.next(); qmEntry.putParameterValue(prop.getName(), prop.getValue()); } }
public String getDefaultPageHelp () { if (props != null) { if (Helper.present(props.getProperty("default"))) { return props.getProperty("default") ; } } return DEFAULT_HELP_PAGE; }
/** * Register all properties defined as <i>properties-param</i> in the {@link org.exoplatform.commons.utils.PropertyManager}. * <i>properties</i> entry isn't processed here but done by the parent {@link org.exoplatform.container.PropertyConfigurator}. * @param params The list of InitParams to register * @return The <i>params</i> list passed in parameter */ private static InitParams loadPropertiesParams(InitParams params) { if (params != null) { Iterator<PropertiesParam> it = params.getPropertiesParamIterator(); while (it.hasNext()) { PropertiesParam propertiesParam = it.next(); LOG.debug("Going to initialize properties from init param"); for (Iterator<Property> i = propertiesParam.getPropertyIterator(); i.hasNext(); ) { Property property = i.next(); String name = property.getName(); String value = property.getValue(); LOG.debug("Adding property from init param " + name + " = " + value); PropertyManager.setProperty(name, value); } if ("properties".equals(propertiesParam.getName())) it.remove(); } } return params; }
boolean isDefault = propParam.getName().equals(PROPERTIES_DEFAULT); boolean isMandatory = propParam.getName().equals(PROPERTIES_MANDATORY); for (Iterator props = propParam.getPropertyIterator(); props.hasNext();) if (isMandatory) setSystemProperty(propName, propValue, propParam.getName()); setSystemProperty(propName, propValue, propParam.getName());
public CustomizeSpaceHomePageListener(SpaceCustomizationService spaceCustomizationService_, InitParams params) { this.spaceCustomizationService = spaceCustomizationService_; this.welcomeSCVCustomPreferences = params.getPropertiesParam("welcomeSCVCustomPreferences").getProperties(); }
public String fetchHelpPage(String currentNavigation) { String helpPage = DEFAULT_HELP_PAGE; if (props != null) { helpPage = props.getProperty(currentNavigation); } if (!Helper.present(helpPage)) { return getDefaultPageHelp(); } return helpPage; }
public MailServiceImpl(InitParams params, final ExoContainerContext ctx) throws Exception props_.putAll(params.getPropertiesParam("config").getProperties()); if ("true".equals(props_.getProperty("mail.smtp.auth")))
public void init(PropertiesParam params) throws RepositoryConfigurationException String sourceNameParam = params.getProperty(PARAM_SOURCE_NAME); if (sourceNameParam == null) sourceNameParam = params.getProperty("sourceName"); // try old, pre 1.9 name if (sourceNameParam == null) String dialectParam = params.getProperty(PARAM_DIALECT); String dialect = dialectParam == null ? DBConstants.DB_DIALECT_AUTO : dialectParam.toUpperCase();
/** * Default constructor */ public DistributedCacheManager(InitParams params, ConfigurationManager configManager, TransactionService ts) { ValueParam vp; final String result; if (params != null && (vp = params.getValueParam(CONFIG_FILE_PARAMETER_NAME)) != null && (result = vp.getValue()) != null && !result.isEmpty()) { PropertiesParam pp = params.getPropertiesParam(PARAMS_PARAMETER_NAME); this.manager = init(result, pp == null ? null : pp.getProperties(), configManager, ts == null ? null : ts.getTransactionManager()); } else { throw new IllegalArgumentException("The parameter '" + CONFIG_FILE_PARAMETER_NAME + "' must be set"); } }
String cn = params.getPropertiesParam("working-conf").getProperty("persister-class-name"); if (cn == null) cn = params.getPropertiesParam("working-conf").getProperty("persisterClassName"); // try old name, pre 1.9
public ChromatticLifeCycle(InitParams params) { Map<String, String> options = new HashMap<String, String>(); PropertiesParam pp = params.getPropertiesParam("options"); if (pp != null) { options.putAll(pp.getProperties()); } this.domainName = params.getValueParam("domain-name").getValue(); this.workspaceName = params.getValueParam("workspace-name").getValue(); this.entityClassNames = params.getValuesParam("entities").getValues(); this.optionMap = options; }
if (addrsParam != null) for (Iterator it = addrsParam.getProperties().entrySet().iterator(); it.hasNext();)
public CronJob(InitParams params) throws Exception { ExoProperties props = params.getPropertiesParam("cronjob.info").getProperties(); String jobName = props.getProperty("jobName"); String jobGroup = props.getProperty("groupName"); String jobClass = props.getProperty("job"); Class<?> clazz = ClassLoading.forName(jobClass, this); jinfo_ = new JobInfo(jobName, jobGroup, clazz); expression_ = props.getProperty("expression"); }
public PeriodJob(InitParams params) throws Exception { ExoProperties props = params.getPropertiesParam("job.info").getProperties(); String jobName = props.getProperty("jobName"); String jobGroup = props.getProperty("groupName"); String jobClass = props.getProperty("job"); Class<?> clazz = ClassLoading.forName(jobClass, this); jinfo_ = new JobInfo(jobName, jobGroup, clazz); Date startTime = getDate(props.getProperty("startTime")); Date endTime = getDate(props.getProperty("endTime")); int repeatCount = Integer.parseInt(props.getProperty("repeatCount")); long repeatInterval = Integer.parseInt(props.getProperty("period")); pjinfo_ = new PeriodInfo(startTime, endTime, repeatCount, repeatInterval); }