private static Collection<PropertyDefinition> getPropertyDefinitions( ConfigurationDefinition configurationDefinition, String groupName) { return (groupName != null) ? configurationDefinition.getPropertiesInGroup(groupName) : configurationDefinition .getNonGroupedProperties(); } }
protected CompositeOperation updateGenerateOperationFromProperties(Configuration conf, Address address) { CompositeOperation cop = new CompositeOperation(); for (PropertyDefinition propDef : configurationDefinition.getNonGroupedProperties()) { updateProperty(conf, cop, propDef, address);
ConfigurationDefinition paramDefinition = opDef.getParametersConfigurationDefinition(); if (paramDefinition != null) { for (PropertyDefinition propDefs : paramDefinition.getNonGroupedProperties()) { // TODO extend to all properties ? operationRest.getParams().put(propDefs.getName(),"TODO"); // TODO type and value of the value
List<PropertyDefinition> existingPropertyDefinitions = existingDefinition.getNonGroupedProperties(); List<PropertyDefinition> newPropertyDefinitions = newDefinition.getNonGroupedProperties(); if (existingPropertyDefinitions != null) { for (PropertyDefinition newProperty : newPropertyDefinitions) {
/** * Trigger loading of a configuration by talking to the remote resource. * @return The initialized configuration * @throws Exception If anything goes wrong. */ public Configuration loadResourceConfiguration() throws Exception { Configuration config = new Configuration(); /* * Grouped definitions get a special treatment, as they may have a special property * that will be evaluated to look at a child resource or a special attribute or such */ List<PropertyGroupDefinition> gdef = configurationDefinition.getGroupDefinitions(); for (PropertyGroupDefinition pgDef : gdef) { loadHandleGroup(config, pgDef); } /* * Now handle the non-grouped properties */ List<PropertyDefinition> nonGroupdedDefs = configurationDefinition.getNonGroupedProperties(); Operation op = new ReadResource(address); if (includeRuntime) { op.addAdditionalProperty("include-runtime", "true"); // Include runtime values for attributes } // op.addAdditionalProperty("recursive", "true"); // Also get sub-resources loadHandleProperties(config, nonGroupdedDefs, op); return config; }
for (PropertyDefinition propDef : configDefCopy.getNonGroupedProperties()) {