Class AssociationFieldDefinition

java.lang.Object
org.alfresco.repo.forms.FieldDefinition
org.alfresco.repo.forms.AssociationFieldDefinition

public class AssociationFieldDefinition extends FieldDefinition
An association field definition that can represent a source->target association or a target->source association.
Author:
Gavin Cornwell
  • Field Details

    • endpointType

      protected String endpointType
    • endpointDirection

      protected AssociationFieldDefinition.Direction endpointDirection
    • endpointMandatory

      protected boolean endpointMandatory
    • endpointMany

      protected boolean endpointMany
  • Constructor Details

    • AssociationFieldDefinition

      public AssociationFieldDefinition(String name, String endpointType, AssociationFieldDefinition.Direction endpointDirection)
      Default constructor
      Parameters:
      name - The name of the association
      endpointType - The type of the item at the end of the association
      endpointDirection - The direction the association is going
  • Method Details

    • getEndpointType

      public String getEndpointType()
      Returns the type of the target of the association
      Returns:
      The type of the target
    • getEndpointDirection

      public AssociationFieldDefinition.Direction getEndpointDirection()
      Returns the direction the association is going.

      Direction.TARGET means the endpoint is the target and the field is the source.

      Direction.SOURCE means the endpoint is the source and the field is the target.

      Returns:
      Direction.TARGET or Direction.SOURCE
    • isEndpointMandatory

      public boolean isEndpointMandatory()
      Determines whether the target is mandatory
      Returns:
      true if a target has to be selected
    • setEndpointMandatory

      public void setEndpointMandatory(boolean endpointMandatory)
      Sets whether the target is mandatory
      Parameters:
      endpointMandatory - true if a target has to be selected
    • isEndpointMany

      public boolean isEndpointMany()
      Determines if multiple targets can be selected
      Returns:
      true if multiple targets can be selected
    • setEndpointMany

      public void setEndpointMany(boolean endpointMany)
      Sets whether multiple targets can be selected
      Parameters:
      endpointMany - true if multiple targets can be selected
    • toString

      public String toString()
      Overrides:
      toString in class Object