Class PropertyFieldDefinition


  • public class PropertyFieldDefinition
    extends FieldDefinition
    A property field definition.
    Author:
    Gavin Cornwell
    • Field Detail

      • dataType

        protected java.lang.String dataType
      • mandatory

        protected boolean mandatory
      • repeats

        protected boolean repeats
      • indexTokenisationMode

        protected org.alfresco.repo.dictionary.IndexTokenisationMode indexTokenisationMode
    • Constructor Detail

      • PropertyFieldDefinition

        public PropertyFieldDefinition​(java.lang.String name,
                                       java.lang.String dataType)
        Default constructor
        Parameters:
        name - The name of the property
        dataType - The data type of the property
    • Method Detail

      • getDataType

        public java.lang.String getDataType()
        Returns the dataType for the property, this is a value from the Alfresco data dictionary i.e. d:text, d:int etc.
        Returns:
        The field's data type
      • getDataTypeParameters

        public DataTypeParameters getDataTypeParameters()
        Returns the data type parameters for the field
        Returns:
        DataTypeParameters object or null
      • setDataTypeParameters

        public void setDataTypeParameters​(DataTypeParameters dataTypeParams)
        Sets the data type parameters for the field
        Parameters:
        dataTypeParams - The DataTypeParameters for the field
      • isMandatory

        public boolean isMandatory()
        Determines if the property is mandatory
        Returns:
        true if the field is mandatory
      • setMandatory

        public void setMandatory​(boolean mandatory)
        Sets whether the property is mandatory
        Parameters:
        mandatory - true if it is mandatory
      • isRepeating

        public boolean isRepeating()
        Determines if the property can contain multiple values
        Returns:
        true if the field can contain multiple values
      • setRepeating

        public void setRepeating​(boolean repeats)
        Sets whether the property can contain multiple values
        Parameters:
        repeats - true if the field can contain multiple values
      • getConstraints

        public java.util.List<PropertyFieldDefinition.FieldConstraint> getConstraints()
        Returns a list of constraints the property may have
        Returns:
        List of FieldContstraint objects or null if there are no constraints for the field
      • setConstraints

        public void setConstraints​(java.util.List<PropertyFieldDefinition.FieldConstraint> constraints)
        Sets the list of FieldConstraint objects for the property
        Parameters:
        constraints - List of FieldConstraint objects
      • getIndexTokenisationMode

        public org.alfresco.repo.dictionary.IndexTokenisationMode getIndexTokenisationMode()
        Returns a IndexTokenisationMode the property
        Returns:
        IndexTokenisationMode objects or null
      • setIndexTokenisationMode

        public void setIndexTokenisationMode​(org.alfresco.repo.dictionary.IndexTokenisationMode indexTokenisationMode)
        Sets the IndexTokenisationMode objects for the property
        Parameters:
        indexTokenisationMode - objects
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object