Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.PropertiesParam


    *
    * @throws RepositoryConfigurationException
    */
   private void readParamsFromFile()
   {
      PropertiesParam props = initParams.getPropertiesParam("artifact.workspace");

      if (props == null)
      {
         throw new IllegalArgumentException("Property parameters 'locations' expected");
      }

      repoWorkspaceName = props.getProperty("workspace");
      rootNodePath = props.getProperty("rootNode");

      LOG.info("Workspace from configuration file: " + repoWorkspaceName);
      LOG.info("RootNode from configuration file: " + rootNodePath);
   }
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

      datasources_ = new HashMap<String, ExoDatasource>(5);
      txService_ = txService;
      Iterator i = params.getPropertiesParamIterator();
      while (i.hasNext())
      {
         PropertiesParam param = (PropertiesParam)i.next();
         String name = param.getName();
         ExoDatasource ds = new ExoDatasource(createDatasource(param.getProperties()));
         datasources_.put(name, ds);
         if (defaultDS_ == null)
            defaultDS_ = ds;
      }
   }
View Full Code Here

   {
      this.repositoryService = repoService;
      this.backupManager = backupManager;
      this.sessionProviderService = sessionProviderService;

      PropertiesParam pps = params.getPropertiesParam("remote-initializer-properties");

      if (pps == null)
         throw new RuntimeException("remote-initializer-properties not specified");

      if (pps.getProperty("remote-source-url") == null)
         throw new RuntimeException("remote-source-url not specified");
      dataSourceUrl = pps.getProperty("remote-source-url");

      if (pps.getProperty("bind-ip-address") == null)
         throw new RuntimeException("bind-ip-address not specified");
      bindIpAddress = pps.getProperty("bind-ip-address");

      if (pps.getProperty("channel-config") == null)
         throw new RuntimeException("channel-config not specified");
      channelConfig = pps.getProperty("channel-config");

      if (pps.getProperty("channel-name") == null)
         throw new RuntimeException("channel-name not specified");
      channelName = pps.getProperty("channel-name");

      if (pps.getProperty("temp-dir") == null)
         throw new RuntimeException("temp-dir not specified");
      String tempD = pps.getProperty("temp-dir");

      tempDir = new File(tempD);
      if (!PrivilegedFileHelper.exists(tempDir))
      {
         PrivilegedFileHelper.mkdirs(tempDir);
View Full Code Here

   public RESTArtifactLoaderService(InitParams initParams, ThreadLocalSessionProviderService sessionProviderService,
      RepositoryService repositoryService, NodeRepresentationService nodeRepresentationService,
      ExoContainerContext context) throws Exception
   {

      PropertiesParam props = initParams.getPropertiesParam("artifact.workspace");

      if (props == null)
         throw new IllegalArgumentException("Properties-param 'artifact.workspace' expected.");

      this.nodeRepresentationService = nodeRepresentationService;
      this.repositoryService = repositoryService;
      this.sessionProviderService = sessionProviderService;

      this.repository = props.getProperty("repository");
      this.workspace = props.getProperty("workspace");

      this.mavenRoot = props.getProperty("mavenRoot");
      if (mavenRoot.startsWith("/"))
         mavenRoot = mavenRoot.substring(1);
      if (!mavenRoot.endsWith("/"))
         mavenRoot += "/";
      this.realmName = context.getRealmName();
View Full Code Here

      final Set<URL> repos = new HashSet<URL>();
      Iterator<PropertiesParam> iterator = params.getPropertiesParamIterator();
      while (iterator.hasNext())
      {
         PropertiesParam p = iterator.next();
         final String repository = p.getProperty("repository");
         final String workspace = p.getProperty("workspace");
         final String path = p.getProperty("path");
         try
         {
            AccessController.doPrivileged(new PrivilegedExceptionAction<Void>()
            {
               public Void run() throws MalformedURLException
View Full Code Here

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

      backupDir = pps.getProperty(BACKUP_DIR);
      defIncrPeriod = pps.getProperty(DEFAULT_INCREMENTAL_JOB_PERIOD);
      fullBackupType = pps.getProperty(FULL_BACKUP_TYPE);
      incrementalBackupType = pps.getProperty(INCREMENTAL_BACKUP_TYPE);

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

    *
    * @throws RepositoryConfigurationException
    */
   private void readParamsFromFile()
   {
      PropertiesParam pps = initParams.getPropertiesParam("replication-properties");

      // initialize replication params;
      testMode = pps.getProperty("test-mode");
      enabled = pps.getProperty("enabled");
      mode = pps.getProperty("mode");
      bindIPAddress = pps.getProperty("bind-ip-address");
      channelConfig = pps.getProperty("channel-config");
      channelName = pps.getProperty("channel-name");
      recDir = pps.getProperty("recovery-dir");
      ownName = pps.getProperty("node-name");
      participantsCluster = pps.getProperty("other-participants");
      sWaitConfirmation = pps.getProperty("wait-confirmation");

      // initialize repositories
      ValuesParam vp = initParams.getValuesParam("repositories");
      repoNamesList = vp.getValues();
      if (vp == null || vp.getValues().size() == 0)
         throw new RuntimeException("repositories not specified");

      // initialize snapshot params;
      PropertiesParam backuParams = initParams.getPropertiesParam("replication-snapshot-properties");

      if (backuParams != null)
      {
         sBackupEnabled = backuParams.getProperty("snapshot-enabled");
         sBackupDir = backuParams.getProperty("snapshot-dir");
         sDelayTime = backuParams.getProperty("delay-time");
      }
      else
      {
         backupEnabled = false;
      }

      // initialize priority params;
      PropertiesParam priorityParams = initParams.getPropertiesParam("replication-priority-properties");

      if (priorityParams != null)
      {
         priprityType = priorityParams.getProperty("priority-type");
         ownValue = priorityParams.getProperty("node-priority");
      }

      log.info("Params is read from configuration file");

      checkParams();
View Full Code Here

   {
      this.repositoryService = repoService;
      this.backupManager = backupManager;
      this.sessionProviderService = sessionProviderService;

      PropertiesParam pps = params.getPropertiesParam("remote-initializer-properties");

      if (pps == null)
         throw new RuntimeException("remote-initializer-properties not specified");

      if (pps.getProperty("remote-source-url") == null)
         throw new RuntimeException("remote-source-url not specified");
      dataSourceUrl = pps.getProperty("remote-source-url");

      if (pps.getProperty("bind-ip-address") == null)
         throw new RuntimeException("bind-ip-address not specified");
      bindIpAddress = pps.getProperty("bind-ip-address");

      if (pps.getProperty("channel-config") == null)
         throw new RuntimeException("channel-config not specified");
      channelConfig = pps.getProperty("channel-config");

      if (pps.getProperty("channel-name") == null)
         throw new RuntimeException("channel-name not specified");
      channelName = pps.getProperty("channel-name");

      if (pps.getProperty("temp-dir") == null)
         throw new RuntimeException("temp-dir not specified");
      String tempD = pps.getProperty("temp-dir");

      tempDir = new File(tempD);
      if (!tempDir.exists())
         tempDir.mkdirs();
View Full Code Here

      workspace = params.getValueParam("workspace").getValue();
      node = params.getValueParam("node").getValue();
      Iterator<PropertiesParam> iterator = params.getPropertiesParamIterator();
      while (iterator.hasNext())
      {
         PropertiesParam p = iterator.next();
         String name = p.getName();
         boolean autoload = Boolean.valueOf(p.getProperty("autoload"));
         String path = p.getProperty("path");
         if (LOG.isDebugEnabled())
            LOG.debug("Read new script configuration " + name);
         l.add(new XMLGroovyScript2Rest(name, path, autoload));
      }
   }
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.