Package com.adito.properties

Examples of com.adito.properties.PropertyItem


        // Set the properties
        String oldVal, newVal;
        PropertyDefinition def;
        for (Iterator i = f.storedItems(); i.hasNext();) {
            PropertyItem item = (PropertyItem) i.next();
            def = item.getDefinition();
            newVal = String.valueOf(item.getPropertyValue());
            if (log.isDebugEnabled())
                log.debug("Setting '" + def.getName() + "' to '" + newVal + "'");
            oldVal = Property.setProperty(createKey(def, f, sessionInfo), newVal, sessionInfo);
            if ((oldVal == null && newVal != null) || !oldVal.equals(newVal)) {
                if (def.isRestartRequired()) {
View Full Code Here


    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        if (isCommiting()) {
            ActionErrors errs = null;
            storeItems();
            for (Iterator i = storedItems(); i.hasNext();) {
                PropertyItem item = (PropertyItem) i.next();
                PropertyDefinition def = item.getDefinition();
                try {
                    Object propertyValue = item.getPropertyValue();
                    if (propertyValue instanceof String) {
                        propertyValue = String.valueOf(propertyValue).trim();
                        item.setValue(propertyValue);
                    }
                    def.validate(String.valueOf(propertyValue), getClass().getClassLoader());
                } catch (CoreException ce) {
                    ce.getBundleActionMessage().setArg3(
                        CoreUtil.getMessageResources(request.getSession(), def.getMessageResourcesKey()).getMessage(
View Full Code Here

TOP

Related Classes of com.adito.properties.PropertyItem

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.