/** * Sets the path of the resource from which the property was read.<p> * * @param originRootPath the root path of the root path from which the property was read */ public void setOrigin(String originRootPath) { checkFrozen(); m_origin = originRootPath; }
/** * Sets the value of this property attached to the structure record.<p> * * @param structureValue the value of this property attached to the structure record */ public void setStructureValue(String structureValue) { checkFrozen(); m_structureValue = structureValue; m_structureValueList = null; }
/** * Sets the boolean flag to decide if the property definition for this property should be * created implicitly on any write operation if doesn't exist already.<p> * * @param value true, if the property definition for this property should be created implicitly on any write operation */ public void setAutoCreatePropertyDefinition(boolean value) { checkFrozen(); m_autoCreatePropertyDefinition = value; }
/** * Sets the boolean flag to decide if the property definition for this property should be * created implicitly on any write operation if doesn't exist already.<p> * * @param value true, if the property definition for this property should be created implicitly on any write operation */ public void setAutoCreatePropertyDefinition(boolean value) { checkFrozen(); m_autoCreatePropertyDefinition = value; }
/** * Sets the value of this property attached to the resource record.<p> * * @param resourceValue the value of this property attached to the resource record */ public void setResourceValue(String resourceValue) { checkFrozen(); m_resourceValue = resourceValue; m_resourceValueList = null; }
/** * Sets the value of this property attached to the structure record.<p> * * @param structureValue the value of this property attached to the structure record */ public void setStructureValue(String structureValue) { checkFrozen(); m_structureValue = structureValue; m_structureValueList = null; }
/** * Sets the name of this property.<p> * * @param name the name to set */ public void setName(String name) { checkFrozen(); m_name = name; }
/** * Sets the value of this property attached to the resource record.<p> * * @param resourceValue the value of this property attached to the resource record */ public void setResourceValue(String resourceValue) { checkFrozen(); m_resourceValue = resourceValue; m_resourceValueList = null; }
/** * Sets the frozen state of the property, if set to <code>true</code> then this property is read only.<p> * * If the property is already frozen, then setting the frozen state to <code>true</code> again is allowed, * but setting the value to <code>false</code> causes a <code>{@link CmsRuntimeException}</code>.<p> * * @param frozen the frozen state to set */ public void setFrozen(boolean frozen) { if (!frozen) { checkFrozen(); } m_frozen = frozen; }
/** * Sets the frozen state of the property, if set to <code>true</code> then this property is read only.<p> * * If the property is already frozen, then setting the frozen state to <code>true</code> again is allowed, * but setting the value to <code>false</code> causes a <code>{@link CmsRuntimeException}</code>.<p> * * @param frozen the frozen state to set */ public void setFrozen(boolean frozen) { if (!frozen) { checkFrozen(); } m_frozen = frozen; }
/** * Sets the name of this property.<p> * * @param name the name to set */ public void setName(String name) { checkFrozen(); m_name = name.trim(); }
/** * Sets the name of this property.<p> * * @param name the name of this property * * @deprecated use {@link #setName(String)} instead */ public void setKey(String name) { checkFrozen(); setName(name); }
/** * Sets the value of this property attached to the structure record from the given map of Strings.<p> * * The value will be created from the individual values of the given map, which are appended * using the <code>|</code> char as delimiter, the map keys and values are separated by a <code>=</code>.<p> * * @param valueMap the map of key/value (Strings) to attach to the structure record */ public void setStructureValueMap(Map<String, String> valueMap) { checkFrozen(); if (valueMap != null) { m_structureValueMap = new HashMap<String, String>(valueMap); m_structureValueMap = Collections.unmodifiableMap(m_structureValueMap); m_structureValue = createValueFromMap(m_structureValueMap); } else { m_structureValueMap = null; m_structureValue = null; } }
/** * Sets the value of this property attached to the resource record from the given map of Strings.<p> * * The value will be created from the individual values of the given map, which are appended * using the <code>|</code> char as delimiter, the map keys and values are separated by a <code>=</code>.<p> * * @param valueMap the map of key/value (Strings) to attach to the resource record */ public void setResourceValueMap(Map<String, String> valueMap) { checkFrozen(); if (valueMap != null) { m_resourceValueMap = new HashMap<String, String>(valueMap); m_resourceValueMap = Collections.unmodifiableMap(m_resourceValueMap); m_resourceValue = createValueFromMap(m_resourceValueMap); } else { m_resourceValueMap = null; m_resourceValue = null; } }
/** * Sets the value of this property attached to the resource record from the given list of Strings.<p> * * The value will be created from the individual values of the given list, which are appended * using the <code>|</code> char as delimiter.<p> * * @param valueList the list of value (Strings) to attach to the resource record */ public void setResourceValueList(List<String> valueList) { checkFrozen(); if (valueList != null) { m_resourceValueList = new ArrayList<String>(valueList); m_resourceValueList = Collections.unmodifiableList(m_resourceValueList); m_resourceValue = createValueFromList(m_resourceValueList); } else { m_resourceValueList = null; m_resourceValue = null; } }
/** * Sets the value of this property attached to the resource record from the given map of Strings.<p> * * The value will be created from the individual values of the given map, which are appended * using the <code>|</code> char as delimiter, the map keys and values are separated by a <code>=</code>.<p> * * @param valueMap the map of key/value (Strings) to attach to the resource record */ public void setResourceValueMap(Map valueMap) { checkFrozen(); if (valueMap != null) { m_resourceValueMap = new HashMap(valueMap); m_resourceValueMap = Collections.unmodifiableMap(m_resourceValueMap); m_resourceValue = createValueFromMap(m_resourceValueMap); } else { m_resourceValueMap = null; m_resourceValue = null; } }
/** * Sets the value of this property attached to the structure record from the given map of Strings.<p> * * The value will be created from the individual values of the given map, which are appended * using the <code>|</code> char as delimiter, the map keys and values are separated by a <code>=</code>.<p> * * @param valueMap the map of key/value (Strings) to attach to the structure record */ public void setStructureValueMap(Map valueMap) { checkFrozen(); if (valueMap != null) { m_structureValueMap = new HashMap(valueMap); m_structureValueMap = Collections.unmodifiableMap(m_structureValueMap); m_structureValue = createValueFromMap(m_structureValueMap); } else { m_structureValueMap = null; m_structureValue = null; } }
/** * Sets the value of this property attached to the resource record from the given list of Strings.<p> * * The value will be created from the individual values of the given list, which are appended * using the <code>|</code> char as delimiter.<p> * * @param valueList the list of value (Strings) to attach to the resource record */ public void setResourceValueList(List valueList) { checkFrozen(); if (valueList != null) { m_resourceValueList = new ArrayList(valueList); m_resourceValueList = Collections.unmodifiableList(m_resourceValueList); m_resourceValue = createValueFromList(m_resourceValueList); } else { m_resourceValueList = null; m_resourceValue = null; } }
/** * Sets the value of this property attached to the structure record from the given list of Strings.<p> * * The value will be created from the individual values of the given list, which are appended * using the <code>|</code> char as delimiter.<p> * * @param valueList the list of value (Strings) to attach to the structure record */ public void setStructureValueList(List valueList) { checkFrozen(); if (valueList != null) { m_structureValueList = new ArrayList(valueList); m_structureValueList = Collections.unmodifiableList(m_structureValueList); m_structureValue = createValueFromList(m_structureValueList); } else { m_structureValueList = null; m_structureValue = null; } }
/** * Sets the value of this property as either shared or * individual value.<p> * * If the given type equals {@link CmsProperty#TYPE_SHARED} then * the value is set as a shared (resource) value, otherwise it * is set as individual (structure) value.<p> * * @param value the value to set * @param type the value type to set */ public void setValue(String value, String type) { checkFrozen(); setAutoCreatePropertyDefinition(true); if (TYPE_SHARED.equalsIgnoreCase(type)) { // set the provided value as shared (resource) value setResourceValue(value); } else { // set the provided value as individual (structure) value setStructureValue(value); } }