Package org.jconfig

Examples of org.jconfig.VariableManager


            inputStream = locator.getInputStream();
            if ( inputStream == null ) {
                ErrorReporter.getErrorHandler().reportError("Cannot find the properties file");               
            }
            else {
                VariableManager varman = VariableManager.getInstance();
                Properties myProperties = new Properties();
                myProperties.load(inputStream);
                Enumeration propertyNames = myProperties.propertyNames();
                while (propertyNames.hasMoreElements()) {
                    String name = (String) propertyNames.nextElement();
                    String value = myProperties.getProperty(name);                   
                    varman.addIncludedVariable(name,value, configName);
                }
            }
        } catch (Exception e) {           
            ErrorReporter.getErrorHandler().reportError("The file cannot be loaded",e);       
        }
View Full Code Here


    if ( configuration.getBaseConfiguration() != null ) {
      buffer.append("extends : ");
      buffer.append(configuration.getBaseConfiguration());
      buffer.append("\n\n");
    }
    VariableManager vm = VariableManager.getInstance();
        Iterator it = vm.getVariables(configuration.getConfigName()).keySet().iterator();
        boolean vars = false;
        if (it.hasNext()) {
            buffer.append("variables:\n");
            vars = true;
        }
        while (it.hasNext()) {
            String varName = (String) it.next();
            String varText = (String) vm.getVariables(configuration.getConfigName()).get(varName);
      buffer.append("\t");
            buffer.append(varName);
            buffer.append(" : ");
            buffer.append(varText);
            buffer.append("\n");
View Full Code Here

TOP

Related Classes of org.jconfig.VariableManager

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.