Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.ValueParam


      HibernateService hibernateService,
      ConfigurationManager confManager,
      PicketLinkIDMCacheService picketLinkIDMCache,
      InitialContextInitializer dependency) throws Exception
   {
      ValueParam config = initParams.getValueParam(PARAM_CONFIG_OPTION);
      ValueParam jndiName = initParams.getValueParam(PARAM_JNDI_NAME_OPTION);
      ValueParam realmName = initParams.getValueParam(REALM_NAME_OPTION);
      ValueParam apiCacheConfig = initParams.getValueParam(CACHE_CONFIG_API_OPTION);
      ValueParam storeCacheConfig = initParams.getValueParam(CACHE_CONFIG_STORE_OPTION);

      if (config == null && jndiName == null)
      {
         throw new IllegalStateException("Either '" + PARAM_CONFIG_OPTION + "' or '" + PARAM_JNDI_NAME_OPTION
            + "' parameter must " + "be specified");
      }
      if (realmName != null)
      {
         this.realmName = realmName.getValue();
      }

      if (config != null)
      {
         this.config = config.getValue();
         URL configURL = confManager.getURL(this.config);

         if (configURL == null)
         {
            throw new IllegalStateException("Cannot fine resource: " + this.config);
         }



         IdentityConfigurationMetaData configMD =
            JAXB2IdentityConfiguration.createConfigurationMetaData(confManager.getInputStream(this.config));

         identityConfiguration = new IdentityConfigurationImpl().configure(configMD);

         identityConfiguration.getIdentityConfigurationRegistry().register(hibernateService.getSessionFactory(), "hibernateSessionFactory");

         if (apiCacheConfig != null)
         {
            InputStream configStream = confManager.getInputStream(apiCacheConfig.getValue());


            JBossCacheAPICacheProviderImpl apiCacheProvider = new JBossCacheAPICacheProviderImpl();
            apiCacheProvider.initialize(configStream);
            picketLinkIDMCache.register(apiCacheProvider);
            identityConfiguration.getIdentityConfigurationRegistry().register(apiCacheProvider, "apiCacheProvider");

            configStream.close();

         }
         if (storeCacheConfig != null)
         {
            InputStream configStream = confManager.getInputStream(storeCacheConfig.getValue());

            JBossCacheIdentityStoreCacheProviderImpl storeCacheProvider = new JBossCacheIdentityStoreCacheProviderImpl();
            storeCacheProvider.initialize(configStream);
            picketLinkIDMCache.register(storeCacheProvider);
            identityConfiguration.getIdentityConfigurationRegistry().register(storeCacheProvider, "storeCacheProvider");
View Full Code Here


   private LocaleConfigService createService() throws Exception
   {
      ConfigurationManagerImpl cm = new ConfigurationManagerImpl();
      InitParams params = new InitParams();
      ValueParam param = new ValueParam();
      param.setName("locale.config.file");
      param.setValue("classpath:/resources/locales-config.xml");
      params.addParameter(param);

      //
      LocaleConfigService service = new LocaleConfigServiceImpl(params, cm);
      return service;
View Full Code Here

         mandatoryMSTypes_ = mandatoryMSTypesParam.getValues();
      else
         mandatoryMSTypes_ = new ArrayList<String>();

      // tam.nguyen get admin group value
      ValueParam adminGroupsParam = params.getValueParam("portal.administrator.groups");
      if (adminGroupsParam != null)
      {
         setAdminGroups(adminGroupsParam.getValue());
      }

      // tam.nguyen get administrator member type
      ValueParam adminMSTypeParam = params.getValueParam("portal.administrator.mstype");
      if (adminMSTypeParam != null)
      {
         setAdminMSType(adminMSTypeParam.getValue());
      }

      init(md);
   }
View Full Code Here

      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");
         moduleId = gadgetModuleId != null ? gadgetModuleId.getValue() : null;
         ValueParam gadgetHostName = params.getValueParam("gadgets.hostName");
         hostName = gadgetHostName != null ? gadgetHostName.getValue() : null;
      }

      //
      if (gadgetDeveloperGroup == null)
      {
View Full Code Here

   {
      this.sessionProviderService = sessionProviderService;
      this.repositoryService = repositoryService;
      this.nullResourceLocks = new NullResourceLocksHolder();

      ValueParam pXSLTParam = params.getValueParam(FOLDER_ICON_PATH);
      if (pXSLTParam != null)
      {
         xsltParams.put(FOLDER_ICON_PATH, pXSLTParam.getValue());
         log.info(FOLDER_ICON_PATH + " = " + pXSLTParam.getValue());
      }

      ValueParam pDefFolderNodeType = params.getValueParam(INIT_PARAM_DEF_FOLDER_NODE_TYPE);
      if (pDefFolderNodeType != null)
      {
         defaultFolderNodeType = pDefFolderNodeType.getValue();
         log.info(INIT_PARAM_DEF_FOLDER_NODE_TYPE + " = " + defaultFolderNodeType);
      }

      ValueParam pDefFileNodeType = params.getValueParam(INIT_PARAM_DEF_FILE_NODE_TYPE);
      if (pDefFileNodeType != null)
      {
         defaultFileNodeType = pDefFileNodeType.getValue();
         log.info(INIT_PARAM_DEF_FILE_NODE_TYPE + " = " + defaultFileNodeType);
      }

      ValueParam pDefFileMimeType = params.getValueParam(INIT_PARAM_DEF_FILE_MIME_TYPE);
      if (pDefFileMimeType != null)
      {
         defaultFileMimeType = pDefFileMimeType.getValue();
         log.info(INIT_PARAM_DEF_FILE_MIME_TYPE + " = " + defaultFileMimeType);
      }

      ValueParam pUpdatePolicy = params.getValueParam(INIT_PARAM_UPDATE_POLICY);
      if (pUpdatePolicy != null)
      {
         updatePolicyType = pUpdatePolicy.getValue();
         log.info(INIT_PARAM_UPDATE_POLICY + " = " + updatePolicyType);
      }

      ValueParam pAutoVersion = params.getValueParam(INIT_PARAM_AUTO_VERSION);
      if (pAutoVersion != null)
      {
         autoVersionType = pAutoVersion.getValue();
         log.info(INIT_PARAM_AUTO_VERSION + " = " + autoVersionType);
      }

      ValueParam pCacheControl = params.getValueParam(INIT_PARAM_CACHE_CONTROL);
      if (pCacheControl != null)
      {
         String cacheControlConfigValue = pCacheControl.getValue();

         try
         {
            String[] elements = cacheControlConfigValue.split(";");
            for (String element : elements)
View Full Code Here

   {
      if (params == null)
      {
         return;
      }
      final ValueParam vDpc = params.getValueParam("default.portal.container");
      if (vDpc != null && vDpc.getValue().trim().length() > 0)
      {
         this.defaultPortalContainerName = vDpc.getValue().trim();
      }
      final ValueParam vRc = params.getValueParam("default.rest.context");
      if (vRc != null && vRc.getValue().trim().length() > 0)
      {
         this.defaultRestContextName = vRc.getValue().trim();
      }
      final ValueParam vRn = params.getValueParam("default.realm.name");
      if (vRn != null && vRn.getValue().trim().length() > 0)
      {
         this.defaultRealmName = vRn.getValue().trim();
      }
   }
View Full Code Here

         }
      }

      //
      String path = null;
      ValueParam pathParam = params.getValueParam("properties.url");
      if (pathParam != null)
      {
         log.debug("Using file path " + path + " found from configuration");
         path = pathParam.getValue();
      }

      //
      String systemPath = PropertyManager.getProperty(PropertyManager.PROPERTIES_URL);
      if (systemPath != null)
View Full Code Here

         def.setRealmName(DEFAULT_REALM_NAME);
         if (params == null)
         {
            return;
         }
         final ValueParam vp = params.getValueParam("default.realm.name");
         if (vp != null && vp.getValue().trim().length() > 0)
         {
            // A realm name has been defined in the value parameter, thus we use it
            def.setRealmName(Deserializer.resolveVariables(vp.getValue().trim()));
         }
      }
      else
      {
         // We ensure that the realm name doesn't contain any useless characters
View Full Code Here

         def.setRestContextName(DEFAULT_REST_CONTEXT_NAME);
         if (params == null)
         {
            return;
         }
         final ValueParam vp = params.getValueParam("default.rest.context");
         if (vp != null && vp.getValue().trim().length() > 0)
         {
            // A rest context name has been defined in the value parameter, thus we use it
            def.setRestContextName(Deserializer.resolveVariables(vp.getValue().trim()));
         }
      }
      else
      {
         // We ensure that the rest context name doesn't contain any useless characters
View Full Code Here

         def.setName(DEFAULT_PORTAL_CONTAINER_NAME);
         if (params == null)
         {
            return;
         }
         final ValueParam vp = params.getValueParam("default.portal.container");
         if (vp != null && vp.getValue().trim().length() > 0)
         {
            // A name has been defined in the value parameter, thus we use it
            def.setName(Deserializer.resolveVariables(vp.getValue().trim()));
         }
      }
      else
      {
         // We ensure that the name doesn't contain any useless characters
View Full Code Here

TOP

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

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.