Examples of ConfigurationLoader


Examples of com.github.dandelion.core.config.ConfigurationLoader

   *
   * @return an implementation of {@link ConfigurationLoader}.
   */
  public void initConfiguration(FilterConfig filterConfig) {

    ConfigurationLoader configurationLoader = null;

    LOG.debug("Initializing the configuration loader...");

    if (StringUtils.isNotBlank(System.getProperty(ConfigurationLoader.DANDELION_CONFLOADER_CLASS))) {
      Class<?> clazz;
      try {
        clazz = ClassUtils.getClass(System.getProperty(ConfigurationLoader.DANDELION_CONFLOADER_CLASS));
        configurationLoader = (ConfigurationLoader) ClassUtils.getNewInstance(clazz);
      }
      catch (Exception e) {
        LOG.warn(
            "Unable to instantiate the configured {} due to a {} exception. Falling back to the default one.",
            ConfigurationLoader.DANDELION_CONFLOADER_CLASS, e.getClass().getName(), e);
      }
    }

    if (configurationLoader == null) {
      configurationLoader = new StandardConfigurationLoader();
    }

    Properties userProperties = new Properties();
    userProperties.putAll(configurationLoader.loadUserConfiguration());
    configuration = new Configuration(filterConfig, userProperties);
  }
View Full Code Here

Examples of de.novanic.eventservice.config.loader.ConfigurationLoader

*         <br>Time: 20:57:44
*/
public abstract class EventServiceTestCase
{
    public void setUp(EventServiceConfiguration anEventServiceConfiguration) {
        ConfigurationLoader theConfigurationLoader = new CustomConfigurationLoaderTestMode(anEventServiceConfiguration);
        EventServiceConfigurationFactory.getInstance().addCustomConfigurationLoader(theConfigurationLoader);
        FactoryResetService.resetFactory(EventRegistryFactory.class);
        FactoryResetService.resetFactory(DefaultEventExecutorService.class);
        FactoryResetService.resetFactory(UserManagerFactory.class);
        FactoryResetService.resetFactory(ConfigurationDependentFactory.class);
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

    /**
     * Reloads registry data, at the moment from an XML file
     */
    public void reload() throws MiniMeeException {
        ConfigurationLoader configurationLoader = new ConfigurationLoader();
        Configuration configuration = configurationLoader.load();
        if (configuration == null) {
            log.error("An error occurred while reading the properties file.");
            return;
        }
        String home = configuration.getString(MINIMEE_HOME);
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

        tools.add(t);
    }

    public void reload() {
        clear();
        ConfigurationLoader configurationLoader = new ConfigurationLoader();
        Configuration configuration = configurationLoader.load();
        if (configuration == null) {
            log.error("An error occurred while reading the properties file.");
            return;
        }
        String home = configuration.getString(MINIMEE_HOME);
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

    private Map<String, String> loadConfig() {
        if (this.config != null) {
            return this.config;
        }

        ConfigurationLoader configurationLoader = new ConfigurationLoader();
        Configuration configuration = configurationLoader.load();
        if (configuration == null) {
            LOGGER.warn("An error occurred while reading the properties file.");
            return new HashMap<String, String>();
        }
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

      TriggerGenerator triggerGen = new TriggerGenerator();
      List<Trigger> triggers = triggerGen.generateTriggers(user.getEmail(), 24*3600*1000, plan);
     
      if (triggers.size() > 0) {
          try {
              ConfigurationLoader configurationLoader = new ConfigurationLoader();
              Configuration config = configurationLoader.load();
              String watchEndpoint = config.getString("watch.rest.uri");
              String watchUser = config.getString("watch.rest.user");
              String watchPassword = config.getString("watch.rest.password");
           
        final ClientConfig cc = new DefaultClientConfig();
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

                    String userPwd[] = encodedStr.split(":");
                    if ((userPwd != null) &&
                        (userPwd.length == 2) &&
                        StringUtils.isNotEmpty(userPwd[0]) &&
                        StringUtils.isNotEmpty(userPwd[1])) {
                        ConfigurationLoader configurationLoader = new ConfigurationLoader();
                        Configuration config = configurationLoader.load();
                        String path = request.getPreprocessedPath().replaceAll("/", ".").substring(1);
                       
                        String user = config.getString(path + ".rest.user", "");
                        String passwd = config.getString(path + ".rest.pass", "");
                       
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

    /**
     * Initializes the Executor.
     */
    public void init() {
        ConfigurationLoader configurationLoader = new ConfigurationLoader();
        sshConfig = configurationLoader.load();
        commandTimeout = sshConfig.getInt("tavernaserver.ssh.command.timeout");
        tavernaCommand = sshConfig.getString("tavernaserver.ssh.command");

        clear();
    }
View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

    /**
     * Creates a new rest client for myExperiment.
     */
    public MyExperimentRESTClient() {
        ConfigurationLoader configurationLoader = new ConfigurationLoader();
        Configuration config = configurationLoader.load();
        myExperimentUri = config.getString("myexperiment.rest.uri");

        ClientConfig cc = new DefaultClientConfig();
        Client client = Client.create(cc);

View Full Code Here

Examples of eu.scape_project.planning.utils.ConfigurationLoader

    /**
     * Initializes class.
     */
    @PostConstruct
    public void init() {
        ConfigurationLoader configurationLoader = new ConfigurationLoader();

        Configuration config = configurationLoader.load();
        storagePath = config.getString("filestorage.path");

        if (storagePath != null) {
            storagePathFile = new File(storagePath);
            if (!storagePathFile.exists()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.