Package org.alfresco.repo.forms
Class AssociationFieldDefinition
java.lang.Object
org.alfresco.repo.forms.FieldDefinition
org.alfresco.repo.forms.AssociationFieldDefinition
An association field definition that can represent a source->target association
or a target->source association.
- Author:
- Gavin Cornwell
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AssociationFieldDefinition.Directionprotected booleanprotected booleanprotected StringFields inherited from class org.alfresco.repo.forms.FieldDefinition
binding, dataKeyName, defaultValue, description, group, label, name, protectedField -
Constructor Summary
ConstructorsConstructorDescriptionAssociationFieldDefinition(String name, String endpointType, AssociationFieldDefinition.Direction endpointDirection) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns the direction the association is going.Returns the type of the target of the associationbooleanDetermines whether the target is mandatorybooleanDetermines if multiple targets can be selectedvoidsetEndpointMandatory(boolean endpointMandatory) Sets whether the target is mandatoryvoidsetEndpointMany(boolean endpointMany) Sets whether multiple targets can be selectedtoString()Methods inherited from class org.alfresco.repo.forms.FieldDefinition
getBinding, getDataKeyName, getDefaultValue, getDescription, getGroup, getLabel, getName, isProtectedField, setBinding, setDataKeyName, setDefaultValue, setDescription, setGroup, setLabel, setProtectedField
-
Field Details
-
endpointType
-
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 associationendpointType- The type of the item at the end of the associationendpointDirection- The direction the association is going
-
-
Method Details
-
getEndpointType
Returns the type of the target of the association- Returns:
- The type of the target
-
getEndpointDirection
Returns the direction the association is going.Direction.TARGETmeans the endpoint is the target and the field is the source.Direction.SOURCEmeans 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
-