Class AssociationFieldProcessor
java.lang.Object
org.alfresco.repo.forms.processor.AbstractFieldProcessor<ContentModelItemData<?>>
org.alfresco.repo.forms.processor.node.QNameFieldProcessor<AssociationDefinition>
org.alfresco.repo.forms.processor.node.AssociationFieldProcessor
- All Implemented Interfaces:
FieldProcessor
FieldProcessor implementation that handles associations.- Since:
- 3.4
- Author:
- Nick Smith
-
Field Summary
Fields inherited from class org.alfresco.repo.forms.processor.node.QNameFieldProcessor
dictionaryService, namespaceService -
Constructor Summary
ConstructorsConstructorDescriptionAssociationFieldProcessor(NamespaceService namespaceService, DictionaryService dictionaryService) -
Method Summary
Modifier and TypeMethodDescriptionprotected FieldGroupgetGroup(AssociationDefinition assocDef) protected org.apache.commons.logging.Logprotected Stringprotected AssociationDefinitiongetTypeDefinition(QName fullName, ContentModelItemData<?> itemData, boolean isForcedField) protected ObjectgetValue(QName name, ContentModelItemData<?> data) Gets the associated value from theContentModelItemData.makeAssociationFieldDefinition(AssociationDefinition assocDef, FieldGroup group) makeField(AssociationDefinition assocDef, Object value, FieldGroup group) Methods inherited from class org.alfresco.repo.forms.processor.node.QNameFieldProcessor
generateField, generateTypedField, getExpectedDataType, getFullName, getPrefixedName, makeDataKeyForName, populateFieldDefinition, setDictionaryService, setNamespaceServiceMethods inherited from class org.alfresco.repo.forms.processor.AbstractFieldProcessor
generateField, setFieldProcessorRegistry
-
Constructor Details
-
AssociationFieldProcessor
public AssociationFieldProcessor() -
AssociationFieldProcessor
public AssociationFieldProcessor(NamespaceService namespaceService, DictionaryService dictionaryService)
-
-
Method Details
-
getLogger
protected org.apache.commons.logging.Log getLogger()- Specified by:
getLoggerin classAbstractFieldProcessor<ContentModelItemData<?>>- Returns:
- a
Logused to log events that occur while processing fields.
-
getGroup
- Specified by:
getGroupin classQNameFieldProcessor<AssociationDefinition>
-
makeField
- Specified by:
makeFieldin classQNameFieldProcessor<AssociationDefinition>
-
getValue
Gets the associated value from theContentModelItemData. If the value isnullthe method returns an emptyList. If the value is a single Object (assumed to be a NodeRef) it returns aListcontaining aStringrepresentation of that object. If the value is aCollectionof Objects, returns aListcontainingStringrepresentations of all the objects.- Specified by:
getValuein classQNameFieldProcessor<AssociationDefinition>- Returns:
- An
ArrayListof Strings ornull.
-
makeAssociationFieldDefinition
public AssociationFieldDefinition makeAssociationFieldDefinition(AssociationDefinition assocDef, FieldGroup group) -
getRegistryKey
- Specified by:
getRegistryKeyin classAbstractFieldProcessor<ContentModelItemData<?>>- Returns:
- a
Stringkey used to identify thisFieldProcessorin aFieldProcessorRegistry.
-
getTypeDefinition
protected AssociationDefinition getTypeDefinition(QName fullName, ContentModelItemData<?> itemData, boolean isForcedField) - Specified by:
getTypeDefinitionin classQNameFieldProcessor<AssociationDefinition>
-