Examples of PropertySource


Examples of org.impalaframework.config.PropertySource

    /**
     * Returns {@link Properties} instance held by {@link Properties} holder.
     * Otherwise, returns empty {@link Properties} instance.
     */
    public Object getObject() throws Exception {
        PropertySource source = PropertySourceHolder.getInstance().getPropertySource();
       
        if (source != null) {  
            if (logger.isDebugEnabled()) {
                logger.debug("Returning PropertySource bound to PropertySourceHolder singleton: " + source);
            }
View Full Code Here

Examples of org.impalaframework.config.PropertySource

            this.invalidate();
        }
    }

    boolean getPreserveSession() {
        final PropertySource propertySource = PropertySourceHolder.getInstance().getPropertySource();
        if (propertySource == null) return true;
        BooleanPropertyValue preserveSessionOnReloadFailure = new BooleanPropertyValue(propertySource, WebBootstrapProperties.PRESERVE_SESSION_ON_RELOAD_FAILURE, true);
       
        final boolean preserveSession = preserveSessionOnReloadFailure.getValue();
        return preserveSession;
View Full Code Here

Examples of org.impalaframework.config.PropertySource

  /**
   * Returns {@link Properties} instance held by {@link Properties} holder.
   * Otherwise, returns empty {@link Properties} instance.
   */
  public Object getObject() throws Exception {
    PropertySource source = PropertySourceHolder.getInstance().getPropertySource();
   
    if (source != null) { 
      if (logger.isDebugEnabled()) {
        logger.debug("Returning PropertySource bound to PropertySourceHolder singleton: " + source);
      }
View Full Code Here

Examples of org.impalaframework.config.PropertySource

    /**
     * Returns {@link Properties} instance held by {@link Properties} holder.
     * Otherwise, returns empty {@link Properties} instance.
     */
    public Object getObject() throws Exception {
        PropertySource source = PropertySourceHolder.getInstance().getPropertySource();
       
        if (source != null) {  
            if (logger.isDebugEnabled()) {
                logger.debug("Returning PropertySource bound to PropertySourceHolder singleton: " + source);
            }
View Full Code Here

Examples of org.impalaframework.config.PropertySource

      this.invalidate();
    }
  }

  boolean getPreserveSession() {
    final PropertySource propertySource = PropertySourceHolder.getInstance().getPropertySource();
    if (propertySource == null) return true;
    BooleanPropertyValue preserveSessionOnReloadFailure = new BooleanPropertyValue(propertySource, WebBootstrapProperties.PRESERVE_SESSION_ON_RELOAD_FAILURE, true);
   
    final boolean preserveSession = preserveSessionOnReloadFailure.getValue();
    return preserveSession;
View Full Code Here

Examples of org.impalaframework.config.PropertySource

    /**
     * Returns {@link Properties} instance held by {@link Properties} holder.
     * Otherwise, returns empty {@link Properties} instance.
     */
    public PropertySource getObject() throws Exception {
        PropertySource source = PropertySourceHolder.getInstance().getPropertySource();
       
        if (source != null) {  
            if (logger.isDebugEnabled()) {
                logger.debug("Returning PropertySource bound to PropertySourceHolder singleton: " + source);
            }
View Full Code Here

Examples of org.impalaframework.config.PropertySource

   
   
    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

Examples of org.impalaframework.config.PropertySource

            this.invalidate();
        }
    }

    boolean getPreserveSession() {
        final PropertySource propertySource = PropertySourceHolder.getInstance().getPropertySource();
        if (propertySource == null) return true;
        BooleanPropertyValue preserveSessionOnReloadFailure = new BooleanPropertyValue(propertySource, WebBootstrapProperties.PRESERVE_SESSION_ON_RELOAD_FAILURE, true);
       
        final boolean preserveSession = preserveSessionOnReloadFailure.getValue();
        return preserveSession;
View Full Code Here

Examples of org.springframework.core.env.PropertySource

    @Test
    public void test() throws IOException {
        Map<String, Object> map = new HashMap<>();
        map.put("encoding", "gbk");
        PropertySource propertySource1 = new MapPropertySource("map", map);
        System.out.println(propertySource1.getProperty("encoding"));

        ResourcePropertySource propertySource2 = new ResourcePropertySource("resource", "classpath:resources.properties");
        System.out.println(propertySource2.getProperty("encoding"));
    }
View Full Code Here

Examples of org.springframework.core.env.PropertySource

    @Test
    public void test2() throws IOException {

        Map<String, Object> map = new HashMap<>();
        map.put("encoding", "gbk");
        PropertySource propertySource1 = new MapPropertySource("map", map);

        ResourcePropertySource propertySource2 = new ResourcePropertySource("resource", "classpath:resources.properties");

        CompositePropertySource compositePropertySource = new CompositePropertySource("composite");
        compositePropertySource.addPropertySource(propertySource1);
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.