Examples of ChainedProperties


Examples of org.drools.util.ChainedProperties

    }

    @Test
    public void testIgnoreDefaults() {
        // check standard chained properties, that includes defaults
        ChainedProperties chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                                     getClass().getClassLoader(),
                                                                     true );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                      null ) );


        // now check that chained properties can ignore defaults
        chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                   getClass().getClassLoader(),
                                                   false );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                   null ) );


        // now check it can find defaults again.
        chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                   getClass().getClassLoader(),
                                                   true );
        //System.out.println( chainedProperties.getProperty( "drools.dialect.java.compiler",
        //                                                   null ) );
        assertNotNull( chainedProperties.getProperty( "drools.dialect.java.compiler",
                                                      null ) );
    }
View Full Code Here

Examples of org.drools.util.ChainedProperties

    private void init(ClassLoader classLoader,
                      Properties properties) {
        setClassLoader( classLoader );

        this.chainedProperties = new ChainedProperties( "packagebuilder.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
View Full Code Here

Examples of org.drools.util.ChainedProperties

        }
        return instance;
    }

    SendIcal() {
        ChainedProperties conf = new ChainedProperties( "drools.email.conf",ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
        String host = conf.getProperty( "mail.smtp.host",
                                        "localhost" );
        String port = conf.getProperty( "mail.smtp.port",
                                        "25" );

        connection = new Properties();
        connection.setProperty( "mail.transport.protocol",
                                "smtp" );

        if ( host != null && host.trim().length() > 0 ) {
            connection.setProperty( "mail.smtp.host",
                                    host );
        }
        if ( port != null && port.trim().length() > 0 ) {
            connection.setProperty( "mail.smtp.port",
                                    port );
        }

        defaultLanguage = conf.getProperty( "defaultLanguage",
                                            "en-UK" );
    }
View Full Code Here

Examples of org.drools.util.ChainedProperties

    }
   
    public DefaultEscalatedDeadlineHandler() {
        handler = new EmailWorkItemHandler();
       
        ChainedProperties conf = new ChainedProperties("drools.email.conf",  ClassLoaderUtil.getClassLoader( null, getClass(), false ) );
        String host = conf.getProperty( "host", null );
        String port = conf.getProperty( "port", "25" );
       
        from = conf.getProperty( "from", null );
        replyTo = conf.getProperty( "replyTo", null );
       
        handler.setConnection( host, port, null, null );
    }
View Full Code Here

Examples of org.drools.util.ChainedProperties

                      ClassLoader... classLoaders) {
        this.immutable = false;

        setClassLoader( classLoaders );

        this.chainedProperties = new ChainedProperties( "rulebase.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
View Full Code Here

Examples of org.drools.util.ChainedProperties

        this.classLoader = ClassLoaderUtil.getClassLoader( classLoader,
                                                           getClass(),
                                                           false );

        this.immutable = false;
        this.chainedProperties = new ChainedProperties( "session.conf",
                                                        this.classLoader );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
        }
View Full Code Here

Examples of org.drools.util.ChainedProperties

                      ClassLoader... classLoaders) {
        this.immutable = false;

        setClassLoader( classLoaders );

        this.chainedProperties = new ChainedProperties( "knowledgeagent.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
View Full Code Here

Examples of org.drools.util.ChainedProperties

        this.classLoader = ClassLoaderUtil.getClassLoader( classLoader,
                                                           getClass(),
                                                           false );

        this.immutable = false;
        this.chainedProperties = new ChainedProperties( "session.conf",
                                                        this.classLoader );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
        }
View Full Code Here

Examples of org.drools.util.ChainedProperties

                      ClassLoader... classLoaders) {
        this.immutable = false;

        setClassLoader( classLoaders );

        this.chainedProperties = new ChainedProperties( "rulebase.conf",
                                                        this.classLoader,
                                                        true );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
View Full Code Here

Examples of org.drools.util.ChainedProperties

            this.classLoader = Thread.currentThread().getContextClassLoader();
        } else {
            this.classLoader = this.getClass().getClassLoader();
        }

        this.chainedProperties = new ChainedProperties( "rulebase.conf" );

        if ( properties != null ) {
            this.chainedProperties.addProperties( properties );
        }
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.