Class AssociationFieldProcessor

  • All Implemented Interfaces:
    FieldProcessor

    public class AssociationFieldProcessor
    extends QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
    FieldProcessor implementation that handles associations.
    Since:
    3.4
    Author:
    Nick Smith
    • Constructor Detail

      • AssociationFieldProcessor

        public AssociationFieldProcessor()
      • AssociationFieldProcessor

        public AssociationFieldProcessor​(org.alfresco.service.namespace.NamespaceService namespaceService,
                                         org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
    • Method Detail

      • getGroup

        protected FieldGroup getGroup​(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef)
        Specified by:
        getGroup in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
      • makeField

        public Field makeField​(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef,
                               java.lang.Object value,
                               FieldGroup group)
        Specified by:
        makeField in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
      • getValue

        protected java.lang.Object getValue​(org.alfresco.service.namespace.QName name,
                                            ContentModelItemData<?> data)
        Gets the associated value from the 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.
        Specified by:
        getValue in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>
        Returns:
        An ArrayList of Strings or null.
      • makeAssociationFieldDefinition

        public AssociationFieldDefinition makeAssociationFieldDefinition​(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef,
                                                                         FieldGroup group)
      • getTypeDefinition

        protected org.alfresco.service.cmr.dictionary.AssociationDefinition getTypeDefinition​(org.alfresco.service.namespace.QName fullName,
                                                                                              ContentModelItemData<?> itemData,
                                                                                              boolean isForcedField)
        Specified by:
        getTypeDefinition in class QNameFieldProcessor<org.alfresco.service.cmr.dictionary.AssociationDefinition>