Package com.sun.grid.jgdi.configuration

Examples of com.sun.grid.jgdi.configuration.ConfigurationElement


        } else if (key instanceof DefaultMapListPropertyDescriptor) {
            updateMapListProperty(jgdi, obj, (DefaultMapListPropertyDescriptor) key, values);
        //For CONFIGURATION objects
        } else if (obj instanceof Configuration && key instanceof String) {
            Configuration c = (Configuration) obj;
            ConfigurationElement ce = new ConfigurationElementImpl();
            ce.setName((String) key);
            //TODO LP: Find out expected behaviour! Can values contain list of ConfigElems?
            ce.setValue(values.trim());
            c.addEntries(ce);
            //TODO LP: Need to exit if we get can't resolve hostname. Otherwise we get stacktrace for each element.
            //Also if should be reworked to return correct error code (1).
            jgdi.updateConfiguration(c);
        } else {
View Full Code Here


        //CONFIGURATION
        if (obj instanceof Configuration) {
            String name = EditorUtil.java2cName(obj, pd.getPropertyName());
            if (name.equals("entries")) {
                Iterator iter = ((Configuration) obj).getEntriesList().iterator();
                ConfigurationElement elem = null;
                while (iter.hasNext()) {
                    elem = (ConfigurationElement) iter.next();
                    switch (type) {
                        case ELEMENT_NAME:
                            list.add(elem.getName());
                            break;
                        case ELEMENT_VALUE:
                            list.add(elem.getValue());
                            break;
                        default:
                            throw new IllegalArgumentException("Invalid element type: " + type + "!");
                    }
                }
View Full Code Here

TOP

Related Classes of com.sun.grid.jgdi.configuration.ConfigurationElement

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.