Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.MapConfiguration


    /**
     * Create a RexsterClient instance allowing override of all settings.
     */
    public static RexsterClient open(final Map<String,Object> configuration) throws Exception {
        return open(new MapConfiguration(configuration));
    }
View Full Code Here


    propConfig.setReloadingStrategy(fileChangedReloadingStrategy);
    compositeConfig.addConfiguration(propConfig);
   
    // Properties from the persistence layer (must first initialize the entityManagerFactory).
    PersistenceManager.initializeEntityManagerFactory(propConfig.getString(Property.JUDDI_PERSISTENCEUNIT_NAME));
    MapConfiguration persistentConfig = new MapConfiguration(getPersistentConfiguration(compositeConfig));
   
    compositeConfig.addConfiguration(persistentConfig);
    //Making the new configuration globally accessible.
    config = compositeConfig;
  }
View Full Code Here

     *                      via MapConfiguration and passed to the appropriate overload.
     *
     * @return A Graph instance.
     */
    public static Graph open(final Map configuration) {
        return open(new MapConfiguration(configuration));
    }
View Full Code Here

    }

    public SenseiServerBuilder(File confDir, Map<String, Object> properties) throws Exception {
        if (properties != null) {
            _senseiConfFile = null;
            _senseiConf = new MapConfiguration(properties);
            ((MapConfiguration) _senseiConf).setDelimiterParsingDisabled(true);
        } else {
            _senseiConfFile = new File(confDir, SENSEI_PROPERTIES);
            if (!_senseiConfFile.exists()) {
                throw new ConfigurationException("configuration file: " + _senseiConfFile.getAbsolutePath() + " does not exist.");
View Full Code Here


    public SenseiServerBuilder(Resource confDir, Map<String, Object> properties) throws Exception {
        _senseiConfFile = null;

        _senseiConf = new MapConfiguration(properties);
        ((MapConfiguration) _senseiConf).setDelimiterParsingDisabled(true);

        pluginRegistry = SenseiPluginRegistry.build(_senseiConf);
        pluginRegistry.start();
View Full Code Here

      logger.warn("Old client or json error", jse);

      // Fall back to the old REST API.  In the future, we should
      // consider reporting JSON exceptions here.
      requestContext.senseiReq = DefaultSenseiJSONServlet.convertSenseiRequest(
                    new DataConfiguration(new MapConfiguration(getParameters(requestContext.content))));
      requestContext.query = requestContext.content;
    }
    return requestContext;
  }
View Full Code Here

        QSWorker worker = workers.get(task.handler);
        if (worker == null) {
            throw new RuntimeException("No worker available for handler identifier: " + task.handler);
        }

        return worker.undertake(new MapConfiguration(task.params), new QSTaskLoggerDelegate(task));
    }
View Full Code Here

    private MessageStore _messageStore;
    private VirtualHost _vHost;

    public TestApplicationRegistry()
    {
        super(new MapConfiguration(new HashMap()));
    }
View Full Code Here

        }
        else if (value instanceof Map)
        {
            // display a Map as a dictionary
            Map<String, Object> map = transformMap((Map<?, ?>) value);
            printValue(out, indentLevel, new MapConfiguration(map));
        }
        else if (value instanceof byte[])
        {
            String base64 = new String(Base64.encodeBase64((byte[]) value));
            out.println(padding + "<data>" + StringEscapeUtils.escapeXml(base64) + "</data>");
View Full Code Here

        }
        else if (value instanceof Map)
        {
            // display a Map as a dictionary
            Map<String, Object> map = transformMap((Map<?, ?>) value);
            printValue(out, indentLevel, new MapConfiguration(map));
        }
        else if (value instanceof byte[])
        {
            out.print("<" + new String(Hex.encodeHex((byte[]) value)) + ">");
        }
View Full Code Here

TOP

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

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.