Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.BaseConfiguration


        super(testName);

        // Setup configuration
        ServiceManager serviceManager = TurbineServices.getInstance();
        serviceManager.setApplicationRoot(".");
        Configuration cfg = new BaseConfiguration();
        cfg.setProperty(ParserUtils.URL_CASE_FOLDING_KEY,
                ParserUtils.URL_CASE_FOLDING_LOWER_VALUE );
        serviceManager.setConfiguration(cfg);

    }
View Full Code Here


        super(name);

        ServiceManager serviceManager = TurbineServices.getInstance();
        serviceManager.setApplicationRoot(".");

        Configuration cfg = new BaseConfiguration();
        cfg.setProperty(PREFIX + "classname", TurbineNonPersistentSchedulerService.class.getName());

        cfg.setProperty(PREFIX + "scheduler.jobs", "SimpleJob");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.ID", "1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.SECOND", "10");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.MINUTE", "-1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.HOUR", "-1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.WEEK_DAY", "-1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.DAY_OF_MONTH", "-1");
        cfg.setProperty(PREFIX + "enabled", "true");

        serviceManager.setConfiguration(cfg);

        try
        {
View Full Code Here

        super(name);

        ServiceManager serviceManager = TurbineServices.getInstance();
        serviceManager.setApplicationRoot(".");

        Configuration cfg = new BaseConfiguration();
        cfg.setProperty(PREFIX + "classname",
                        TurbineCryptoService.class.getName());

        /* No providers configured. Should be "java" then */

        /* Ugh */

        cfg.setProperty("services." + FactoryService.SERVICE_NAME + ".classname",
                        TurbineFactoryService.class.getName());

        serviceManager.setConfiguration(cfg);

        try
View Full Code Here

    {
        super(name);
        ServiceManager serviceManager = TurbineServices.getInstance();
        serviceManager.setApplicationRoot(".");

        Configuration cfg = new BaseConfiguration();
        cfg.setProperty(PREFIX + "classname",
                TurbineAvalonComponentService.class.getName());

        // we want to configure the service to load test TEST configuration files
        cfg.setProperty(PREFIX + "componentConfiguration",
                "src/test/componentConfiguration.xml");
        cfg.setProperty(PREFIX + "componentRoles",
                "src/test/componentRoles.xml");
        serviceManager.setConfiguration(cfg);

        try
        {
View Full Code Here

        super(name);

        ServiceManager serviceManager = TurbineServices.getInstance();
        serviceManager.setApplicationRoot(".");

        Configuration cfg = new BaseConfiguration();
        cfg.setProperty(PREFIX + "classname",
                        TurbineCryptoService.class.getName());

        cfg.setProperty(PREFIX + "algorithm.unix",
                        UnixCrypt.class.getName());
        cfg.setProperty(PREFIX + "algorithm.clear",
                        ClearCrypt.class.getName());
        cfg.setProperty(PREFIX + "algorithm.java",
                        JavaCrypt.class.getName());
        cfg.setProperty(PREFIX + "algorithm.oldjava",
                        OldJavaCrypt.class.getName());

        /* Do _not_ configure a default! We want to test explicitly */

        cfg.setProperty(PREFIX + "algorithm.default",
                        "none");

        /* Ugh */

        cfg.setProperty("services." + FactoryService.SERVICE_NAME + ".classname",
                        TurbineFactoryService.class.getName());

        serviceManager.setConfiguration(cfg);

        try
View Full Code Here

        // test the postgresql variation
        c = new Criteria();
        Criteria.Criterion cc =
            c.getNewCriterion("TABLE.COLUMN", Boolean.TRUE, Criteria.EQUAL);

        Configuration conf = new BaseConfiguration();
        conf.addProperty("driver", "org.postgresql.Driver");
        try
        {
            cc.setDB(DBFactory.create("org.postgresql.Driver"));
        }
        catch (Exception e)
View Full Code Here

      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch(Exception e) {
      System.out.println("Error setting native look and feel: " + e);
    }
   
    new ViewerFrame(new BaseConfiguration(), null, null).setVisible(true);
   
  }
View Full Code Here

  private static void executeArgumentsGroup(CLIArgumentsGroup argumentsGroup) {
   
    /* load configuration file */
   
    Configuration config = new BaseConfiguration();
    File configFile = null;
   
    CLIArguments representativeArgs = argumentsGroup.getRepresentative();
   
    if (representativeArgs.isConfig()) {
View Full Code Here

    if (osmData == null) {
      throw new IllegalArgumentException("osmData must not be null");
    }
   
    if (config == null) {
      config = new BaseConfiguration();
    }
   
    Double maxBoundingBoxDegrees = config.getDouble("maxBoundingBoxDegrees", null);
    if (maxBoundingBoxDegrees != null) {
      for (Bound bound : osmData.getBounds()) {
View Full Code Here

      // it's okay
    }
  }

  public void testGetObject() throws Exception {
    configurationFactory.setConfigurations(new Configuration[] { new BaseConfiguration() });
    assertNull(configurationFactory.getObject());
    configurationFactory.afterPropertiesSet();
    assertNotNull(configurationFactory.getObject());
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.BaseConfiguration

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.