Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.PropertiesConfiguration.load()


                if (!propsFile.isFile())
                {
                    throw new IOException("Jetspeed properties not found: "+propsFile.getAbsolutePath());
                }
                File jetspeedPropertiesPath = propsFile.getParentFile();
                properties.load(propsFile);
                propsFile = new File(jetspeedPropertiesPath,OVERRIDE_PROPERTIES);
                if (propsFile.exists())
                {
                    PropertiesConfiguration extraProps = new PropertiesConfiguration();
                    extraProps.load(propsFile);
View Full Code Here


                properties.load(propsFile);
                propsFile = new File(jetspeedPropertiesPath,OVERRIDE_PROPERTIES);
                if (propsFile.exists())
                {
                    PropertiesConfiguration extraProps = new PropertiesConfiguration();
                    extraProps.load(propsFile);
                    ConfigurationUtils.copy(extraProps,properties);
                }
                propsFile = new File(jetspeedPropertiesPath,SPRING_FILTER_KEY_PROPERTIES);
                if (propsFile.exists())
                {
View Full Code Here

                }
                propsFile = new File(jetspeedPropertiesPath,SPRING_FILTER_KEY_PROPERTIES);
                if (propsFile.exists())
                {
                    PropertiesConfiguration extraProps = new PropertiesConfiguration();
                    extraProps.load(propsFile);
                    Object springFilterKey = extraProps.getProperty(SPRING_FILTER_KEY);
                    if (springFilterKey != null)
                    {
                        properties.setProperty(SPRING_FILTER_KEY, springFilterKey);
                    }
View Full Code Here

                return null;
            }
            else
            {
                PropertiesConfiguration configuration = new PropertiesConfiguration();
                configuration.load(stream);
                return configuration;
            }
        }
        catch (Exception e1)
        {
View Full Code Here

        jndiDS = new JetspeedTestJNDIComponent();
        jndiDS.setup();

       
        PropertiesConfiguration config = new PropertiesConfiguration();
        config.load(new FileInputStream(baseDir+PortalTestConstants.JETSPEED_PROPERTIES_PATH));
               
        String appRoot = baseDir+PortalTestConstants.JETSPEED_APPLICATION_ROOT;
       
        MockServletConfig servletConfig = new MockServletConfig();       
        ResourceLocatingServletContext servletContent = new ResourceLocatingServletContext(new File(appRoot));       
View Full Code Here

                    PropertiesConfiguration config = this;
                    if (i > 0)
                    {
                        config = new PropertiesConfiguration();
                    }
                    config.load(is);
                    if (i > 0)
                    {
                        ConfigurationUtils.copy(config,this);
                        config.clear();
                    }
View Full Code Here

        {
            InputStream is = new FileInputStream(configLocation);
            config.load(is);
            is.close();
            InputStream tis = new FileInputStream(ttsLocation);
            tconfig.load(tis);
            tis.close();           
            MultiFacetedAuthentication mfa = new MultiFacetedAuthenticationImpl(config, tconfig);
            MFA.setInstance(mfa);
        }
        catch (Exception e)
View Full Code Here

   
    InputStream propertiesInputStream = getSystemPropertiesInputStream(servletContext);

    if (propertiesInputStream != null) {
      PropertiesConfiguration properties = new PropertiesConfiguration();
      properties.load(propertiesInputStream);
     
      // TODO: put other useful properties
      properties.setProperty("user.home", System.getProperty("user.home"));
      if(!properties.containsKey("siteUrl")) {
        properties.setProperty("siteUrl", servletContext.getContextPath());
View Full Code Here

                if (!propsFile.isFile())
                {
                    throw new IOException("Jetspeed properties not found: "+propsFile.getAbsolutePath());
                }
                File jetspeedPropertiesPath = propsFile.getParentFile();
                properties.load(propsFile);
                propsFile = new File(jetspeedPropertiesPath,OVERRIDE_PROPERTIES);
                if (propsFile.exists())
                {
                    PropertiesConfiguration extraProps = new PropertiesConfiguration();
                    extraProps.load(propsFile);
View Full Code Here

                properties.load(propsFile);
                propsFile = new File(jetspeedPropertiesPath,OVERRIDE_PROPERTIES);
                if (propsFile.exists())
                {
                    PropertiesConfiguration extraProps = new PropertiesConfiguration();
                    extraProps.load(propsFile);
                    ConfigurationUtils.copy(extraProps,properties);
                }
                propsFile = new File(jetspeedPropertiesPath,SPRING_FILTER_KEY_PROPERTIES);
                if (propsFile.exists())
                {
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.