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
public class AssociationFieldProcessor extends QNameFieldProcessor<AssociationDefinition>
FieldProcessorimplementation 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
Constructors Constructor Description AssociationFieldProcessor()AssociationFieldProcessor(NamespaceService namespaceService, DictionaryService dictionaryService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldGroupgetGroup(AssociationDefinition assocDef)protected org.apache.commons.logging.LoggetLogger()protected StringgetRegistryKey()protected AssociationDefinitiongetTypeDefinition(QName fullName, ContentModelItemData<?> itemData, boolean isForcedField)protected ObjectgetValue(QName name, ContentModelItemData<?> data)Gets the associated value from theContentModelItemData.AssociationFieldDefinitionmakeAssociationFieldDefinition(AssociationDefinition assocDef, FieldGroup group)FieldmakeField(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, setNamespaceService
-
Methods inherited from class org.alfresco.repo.forms.processor.AbstractFieldProcessor
generateField, setFieldProcessorRegistry
-
-
-
-
Constructor Detail
-
AssociationFieldProcessor
public AssociationFieldProcessor()
-
AssociationFieldProcessor
public AssociationFieldProcessor(NamespaceService namespaceService, DictionaryService dictionaryService)
-
-
Method Detail
-
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
protected FieldGroup getGroup(AssociationDefinition assocDef)
- Specified by:
getGroupin classQNameFieldProcessor<AssociationDefinition>
-
makeField
public Field makeField(AssociationDefinition assocDef, Object value, FieldGroup group)
- Specified by:
makeFieldin classQNameFieldProcessor<AssociationDefinition>
-
getValue
protected Object getValue(QName name, ContentModelItemData<?> data)
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
protected String 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>
-
-