Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.MapConfiguration


            return new AppletConfiguration(applet);
        }
        else
        {
            return new MapConfiguration(parameters);
        }
    }
View Full Code Here


        }
        else if (value instanceof Map)
        {
            // display a Map as a dictionary
            Map map = (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 map = (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 map = (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

    /**
     * Test the modification of a configuration property stored internally as an array.
     */
    public void testSetArrayValue()
    {
        MapConfiguration configuration = new MapConfiguration(new HashMap());
        configuration.getMap().put("objectArray", new Object[] {"value1", "value2", "value3"});

        ConfigurationDynaBean bean = new ConfigurationDynaBean(configuration);

        bean.set("objectArray", 1, "New Value 1");
        Object value = bean.get("objectArray", 1);
View Full Code Here

     * @param configuration A {@link java.util.Map} based configuration that will be converted to an {@link org.apache.commons.configuration.Configuration} object
     *                      via {@link org.apache.commons.configuration.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

    private MessageStore _messageStore;
    private VirtualHost _vHost;

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

    return instance.getConnector(user, new PasswordToken(passwd));
  }

  @Override
  public ClientConfiguration getClientConfig() {
    return new ClientConfiguration(Arrays.asList(new MapConfiguration(config.getSiteConfig()))).withInstance(this.getInstanceName()).withZkHosts(
        this.getZooKeepers());
  }
View Full Code Here

        properties.put("hibernate.dialect",propConfig.getString(Property.HIBERNATE_DIALECT));
    }
    // initialize the entityManagerFactory.
    PersistenceManager.initializeEntityManagerFactory(propConfig.getString(Property.JUDDI_PERSISTENCEUNIT_NAME), properties);
    // Properties from the persistence layer
    MapConfiguration persistentConfig = new MapConfiguration(getPersistentConfiguration(compositeConfig));
   
    compositeConfig.addConfiguration(persistentConfig);
    //Making the new configuration globally accessible.
    config = compositeConfig;
  }
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

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.