Package org.rhq.core.domain.configuration.definition

Examples of org.rhq.core.domain.configuration.definition.PropertyDefinition


    public void updateList(PropertyDefinitionList propDef, Property prop, AugeasNode listNode, int seq)
        throws AugeasRhqException {

        PropertyList listProperty = null;
        PropertyDefinition childDefinition = propDef.getMemberDefinition();

        if (prop instanceof PropertyList) {
            PropertyList lst = (PropertyList) prop;
            listProperty = (PropertyList) lst.getList().get(seq - 1);
        }
View Full Code Here


                  // Note this is all pretty much copied from ConfigurationWriteDelegate.prepareSimplePropertyMap
                  Map<String,PropertyDefinition> memberDefinitions = propertyDefinition.getMap();

                  Map<String,Object> results = new HashMap<String,Object>();
                  for (String name : memberDefinitions.keySet()) {
                     PropertyDefinition memberDefinition = memberDefinitions.get(name);

                     if (memberDefinition instanceof PropertyDefinitionSimple) {
                        PropertyDefinitionSimple pds = (PropertyDefinitionSimple) memberDefinition;
                        PropertySimple ps = (PropertySimple) property.get(name);
                        if ((ps==null || ps.getStringValue()==null ) && !pds.isRequired())
                           continue;
                        if (ps!=null)
                           results.put(name,ps.getStringValue());
                     }
                     // This is added since it isn't supported already.
                     // Should be merged with https://github.com/rhq-project/rhq/pull/128
                     else if (memberDefinition instanceof PropertyDefinitionMap) {
                        PropertyDefinitionMap pdm = (PropertyDefinitionMap) memberDefinition;
                        PropertyMap pm = (PropertyMap) property.get(name);
                        if ((pm==null || pm.getMap().isEmpty()) && !pdm.isRequired())
                           continue;
                        if (pm != null) {
                           Map<String, Object> innerMap = prepareSimplePropertyMap(pm, pdm);
                           results.put(name, innerMap);
                        }
                     }
                     else {
                        log.error(" *** not yet supported *** : " + memberDefinition.getName());
                     }
                  }
                  return results;
               }
            };
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.configuration.definition.PropertyDefinition

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.