Package org.rhq.core.domain.configuration

Examples of org.rhq.core.domain.configuration.PropertySimple


        sb.append(columnWidths[0]);
        for (int i = 1; i < columnWidths.length; ++i) {
            sb.append(",");
            sb.append(columnWidths[i]);
        }
        configuration.put(new PropertySimple(CFG_WIDTHS, sb));
    }
View Full Code Here


            //first convert accepts into a List<String>
            List<String> accepts = new ArrayList<String>();
            if (acceptProps != null) {
                for (Property p : acceptProps.getList()) {
                    PropertySimple bundleType = (PropertySimple) p;
                    accepts.add(bundleType.getStringValue());
                }
            }

            //this would be the preferred impl, but GWT thinks otherwise :(
            //if (expectedClass.isAssignableFrom(determinedClass)) {
View Full Code Here

        public List<String> getAcceptedBundleTypes() {
            return acceptedBundleTypes;
        }

        protected void fillPropertyMap(PropertyMap map) {
            map.put(new PropertySimple(BUNDLE_DEST_NAME_NAME, getName()));

            if (getDescription() != null) {
                PropertySimple descriptionProp = new PropertySimple(BUNDLE_DEST_DESCRIPTION_NAME,
                    getDescription());
                map.put(descriptionProp);
            }

            PropertyList accepts = new PropertyList(BUNDLE_DEST_ACCEPTS_LIST_NAME);
            map.put(accepts);
            for (String acc : acceptedBundleTypes) {
                PropertySimple p = new PropertySimple(BUNDLE_DEST_ACCEPTS_LIST_MEMBER_NAME, acc);
                accepts.add(p);
            }
        }
View Full Code Here

        }

        @Override
        protected void fillPropertyMap(PropertyMap map) {
            super.fillPropertyMap(map);
            PropertySimple valueContextProp = new PropertySimple(BUNDLE_DEST_BASE_DIR_VALUE_CONTEXT_NAME,
                getValueContext().name());
            PropertySimple valueNameProp = new PropertySimple(BUNDLE_DEST_BASE_DIR_VALUE_NAME_NAME, getValueName());

            map.put(valueContextProp);
            map.put(valueNameProp);
        }
View Full Code Here

        }

        @Override
        protected void fillPropertyMap(PropertyMap map) {
            super.fillPropertyMap(map);
            map.put(new PropertySimple(BUNDLE_DEST_DEFINITION_CONNECTION_NAME, connectionString));
            PropertyList list = new PropertyList(BUNDLE_DEST_DEFINITION_REF_LIST_NAME);
            map.put(list);

            for (ConfigRef ref : referencedConfiguration) {
                PropertyMap refMap = new PropertyMap(BUNDLE_DEST_DEFINITION_REF_LIST_MEMBER_NAME);
                refMap.put(new PropertySimple(BUNDLE_DEST_DEF_REF_TYPE_NAME, ref.getType().name()));
                refMap.put(new PropertySimple(BUNDLE_DEST_DEF_REF_CONTEXT_NAME, ref.getContext().name()));
                refMap.put(new PropertySimple(BUNDLE_DEST_DEF_REF_NAME_NAME, ref.getName()));
                refMap.put(new PropertySimple(BUNDLE_DEST_DEF_REF_TARGET_NAME_NAME, ref.getTargetName()));
                list.add(refMap);
            }
        }
View Full Code Here

        for (Map.Entry<String, Property> changesEntry : changes.getMap().entrySet()) {
            String changesPropertyName = changesEntry.getKey();
            Property changesProperty = changesEntry.getValue();

            if (changesProperty instanceof PropertySimple) {
                PropertySimple changesPropertySimple = (PropertySimple) changesProperty;

                if ((changesPropertySimple.getOverride() == null) || (!changesPropertySimple.getOverride())) {
                    continue;
                }

                PropertySimple basePropertySimple = (PropertySimple) base.get(changesPropertyName);
                if (basePropertySimple == null) {
                    basePropertySimple = new PropertySimple(changesPropertyName, changesPropertySimple.getStringValue());
                    base.put(basePropertySimple);
                } else {
                    basePropertySimple.setStringValue(changesPropertySimple.getStringValue());
                }
            } else if (changesProperty instanceof PropertyMap) {
                PropertyMap changesPropertyMap = (PropertyMap) changesProperty;
                PropertyMap basePropertyMap = (PropertyMap) base.get(changesPropertyName);
                if (basePropertyMap == null) {
View Full Code Here

    private void setNameProperty(String name) {
        if (name == null) {
            throw new IllegalArgumentException("name is null");
        }
        configuration.put(new PropertySimple(DriftConfigurationDefinition.PROP_NAME, name));
    }
View Full Code Here

    private String getDescriptionProperty() {
        return configuration.getSimpleValue(DriftConfigurationDefinition.PROP_DESCRIPTION, null);
    }

    private void setDescriptionProperty(String description) {
        configuration.put(new PropertySimple(DriftConfigurationDefinition.PROP_DESCRIPTION, description));
    }
View Full Code Here

        String valueContext = basedir.getValueContext().name();
        String valueName = basedir.getValueName();

        PropertyMap basedirMap = new PropertyMap(DriftConfigurationDefinition.PROP_BASEDIR);
        basedirMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_BASEDIR_VALUECONTEXT, valueContext));
        basedirMap.put(new PropertySimple(DriftConfigurationDefinition.PROP_BASEDIR_VALUENAME, StringUtils
            .useForwardSlash(valueName)));

        configuration.put(basedirMap);
    }
View Full Code Here

        return Long.parseLong(configuration.getSimpleValue(DriftConfigurationDefinition.PROP_INTERVAL,
            String.valueOf(DriftConfigurationDefinition.DEFAULT_INTERVAL)));
    }

    private void setIntervalProperty(Long interval) {
        configuration.put(new PropertySimple(DriftConfigurationDefinition.PROP_INTERVAL, interval.toString()));
    }
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.PropertySimple

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.