Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.XMLConfiguration.addProperty()


    {
        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("timeunit", TimeUnit.SECONDS.toString());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        try
View Full Code Here


        SlowConsumerDetectionConfiguration config = new SlowConsumerDetectionConfiguration();

        String TIMEUNIT = "foo";
        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("delay", "10");
        xmlconfig.addProperty("timeunit", TIMEUNIT);

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
View Full Code Here

        String TIMEUNIT = "foo";
        XMLConfiguration xmlconfig = new XMLConfiguration();

        xmlconfig.addProperty("delay", "10");
        xmlconfig.addProperty("timeunit", TIMEUNIT);

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        try
View Full Code Here

    private ConfigurationPlugin getPlainDatabaseConfig() throws ConfigurationException
    {
        final ConfigurationPlugin config = new PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("pd-auth-manager.principal-database.class", PlainPasswordFilePrincipalDatabase.class.getName());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        config.setConfiguration("security", xmlconfig);
View Full Code Here

    private ConfigurationPlugin getPlainDatabaseConfig() throws ConfigurationException
    {
        final ConfigurationPlugin config = new PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("pd-auth-manager.principal-database.class", PlainPasswordFilePrincipalDatabase.class.getName());

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
        config.setConfiguration("security", xmlconfig);
View Full Code Here

    private ConfigurationPlugin getConfig(final String clazz, final String argName, final String argValue) throws Exception
    {
        final ConfigurationPlugin config = new PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration();

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("pd-auth-manager.principal-database.class", clazz);

        if (argName != null)
        {
            xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.name", argName);
            xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.value", argValue);
View Full Code Here

        XMLConfiguration xmlconfig = new XMLConfiguration();
        xmlconfig.addProperty("pd-auth-manager.principal-database.class", clazz);

        if (argName != null)
        {
            xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.name", argName);
            xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.value", argValue);
        }

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
View Full Code Here

        xmlconfig.addProperty("pd-auth-manager.principal-database.class", clazz);

        if (argName != null)
        {
            xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.name", argName);
            xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.value", argValue);
        }

        // Create a CompositeConfiguration as this is what the broker uses
        CompositeConfiguration composite = new CompositeConfiguration();
        composite.addConfiguration(xmlconfig);
View Full Code Here

    {
        // Test does not directly use the AppRegistry but the configured broker
        // is required for the correct ConfigurationPlugin processing
        super.setUp();
        XMLConfiguration xmlConfig = new XMLConfiguration();
        xmlConfig.addProperty("base.element[@property]", "property");
        xmlConfig.addProperty("base.element.name", "name");
        // We make these strings as that is how they will be read from the file.
        xmlConfig.addProperty("base.element.positiveLong", String.valueOf(POSITIVE_LONG));
        xmlConfig.addProperty("base.element.negativeLong", String.valueOf(NEGATIVE_LONG));
        xmlConfig.addProperty("base.element.boolean", String.valueOf(true));
View Full Code Here

        // Test does not directly use the AppRegistry but the configured broker
        // is required for the correct ConfigurationPlugin processing
        super.setUp();
        XMLConfiguration xmlConfig = new XMLConfiguration();
        xmlConfig.addProperty("base.element[@property]", "property");
        xmlConfig.addProperty("base.element.name", "name");
        // We make these strings as that is how they will be read from the file.
        xmlConfig.addProperty("base.element.positiveLong", String.valueOf(POSITIVE_LONG));
        xmlConfig.addProperty("base.element.negativeLong", String.valueOf(NEGATIVE_LONG));
        xmlConfig.addProperty("base.element.boolean", String.valueOf(true));
        xmlConfig.addProperty("base.element.double", String.valueOf(DOUBLE));
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.