public class AssociationFieldProcessor extends QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
FieldProcessor
implementation that handles associations.dictionaryService, namespaceService
Constructor and Description |
---|
AssociationFieldProcessor() |
AssociationFieldProcessor(org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
Modifier and Type | Method and Description |
---|---|
protected FieldGroup |
getGroup(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef) |
protected org.apache.commons.logging.Log |
getLogger() |
protected String |
getRegistryKey() |
protected org.alfresco.service.cmr.dictionary.AssociationDefinition |
getTypeDefinition(org.alfresco.service.namespace.QName fullName,
ContentModelItemData<?> itemData,
boolean isForcedField) |
protected Object |
getValue(org.alfresco.service.namespace.QName name,
ContentModelItemData<?> data)
Gets the associated value from the
ContentModelItemData . |
AssociationFieldDefinition |
makeAssociationFieldDefinition(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef,
FieldGroup group) |
Field |
makeField(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef,
Object value,
FieldGroup group) |
generateField, generateTypedField, getExpectedDataType, getFullName, getPrefixedName, makeDataKeyForName, populateFieldDefinition, setDictionaryService, setNamespaceService
generateField, setFieldProcessorRegistry
public AssociationFieldProcessor()
public AssociationFieldProcessor(org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
protected org.apache.commons.logging.Log getLogger()
getLogger
in class AbstractFieldProcessor<ContentModelItemData<?>>
Log
used to log events that occur while processing fields.protected FieldGroup getGroup(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef)
getGroup
in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
public Field makeField(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef, Object value, FieldGroup group)
makeField
in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
protected Object getValue(org.alfresco.service.namespace.QName name, ContentModelItemData<?> data)
ContentModelItemData
.
If the value is null
the method returns an empty List
.
If the value is a single Object (assumed to be a NodeRef) it returns a List
containing a String
representation of that object.
If the value is a Collection
of Objects, returns a List
containing String
representations of all the objects.getValue
in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
ArrayList
of Strings or null
.public AssociationFieldDefinition makeAssociationFieldDefinition(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef, FieldGroup group)
protected String getRegistryKey()
getRegistryKey
in class AbstractFieldProcessor<ContentModelItemData<?>>
String
key used to identify this FieldProcessor
in a FieldProcessorRegistry
.protected org.alfresco.service.cmr.dictionary.AssociationDefinition getTypeDefinition(org.alfresco.service.namespace.QName fullName, ContentModelItemData<?> itemData, boolean isForcedField)
getTypeDefinition
in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
Copyright © 2005–2017 Alfresco Software. All rights reserved.