public class PropertyUtil extends Object
| Constructor and Description |
|---|
PropertyUtil() |
| Modifier and Type | Method and Description |
|---|---|
XMLGregorianCalendar |
convert(Date date)
Converts Date object to XMLGregorianCalendar object
|
CmisProperty |
createProperty(String pdid,
CMISDataTypeEnum dataType,
Serializable value)
Creates and initializes appropriate CmisProperty instance by name and data type
|
<ResultType> |
getCmisPropertyValue(CmisPropertiesType cmisProperties,
String property,
ResultType defaultValue)
Extracts from CmisPropertiesType instance property by its name and returns casted to appropriate type value of the extracted property
|
CmisPropertiesType |
getProperties(Object object,
PropertyFilter filter)
Get CMIS properties for object
|
Map<String,Serializable> |
getPropertiesMap(CmisPropertiesType cmisProperties)
Converts CmisPropertiesType properties representation to rapidly accessible form
|
<ResultType> |
getProperty(NodeRef objectNodeRef,
String propertyName,
ResultType defaultValue)
Gets property value by its name from Node Reference object
|
String |
getPropertyName(CmisProperty property) |
void |
setCmisDictionaryService(CMISDictionaryService cmisDictionaryService) |
void |
setCmisService(CMISServices cmisService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setProperties(NodeRef nodeRef,
CmisPropertiesType properties,
PropertyFilter ignoringPropertiesFilter)
Sets and checks all properties' fields for specified node
|
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setCmisService(CMISServices cmisService)
public void setCmisDictionaryService(CMISDictionaryService cmisDictionaryService)
public <ResultType> ResultType getProperty(NodeRef objectNodeRef, String propertyName, ResultType defaultValue) throws CMISInvalidArgumentException
objectNodeRef - - NodeRef instance that represents Id of the source objectpropertyName - - String instance that represents property namedefaultValue - - some value of the appropriate for conversion type. Also null may be accepted by this parameterCMISInvalidArgumentExceptionpublic <ResultType> ResultType getCmisPropertyValue(CmisPropertiesType cmisProperties, String property, ResultType defaultValue) throws CmisException
cmisProperties - - CmisPropertiesType properties instanceproperty - - String instance that represents property namedefaultValue - - some value of the appropriate for conversion type. Also null may be accepted by this parameterCmisExceptionpublic Map<String,Serializable> getPropertiesMap(CmisPropertiesType cmisProperties) throws CmisException
cmisProperties - - CmisPropertiesType properties representationCmisExceptionCmisExceptionpublic void setProperties(NodeRef nodeRef, CmisPropertiesType properties, PropertyFilter ignoringPropertiesFilter) throws CmisException
nodeRef - - NodeRef for node for those properties must be settedproperties - - CmisPropertiesType instance that contains all the necessary properties' fieldsignoringPropertiesFilter - - PropertyFilter instance. This filter determines which properties should be ignored and not
setted without exception. If this parameter is null all properties will be processed in common
flowCmisExceptionpublic String getPropertyName(CmisProperty property)
public CmisPropertiesType getProperties(Object object, PropertyFilter filter) throws CmisException
nodeRef - node referencefilter - property filterCmisExceptionpublic CmisProperty createProperty(String pdid, CMISDataTypeEnum dataType, Serializable value)
pdid - - String value that represents CMIS property namedataType - - CMISDataTypeEnum value that specifies real type of the propertyvalue - - some instance of appropriate type or some Collection that contains several values of the typepublic XMLGregorianCalendar convert(Date date)
date - Date objectCopyright © 2005–2014 Alfresco Software. All rights reserved.