@Override public String toString() { return "ConfigurationTemplate[id=" + this.id + ", name=" + this.name + ((this.configurationDefinition != null) ? (", config=" + this.configurationDefinition.getName()) : "") + "]"; } }
@Override public String toString() { return this.getClass().getName().substring(this.getClass().getName().lastIndexOf(".")+1) + "[id=" + this.id + ", name=" + this.name + ((this.configurationDefinition != null) ? (", config=" + this.configurationDefinition.getName()) : "") + ((this.propertyGroupDefinition != null) ? (", group=" + this.propertyGroupDefinition.getName()) : "") + "]"; } }
static ConfigurationDefinition copyConfigurationDefinition(ConfigurationDefinition configurationDefinition) { ConfigurationDefinition configDefCopy = new ConfigurationDefinition(configurationDefinition.getName(), configurationDefinition.getDescription()); configDefCopy.setConfigurationFormat(configurationDefinition.getConfigurationFormat()); configDefCopy.setPropertyDefinitions(new HashMap<String, PropertyDefinition>(configurationDefinition .getPropertyDefinitions())); return configDefCopy; }
/** * Get a copy of this {@link ConfigurationDefinition}. The property definitions will be returned in * a new Map, which can be safely manipulated without affecting the original Map. It is not a deep copy, it * is backed by the same {@link #PropertyDefinition} objects as the original and changes to the Map entries will * modify the originals. The templates Map is treated the same way. The id is not copied. * * @return the copy */ public ConfigurationDefinition copy() { ConfigurationDefinition copy = new ConfigurationDefinition(this.getName(), this.getDescription()); copy.setPropertyDefinitions(this.getPropertyDefinitions()); copy.setConfigurationFormat(this.getConfigurationFormat()); copy.templates = new LinkedHashMap<String, ConfigurationTemplate>(this.getTemplates()); return copy; }
throw new IllegalArgumentException("The property [" + propertyDef.getName() + "] marked as required in the configuration definition of [" + propertyDef.getConfigurationDefinition().getName() + "] has no attribute 'default'"); } else {