Package org.exoplatform.container.xml

Examples of org.exoplatform.container.xml.PropertiesParam


      reset();
      URL propertiesURL = TestPropertyManagerConfigurator.class.getResource("property-configurator.xml");
      assertNotNull(propertiesURL);
      System.setProperty(PropertyManager.PROPERTIES_URL, propertiesURL.toString());
      System.setProperty("property_2", "property_value_2");
      PropertiesParam propertiesParam = new PropertiesParam();
      InitParams params = new InitParams();
      params.put("properties", propertiesParam);
      new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
      Map<String, String> additions = reset();
      assertEquals("property_value_1", additions.get("property_1"));
View Full Code Here


   }

   public void testSimple()
   {
      reset();
      PropertiesParam propertiesParam = new PropertiesParam();
      propertiesParam.setProperty("property_1", "property_value_1");
      InitParams params = new InitParams();
      params.put("properties", propertiesParam);
      new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
      Map<String, String> additions = reset();
      assertEquals(Collections.singletonMap("property_1", "property_value_1"), additions);
View Full Code Here

      reset();
      URL propertiesURL = TestPropertyManagerConfigurator.class.getResource("property-configurator.properties");
      assertNotNull(propertiesURL);
      System.setProperty(PropertyManager.PROPERTIES_URL, propertiesURL.toString());
      System.setProperty("property_2", "property_value_2");
      PropertiesParam propertiesParam = new PropertiesParam();
      InitParams params = new InitParams();
      params.put("properties", propertiesParam);
      new PropertyConfigurator(params, new ConfigurationManagerImpl(new HashSet<String>()));
      Map<String, String> additions = reset();
      assertEquals("property_value_1", additions.get("property_1"));
View Full Code Here

*/
public class TestValidation
{
   public TestValidation(InitParams params)
   {
      PropertiesParam pp = params.getPropertiesParam("properties-param");
      ExoProperties ep = pp.getProperties();
      check(ep.containsKey("p1"));
      check(ep.containsKey("p2"));
      check(ep.containsKey("p3"));
      pp = params.getPropertiesParam("properties-param2");
      ep = pp.getProperties();
      check(ep.containsKey("p1"));
      check(ep.containsKey("p2"));
      check(ep.containsKey("p3"));
      MyBean bean = (MyBean)params.getObjectParam("object-param").getObject();
      check(bean.value.equals("value"));
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 = getWorkingRepositoryName(p);

         final String workspace = p.getProperty("workspace");
         final String path = p.getProperty("path");
         try
         {
            SecurityHelper.doPrivilegedExceptionAction(new PrivilegedExceptionAction<Void>()
            {
               public Void run() throws MalformedURLException
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

   public RegistryInitializationEntryPlugin(InitParams initParams)
   {

      if (initParams != null)
      {
         PropertiesParam properties = initParams.getPropertiesParam("locations");
         if (properties != null)
            location = properties.getProperty("group-path");
      }
      if (initParams != null)
      {
         Iterator<ValueParam> iterator = initParams.getValueParamIterator();
         while (iterator.hasNext())
View Full Code Here

   protected ExtendedBackupManager getJCRBackupManager()
   {
      if (backup == null)
      {
         InitParams initParams = new InitParams();
         PropertiesParam pps = new PropertiesParam();
         pps.setProperty(BackupManagerImpl.FULL_BACKUP_TYPE,
            "org.exoplatform.services.jcr.ext.backup.impl.fs.FullBackupJob");
         pps.setProperty(BackupManagerImpl.INCREMENTAL_BACKUP_TYPE,
            "org.exoplatform.services.jcr.ext.backup.impl.fs.IncrementalBackupJob");
         pps.setProperty(BackupManagerImpl.BACKUP_DIR, "target/backup");
         pps.setProperty(BackupManagerImpl.DEFAULT_INCREMENTAL_JOB_PERIOD, "3600");

         initParams.put(BackupManagerImpl.BACKUP_PROPERTIES, pps);

         BackupManagerImpl backup = new BackupManagerImpl(initParams, repositoryService);
         backup.start();
View Full Code Here

   protected ExtendedBackupManager getRDBMSBackupManager()
   {
      if (backup == null)
      {
         InitParams initParams = new InitParams();
         PropertiesParam pps = new PropertiesParam();
         pps.setProperty(BackupManagerImpl.FULL_BACKUP_TYPE,
            "org.exoplatform.services.jcr.ext.backup.impl.rdbms.FullBackupJob");
         pps.setProperty(BackupManagerImpl.INCREMENTAL_BACKUP_TYPE,
            "org.exoplatform.services.jcr.ext.backup.impl.fs.IncrementalBackupJob");
         pps.setProperty(BackupManagerImpl.BACKUP_DIR, "target/backup");
         pps.setProperty(BackupManagerImpl.DEFAULT_INCREMENTAL_JOB_PERIOD, "3600");

         initParams.put(BackupManagerImpl.BACKUP_PROPERTIES, pps);

         BackupManagerImpl backup = new BackupManagerImpl(initParams, repositoryService);
         backup.start();
View Full Code Here

         for (int i = 0; i < theadsCount; i++)
         {
            threads[i].join();
         }

         PropertiesParam props = new PropertiesParam();
         props.setProperty("dialect", "auto");
         props.setProperty("source-name", "jdbcjcr");

         JDBCConfigurationPersister persiter = new JDBCConfigurationPersister();
         persiter.init(props);

         IBindingFactory bfact = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
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.