/** * 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); } }
/** * 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); } }
/** * Writes a property as a structure value for a file or folder.<p> * * @param resourceName the resource-name for which the property will be set * @param key the property definition name * @param value the value for the property to be set * * @throws CmsException if operation was not successful * * @deprecated use <code>{@link #writePropertyObject(String, CmsProperty)}</code> instead. */ public void writeProperty(String resourceName, String key, String value) throws CmsException { CmsProperty property = new CmsProperty(); property.setName(key); property.setStructureValue(value); writePropertyObject(resourceName, property); }
/** * Deletes a property for a file or folder.<p> * * @param resourcename the name of a resource for which the property should be deleted * @param key the name of the property * * @throws CmsException if something goes wrong * * @deprecated use <code>{@link #writePropertyObject(String, CmsProperty)}</code> instead. */ public void deleteProperty(String resourcename, String key) throws CmsException { CmsProperty property = new CmsProperty(); property.setName(key); property.setStructureValue(CmsProperty.DELETE_VALUE); writePropertyObject(resourcename, property); }
} else { property.setStructureValue(m_propertyValue);
} else { property.setStructureValue(m_propertyValue);
} else { property.setStructureValue(m_propertyValue);
property.setStructureValue(resolver.resolveMacros(property.getStructureValue()));
property.setStructureValue(resolver.resolveMacros(property.getStructureValue()));
} else { property.setStructureValue(value);
} else { property.setStructureValue(value);
/** * Writes a property for a file or folder.<p> * * @param resourcename the resource-name for which the property will be set * @param key the property-definition name * @param value the value for the property to be set * @param addDefinition flag to indicate if unknown definitions should be added * * @throws CmsException if operation was not successful * * @deprecated use <code>{@link #writePropertyObject(String, CmsProperty)}</code> instead. */ public void writeProperty(String resourcename, String key, String value, boolean addDefinition) throws CmsException { CmsProperty property = new CmsProperty(); property.setName(key); property.setStructureValue(value); property.setAutoCreatePropertyDefinition(addDefinition); writePropertyObject(resourcename, property); }
if (property.isNullProperty()) { newProperty.setStructureValue(newValue); newProperty.setName(propertyDefinition); cms.writePropertyObject(cms.getRequestContext().removeSiteRoot(res.getRootPath()), newProperty);
currentProperty.setStructureValue(CmsProperty.DELETE_VALUE); currentProperty.setResourceValue(null); writeProperty = true; } else if (currentProperty.getResourceValue() != null) { currentProperty.setResourceValue(CmsProperty.DELETE_VALUE); currentProperty.setStructureValue(null); writeProperty = true; currentProperty.setStructureValue(propValue); currentProperty.setResourceValue(null); } else { currentProperty.setResourceValue(propValue); currentProperty.setStructureValue(null); currentProperty.setStructureValue(propValue); currentProperty.setResourceValue(null); } else { currentProperty.setStructureValue(null);
if (OpenCms.getWorkplaceManager().isDefaultPropertiesOnStructure()) { currentProperty.setStructureValue(currentPropertyValue); currentProperty.setResourceValue(null); } else { currentProperty.setStructureValue(null); currentProperty.setResourceValue(currentPropertyValue); currentProperty.setStructureValue(currentPropertyValue); currentProperty.setResourceValue(null); } else { currentProperty.setStructureValue(null); currentProperty.setResourceValue(currentPropertyValue);
if (OpenCms.getWorkplaceManager().isDefaultPropertiesOnStructure()) { currentProperty.setStructureValue(currentPropertyValue); currentProperty.setResourceValue(null); } else { currentProperty.setStructureValue(null); currentProperty.setResourceValue(currentPropertyValue); currentProperty.setStructureValue(currentPropertyValue); currentProperty.setResourceValue(null); } else { currentProperty.setStructureValue(null); currentProperty.setResourceValue(currentPropertyValue);
property.setStructureValue(propertyValue); } else if (mappingType == CmsProperty.RESOURCE_RECORD_MAPPING) { property.setResourceValue(propertyValue);
newProp.setStructureValue(propertyValue); } else { newProp.setResourceValue(propertyValue); newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else {
cms.writePropertyObject(cms.getSitePath(res), titleProp); } else if (!titleProp.getValue().equals(title)) { titleProp.setStructureValue(title); cms.writePropertyObject(cms.getSitePath(res), titleProp);
newProp.setStructureValue(propertyValue); } else { newProp.setResourceValue(propertyValue); newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else {