Class ContentModelFormPersister<T>
- java.lang.Object
-
- org.alfresco.repo.forms.processor.workflow.ContentModelFormPersister<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
FormPersister<T>
- Direct Known Subclasses:
TaskFormPersister,WorkflowFormPersister
public abstract class ContentModelFormPersister<T> extends Object implements FormPersister<T>
Utility class that assists in persisting content model related form data.- Since:
- 3.4
- Author:
- Nick Smith
-
-
Field Summary
Fields Modifier and Type Field Description protected DictionaryServicedictionaryServiceprotected ContentModelItemData<?>itemDataprotected DataKeyMatcherkeyMatcherprotected org.apache.commons.logging.Logloggerprotected static TypedPropertyValueGettervalueGetter
-
Constructor Summary
Constructors Constructor Description ContentModelFormPersister(ContentModelItemData<?> itemData, NamespaceService namespaceService, DictionaryService dictionaryService, org.apache.commons.logging.Log logger)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleanaddAssociation(QName qName, List<NodeRef> values)voidaddField(FormData.FieldData fieldData)protected booleanaddProperty(QName qName, FormData.FieldData fieldData)protected booleanaddTransientAssociation(String fieldName, List<NodeRef> values)protected booleanchangeAssociation(DataKeyInfo info, FormData.FieldData fieldData)protected booleanchangeTransientAssociation(String fieldName, List<NodeRef> values, boolean add)protected SerializablegetPropertyValueToPersist(QName qName, Object value)protected voidlogIgnore(FormData.FieldData fieldData)abstract Tpersist()protected abstract booleanremoveAssociation(QName qName, List<NodeRef> values)protected booleanremoveTransientAssociation(String fieldName, List<NodeRef> values)protected abstract booleanupdateProperty(QName qName, Serializable value)protected booleanupdateTransientProperty(String fieldName, FormData.FieldData fieldData)
-
-
-
Field Detail
-
valueGetter
protected static final TypedPropertyValueGetter valueGetter
-
keyMatcher
protected final DataKeyMatcher keyMatcher
-
dictionaryService
protected final DictionaryService dictionaryService
-
logger
protected final org.apache.commons.logging.Log logger
-
itemData
protected final ContentModelItemData<?> itemData
-
-
Constructor Detail
-
ContentModelFormPersister
public ContentModelFormPersister(ContentModelItemData<?> itemData, NamespaceService namespaceService, DictionaryService dictionaryService, org.apache.commons.logging.Log logger)
-
-
Method Detail
-
addField
public void addField(FormData.FieldData fieldData)
- Specified by:
addFieldin interfaceFormPersister<T>
-
updateTransientProperty
protected boolean updateTransientProperty(String fieldName, FormData.FieldData fieldData)
-
changeTransientAssociation
protected boolean changeTransientAssociation(String fieldName, List<NodeRef> values, boolean add)
-
removeTransientAssociation
protected boolean removeTransientAssociation(String fieldName, List<NodeRef> values)
-
addTransientAssociation
protected boolean addTransientAssociation(String fieldName, List<NodeRef> values)
-
addProperty
protected boolean addProperty(QName qName, FormData.FieldData fieldData)
-
getPropertyValueToPersist
protected Serializable getPropertyValueToPersist(QName qName, Object value)
-
changeAssociation
protected boolean changeAssociation(DataKeyInfo info, FormData.FieldData fieldData)
-
logIgnore
protected void logIgnore(FormData.FieldData fieldData)
-
persist
public abstract T persist()
- Specified by:
persistin interfaceFormPersister<T>
-
updateProperty
protected abstract boolean updateProperty(QName qName, Serializable value)
-
-