/** * Adds a simple property. * @param name the name of the simple property * @param value the value of the simple property * @return continue with the definition */ public This addSimple(String name, Object value) { getMap().put(new PropertySimple(name, value)); return castThis(); }
public void setStartScript(File startScript) { PropertySimple prop = this.pluginConfig.getSimple(START_SCRIPT_PROP); if (prop == null) { prop = new PropertySimple(START_SCRIPT_PROP, null); this.pluginConfig.put(prop); } prop.setValue(startScript); }
private static PropertyList getPropertyList(String listName, String propertyName, List<? extends Object> objects) { PropertyList propertyList = new PropertyList(listName); for(Object o : objects) { propertyList.add(new PropertySimple(propertyName, o)); } return propertyList; }
private static void unmaskPropertySimple(PropertySimple propertySimple, AbstractPropertyMap unmaskedParentPropertyMap) { if (propertySimple.isMasked()) { PropertySimple unmaskedPropertySimple = unmaskedParentPropertyMap.getSimple(propertySimple.getName()); String unmaskedValue = (unmaskedPropertySimple != null) ? unmaskedPropertySimple.getStringValue() : null; propertySimple.setStringValue(unmaskedValue); } }
/** * Adds a simple property. The name of the property is the member name defined by this list. * @param value the value of the simple property * @return continue with the definition */ public This addSimple(Object value) { list.add(new PropertySimple(list.memberPropertyName, value)); return castThis(); }
/** * Use this method if an operation returned a simple string result. This is a convenience method that places the * given result string in the {@link #getComplexResults()} object under the name * {@link #SIMPLE_OPERATION_RESULT_NAME}. * * @param simpleResult a simple string result */ public void setSimpleResult(String simpleResult) { complexResults.put(new PropertySimple(SIMPLE_OPERATION_RESULT_NAME, simpleResult)); }
public PropertyList deepCopy(boolean keepId) { PropertyList copy = new PropertyList(this, keepId); for (Property property : list) { copy.add(property.deepCopy(false)); } return copy; }
/** * @param original * @param keepId */ protected ObfuscatedPropertySimple(PropertySimple original, boolean keepId) { super(original, keepId); setValue(original.getStringValue()); }
private static void createDefaultProperty(PropertyDefinition propertyDefinition, AbstractPropertyMap parentPropertyMap) { Property property = instantiateDefaultProperty(propertyDefinition); if (property != null) { parentPropertyMap.put(property); } }
private void createDeepCopyOfRawConfigs(Configuration copy, boolean keepId) { if (rawConfigurations==null) { return; } for (RawConfiguration rawConfig : rawConfigurations) { copy.addRawConfiguration(rawConfig.deepCopy(keepId)); } }
/** * Starts defining a new sub list. * @param name the name of the sub list * @param memberName the names of the member properties of the sub list * @return the builder of the list */ public Builder.ListInMap<This> openList(String name, String memberName) { return new Builder.ListInMap<This>(castThis(), name, memberName); }
/** * Starts defining a new sub map. * @return the builder of the map */ public Builder.MapInList<This> openMap() { return new Builder.MapInList<This>(castThis(), list.memberPropertyName); }
/** * Starts defining a new sub map. * @param name the name of the sub map * @return the builder of the map */ public Builder.MapInMap<This> openMap(String name) { return new Builder.MapInMap<This>(castThis(), name); }
/** * Starts defining a new sub list. * @param memberName the names of the member properties of the sub list * @return the builder of the list */ public Builder.ListInList<This> openList(String memberName) { return new Builder.ListInList<This>(castThis(), list.memberPropertyName, memberName); }
/** * Adds a number of simple properties. The names of the properties are the member name defined by this list. * @param values the values of the simple properties * @return continue with the definition */ public This addSimples(Object... values) { for(Object v : values) { list.add(new PropertySimple(list.memberPropertyName, v)); } return castThis(); }