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()); } }
/** * 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; }
String propName = prop.getName(); String propValue = prop.getValue(); String existedProp = PrivilegedSystemHelper.getProperty(propName);