Package org.alfresco.repo.forms
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAssociationFieldDefinition.Direction
-
Field Summary
Fields Modifier and Type Field Description protected AssociationFieldDefinition.DirectionendpointDirectionprotected booleanendpointMandatoryprotected booleanendpointManyprotected java.lang.StringendpointType-
Fields inherited from class org.alfresco.repo.forms.FieldDefinition
binding, dataKeyName, defaultValue, description, group, label, name, protectedField
-
-
Constructor Summary
Constructors Constructor Description AssociationFieldDefinition(java.lang.String name, java.lang.String endpointType, AssociationFieldDefinition.Direction endpointDirection)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssociationFieldDefinition.DirectiongetEndpointDirection()Returns the direction the association is going.java.lang.StringgetEndpointType()Returns the type of the target of the associationbooleanisEndpointMandatory()Determines whether the target is mandatorybooleanisEndpointMany()Determines if multiple targets can be selectedvoidsetEndpointMandatory(boolean endpointMandatory)Sets whether the target is mandatoryvoidsetEndpointMany(boolean endpointMany)Sets whether multiple targets can be selectedjava.lang.StringtoString()-
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 Detail
-
endpointType
protected java.lang.String endpointType
-
endpointDirection
protected AssociationFieldDefinition.Direction endpointDirection
-
endpointMandatory
protected boolean endpointMandatory
-
endpointMany
protected boolean endpointMany
-
-
Constructor Detail
-
AssociationFieldDefinition
public AssociationFieldDefinition(java.lang.String name, java.lang.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 Detail
-
getEndpointType
public java.lang.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.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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-