public class NodePropertyHelper extends Object
Constructor and Description |
---|
NodePropertyHelper(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService,
QNameDAO qnameDAO,
LocaleDAO localeDAO,
ContentDataDAO contentDataDAO)
Construct the helper with the appropriate DAOs and services
|
Modifier and Type | Method and Description |
---|---|
Map<NodePropertyKey,NodePropertyValue> |
convertToPersistentProperties(Map<org.alfresco.service.namespace.QName,Serializable> in) |
Map<org.alfresco.service.namespace.QName,Serializable> |
convertToPublicProperties(Map<NodePropertyKey,NodePropertyValue> propertyValues) |
Serializable |
getPublicProperty(Map<NodePropertyKey,NodePropertyValue> propertyValues,
org.alfresco.service.namespace.QName propertyQName) |
NodePropertyValue |
makeNodePropertyValue(org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
Serializable value)
Helper method to convert the
Serializable value into a full, persistable NodePropertyValue . |
Serializable |
makeSerializableValue(org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef,
NodePropertyValue propertyValue)
Extracts the externally-visible property from the persistable value.
|
public NodePropertyHelper(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService, QNameDAO qnameDAO, LocaleDAO localeDAO, ContentDataDAO contentDataDAO)
public Map<NodePropertyKey,NodePropertyValue> convertToPersistentProperties(Map<org.alfresco.service.namespace.QName,Serializable> in)
public NodePropertyValue makeNodePropertyValue(org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, Serializable value)
Serializable
value into a full, persistable NodePropertyValue
.
Where the property definition is null, the value will take on the generic ANY
value.
Collections are NOT supported. These must be split up by the calling code before calling this method. Map instances are supported as plain serializable instances.
propertyDef
- the property dictionary definition, may be nullvalue
- the value, which will be converted according to the definition - may be nullpublic Serializable getPublicProperty(Map<NodePropertyKey,NodePropertyValue> propertyValues, org.alfresco.service.namespace.QName propertyQName)
public Map<org.alfresco.service.namespace.QName,Serializable> convertToPublicProperties(Map<NodePropertyKey,NodePropertyValue> propertyValues)
public Serializable makeSerializableValue(org.alfresco.service.cmr.dictionary.PropertyDefinition propertyDef, NodePropertyValue propertyValue)
propertyDef
- the model property definition - may be nullpropertyValue
- the persisted propertyCopyright © 2005–2017 Alfresco Software. All rights reserved.