Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.PropertiesParam


   private final Map<String, String> optionMap;

   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();
View Full Code Here


      String language = null;
      String moduleId = null;
      String hostName = null;
      if (params != null)
      {
         PropertiesParam properties = params.getPropertiesParam("developerInfo");
         gadgetDeveloperGroup = properties != null ? properties.getProperty("developer.group") : null;
         ValueParam gadgetCountry = params.getValueParam("gadgets.country");
         country = gadgetCountry != null ? gadgetCountry.getValue() : null;
         ValueParam gadgetLanguage = params.getValueParam("gadgets.language");
         language = gadgetLanguage != null ? gadgetLanguage.getValue() : null;
         ValueParam gadgetModuleId = params.getValueParam("gadgets.moduleId");
View Full Code Here

   @SuppressWarnings("unchecked")
   public HibernateServiceImpl(InitParams initParams, CacheService cacheService)
   {
      threadLocal_ = new ThreadLocal<Session>();
      PropertiesParam param = initParams.getPropertiesParam("hibernate.properties");
      final HibernateSettingsFactory settingsFactory = new HibernateSettingsFactory(new ExoCacheProvider(cacheService));
      conf_ = SecurityHelper.doPrivilegedAction(new PrivilegedAction<HibernateConfigurationImpl>()
      {
         public HibernateConfigurationImpl run()
         {
            return new HibernateConfigurationImpl(settingsFactory);
         }
      });
      Iterator properties = param.getPropertyIterator();
      while (properties.hasNext())
      {
         Property p = (Property)properties.next();

         //
View Full Code Here

    *
    * @throws RepositoryConfigurationException
    */
   private void readParamsFromFile()
   {
      PropertiesParam pps = initParams.getPropertiesParam(BACKUP_PROPERTIES);

      backupDir = pps.getProperty(BACKUP_DIR);
      // full backup type can be not defined. Using default.
      fullBackupType =
         pps.getProperty(FULL_BACKUP_TYPE) == null ? DEFAULT_VALUE_FULL_BACKUP_TYPE : pps.getProperty(FULL_BACKUP_TYPE);
      // incremental backup can be not configured. Using default values.
      defIncrPeriod =
         pps.getProperty(DEFAULT_INCREMENTAL_JOB_PERIOD) == null ? DEFAULT_VALUE_INCREMENTAL_JOB_PERIOD : pps
            .getProperty(DEFAULT_INCREMENTAL_JOB_PERIOD);
      incrementalBackupType =
         pps.getProperty(INCREMENTAL_BACKUP_TYPE) == null ? DEFAULT_VALUE_INCREMENTAL_BACKUP_TYPE : pps
            .getProperty(INCREMENTAL_BACKUP_TYPE);

      log.info("Backup dir from configuration file: " + backupDir);
      log.info("Full backup type from configuration file: " + fullBackupType);
      log.info("(Experimental) Incremental backup type from configuration file: " + incrementalBackupType);
View Full Code Here

   /** The logger. */
   private final Log log = ExoLogger.getExoLogger(PropertyConfigurator.class);

   public PropertyConfigurator(InitParams params, ConfigurationManager confManager)
   {
      PropertiesParam propertiesParam = params.getPropertiesParam("properties");
      if (propertiesParam != null)
      {
         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);
View Full Code Here

      if (params != null)
      {
         Iterator<PropertiesParam> iterator = params.getPropertiesParamIterator();
         while (iterator.hasNext())
         {
            PropertiesParam propertiesParam = iterator.next();
            String uri = propertiesParam.getProperty("uri");
            String publicId = propertiesParam.getProperty("publicId");
            String systemId = propertiesParam.getProperty("systemId");
            if (publicId != null && uri != null)
               publicIDs_.put(publicId, uri);
            if (systemId != null && uri != null)
               systemIDs_.put(systemId, uri);
         }
View Full Code Here

   public TRAXTemplatesLoaderPlugin(InitParams params) throws Exception
   {
      if (params != null)
      {
         PropertiesParam pparams = params.getPropertiesParam("xsl-source-urls");
         if (pparams != null)
            templates_ = pparams.getProperties();
      }
   }
View Full Code Here

   public JVMRuntimeInfoImpl(InitParams params) throws Exception
   {
      mxbean_ = ManagementFactory.getRuntimeMXBean();

      PropertiesParam param = params.getPropertiesParam("add.system.properties");
      if (param != null)
      {
         ExoProperties props = param.getProperties();
         Iterator i = props.entrySet().iterator();
         while (i.hasNext())
         {
            Map.Entry entry = (Map.Entry)i.next();
            System.setProperty((String)entry.getKey(), (String)entry.getValue());
View Full Code Here

      ValueParam confValue = params.getValueParam("configurator");
      if (confValue != null)
         configurer = confValue.getValue();

      PropertiesParam p = params.getPropertiesParam("properties");
      if (p != null)
         properties = p.getProperties();

      initLogger();
   }
View Full Code Here

   public InitialContextInitializer(InitParams params) throws NamingException, ConfigurationException,
      FileNotFoundException, XMLStreamException
   {
      for (Iterator propsParams = params.getPropertiesParamIterator(); propsParams.hasNext();)
      {
         PropertiesParam propParam = (PropertiesParam)propsParams.next();
         boolean isDefault = propParam.getName().equals(PROPERTIES_DEFAULT);
         boolean isMandatory = propParam.getName().equals(PROPERTIES_MANDATORY);
         for (Iterator props = propParam.getPropertyIterator(); props.hasNext();)
         {
            Property prop = (Property)props.next();
            String propName = prop.getName();
            String propValue = prop.getValue();
            String existedProp = PrivilegedSystemHelper.getProperty(propName);
            if (isMandatory)
            {
               setSystemProperty(propName, propValue, propParam.getName());
            }
            else if (isDefault)
            {
               if (existedProp == null)
               {
                  setSystemProperty(propName, propValue, propParam.getName());
               }
               else
               {
                  LOG.info("Using default system property: " + propName + " = " + existedProp);
               }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.xml.PropertiesParam

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.