Class FieldUtils


  • public class FieldUtils
    extends java.lang.Object
    Utility class to assist in creating Fields which represent PropertyDefinitions and AssociationDefinitions
    Since:
    3.4
    Author:
    Nick Smith
    • Constructor Summary

      Constructors 
      Constructor Description
      FieldUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Field makeAssociationField​(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef, java.lang.Object value, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates an asssociation field.
      static java.util.List<Field> makeAssociationFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.AssociationDefinition> assocDefs, java.util.Map<org.alfresco.service.cmr.dictionary.AssociationDefinition,​java.lang.Object> values, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a list of association fields with values.
      static java.util.List<Field> makeAssociationFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.AssociationDefinition> assocDefs, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a list of association fields without values.
      static java.util.List<Field> makeAssociationFields​(java.util.Map<org.alfresco.service.cmr.dictionary.AssociationDefinition,​java.lang.Object> assocDefAndValue, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a list of association fields with values.
      static Field makePropertyField​(org.alfresco.service.cmr.dictionary.PropertyDefinition propDef, java.lang.Object value, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a property field.
      static java.util.List<Field> makePropertyFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.PropertyDefinition> propDefs, java.util.Map<org.alfresco.service.cmr.dictionary.PropertyDefinition,​java.lang.Object> values, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a list of property fields with values.
      static java.util.List<Field> makePropertyFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.PropertyDefinition> propDefs, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a list of property fields without values.
      static java.util.List<Field> makePropertyFields​(java.util.Map<org.alfresco.service.cmr.dictionary.PropertyDefinition,​java.lang.Object> propDefAndValue, FieldGroup group, org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
      Generates a list of property fields with values.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FieldUtils

        public FieldUtils()
    • Method Detail

      • makePropertyField

        public static Field makePropertyField​(org.alfresco.service.cmr.dictionary.PropertyDefinition propDef,
                                              java.lang.Object value,
                                              FieldGroup group,
                                              org.alfresco.service.namespace.NamespaceService namespaceService,
                                              org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a property field.
        Parameters:
        propDef - The definition of the property to generate
        value - The value of the field
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        The generated Field object
      • makePropertyFields

        public static java.util.List<Field> makePropertyFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.PropertyDefinition> propDefs,
                                                               FieldGroup group,
                                                               org.alfresco.service.namespace.NamespaceService namespaceService,
                                                               org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a list of property fields without values.
        Parameters:
        propDefs - List of property defintions to create
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        List of generated Field objects
      • makePropertyFields

        public static java.util.List<Field> makePropertyFields​(java.util.Map<org.alfresco.service.cmr.dictionary.PropertyDefinition,​java.lang.Object> propDefAndValue,
                                                               FieldGroup group,
                                                               org.alfresco.service.namespace.NamespaceService namespaceService,
                                                               org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a list of property fields with values.
        Parameters:
        propDefAndValue - Map of property definitions and corresponding values
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        List of generated Field objects
      • makePropertyFields

        public static java.util.List<Field> makePropertyFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.PropertyDefinition> propDefs,
                                                               java.util.Map<org.alfresco.service.cmr.dictionary.PropertyDefinition,​java.lang.Object> values,
                                                               FieldGroup group,
                                                               org.alfresco.service.namespace.NamespaceService namespaceService,
                                                               org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a list of property fields with values.
        Parameters:
        propDefs - List of property definitions to generate
        values - Map containing the values to use for each property
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        List of generated Field objects
      • makeAssociationField

        public static Field makeAssociationField​(org.alfresco.service.cmr.dictionary.AssociationDefinition assocDef,
                                                 java.lang.Object value,
                                                 FieldGroup group,
                                                 org.alfresco.service.namespace.NamespaceService namespaceService,
                                                 org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates an asssociation field.
        Parameters:
        assocDef - The definition of the association to generate
        value - The value of the field
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        The generated Field object
      • makeAssociationFields

        public static java.util.List<Field> makeAssociationFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.AssociationDefinition> assocDefs,
                                                                  FieldGroup group,
                                                                  org.alfresco.service.namespace.NamespaceService namespaceService,
                                                                  org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a list of association fields without values.
        Parameters:
        assocDefs - List of association defintions to create
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        List of generated Field objects
      • makeAssociationFields

        public static java.util.List<Field> makeAssociationFields​(java.util.Map<org.alfresco.service.cmr.dictionary.AssociationDefinition,​java.lang.Object> assocDefAndValue,
                                                                  FieldGroup group,
                                                                  org.alfresco.service.namespace.NamespaceService namespaceService,
                                                                  org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a list of association fields with values.
        Parameters:
        assocDefAndValue - Map of association definitions and corresponding values
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        List of generated Field objects
      • makeAssociationFields

        public static java.util.List<Field> makeAssociationFields​(java.util.Collection<org.alfresco.service.cmr.dictionary.AssociationDefinition> assocDefs,
                                                                  java.util.Map<org.alfresco.service.cmr.dictionary.AssociationDefinition,​java.lang.Object> values,
                                                                  FieldGroup group,
                                                                  org.alfresco.service.namespace.NamespaceService namespaceService,
                                                                  org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Generates a list of association fields with values.
        Parameters:
        assocDefs - List of association definitions to generate
        values - Map containing the values to use for each property
        group - The group the field belongs to
        namespaceService - NamespaceService instance
        Returns:
        List of generated Field objects