Package org.jnode.configure.PropertySet

Examples of org.jnode.configure.PropertySet.Property


        String valueIsNotStr = element.getAttribute(VALUE_IS_NOT, null);

        Value valueIs = null;
        Value valueIsNot = null;
        if (guardPropName != null) {
            Property guardProp = script.getProperty(guardPropName);
            if (guardProp == null) {
                error("A guard property '" + guardPropName + "' not declared", element);
            }
            if (valueIsStr != null && valueIsNotStr != null) {
                error("The '" + VALUE_IS + "' and '" + VALUE_IS_NOT +
                        "' attributes cannot be used together", element);
            }
            PropertyType type = guardProp.getType();
            if (valueIsStr != null) {
                valueIs = type.fromValue(valueIsStr);
                if (valueIs == null) {
                    error("The string '" + valueIsStr + "' is not a valid " + type.getTypeName() +
                            " instance", element);
View Full Code Here


                }
            }
        }
        for (Object key : properties.keySet()) {
            String value = (String) properties.get(key);
            Property prop = propSet.getProperty((String) key);
            if (prop != null) {
                PropertySet.Value defaultValue = prop.getType().fromValue(value);
                configure.debug("Setting default value for " + key + " to " +
                        (defaultValue == null ? "null" : defaultValue.toString()));
                prop.setDefaultValue(defaultValue);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.configure.PropertySet.Property

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.