Package org.impalaframework.config

Examples of org.impalaframework.config.StaticPropertiesPropertySource


       
        if (logger.isDebugEnabled()) {
            logger.debug("No PropertySource bound to PropertySourceHolder singleton");
        }
       
        return new StaticPropertiesPropertySource(new Properties());
    }
View Full Code Here


       
        //property value sought first in system property
        propertySources.add(new SystemPropertiesPropertySource());
       
        //then in impala properties file
        propertySources.add(new StaticPropertiesPropertySource(properties));
       
        //then as servlet context init param
        propertySources.add(new ServletContextPropertySource(servletContext));
        return propertySources;
    }
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        factoryBean = new PropertySourceValueFactoryBean();
        properties = new Properties();
        propertySource = new StaticPropertiesPropertySource(properties);
        factoryBean.setPropertySource(propertySource);
        factoryBean.setName("name");
    }
View Full Code Here

        assertEquals(10.2F, bean.getFloatValue());
        assertEquals(100, bean.getIntValue());
        assertEquals(2010L, bean.getLongValue());
        assertEquals("Phil", bean.getStringValue());
       
        StaticPropertiesPropertySource propertySource = (StaticPropertiesPropertySource) context.getBean("propertySource");
        final Properties properties = propertySource.getProperties();
        properties.setProperty("string.property", "Phil Z");
       
        //check that this updates
        assertEquals("Phil Z", bean.getStringValue());
       
View Full Code Here

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        resolver = new SimpleContextLocationResolver();
        propertySource = new StaticPropertiesPropertySource();
        properties = new Properties();
        propertySource.setProperties(properties);
        configSettings = new ConfigurationSettings();
    }
View Full Code Here

    public void testBasicMethods() throws Exception {
        PropertySourceHolderFactoryBean bean = new PropertySourceHolderFactoryBean();
        assertEquals(PropertySource.class, bean.getObjectType());
        assertEquals(true, bean.isSingleton());
        assertTrue(bean.getObject() instanceof StaticPropertiesPropertySource);
        StaticPropertiesPropertySource source = (StaticPropertiesPropertySource) bean.getObject();
        assertTrue(source.getProperties().isEmpty());
    }
View Full Code Here

        assertTrue(source.getProperties().isEmpty());
    }

    public void testSetProperties() throws Exception {
        final Properties properties = new Properties();
        PropertySourceHolder.getInstance().setPropertySource(new StaticPropertiesPropertySource(properties));
       
        PropertySourceHolderFactoryBean bean = new PropertySourceHolderFactoryBean();

        assertTrue(bean.getObject() instanceof StaticPropertiesPropertySource);
        StaticPropertiesPropertySource source = (StaticPropertiesPropertySource) bean.getObject();
        assertEquals(properties, source.getProperties());
    }
View Full Code Here

       
        //property value sought first in system property
        propertySources.add(new SystemPropertiesPropertySource());
       
        //then in impala properties file
        propertySources.add(new StaticPropertiesPropertySource(properties));
       
        return propertySources;
    }
View Full Code Here

       
        if (logger.isDebugEnabled()) {
            logger.debug("No PropertySource bound to PropertySourceHolder singleton");
        }
       
        return new StaticPropertiesPropertySource(new Properties());
    }
View Full Code Here

   
   
    public void testGetAttributeWrappingWithSessionNoPreserved() {
        Properties properties = new Properties();
        properties.setProperty(WebBootstrapProperties.PRESERVE_SESSION_ON_RELOAD_FAILURE, "false");
        PropertySource source = new StaticPropertiesPropertySource(properties);
       
        PropertySourceHolder.getInstance().setPropertySource(source);
       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
View Full Code Here

TOP

Related Classes of org.impalaframework.config.StaticPropertiesPropertySource

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.