Class FieldRestriction
java.lang.Object
com.deiser.jira.profields.api.field.restriction.FieldRestriction
The type Field restriction.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FieldRestriction
By group field restriction.static FieldRestriction
byProjectRole
(List<String> editors, List<String> viewers) By project role field restriction.static FieldRestriction
Create field restriction.static FieldRestriction
empty()
Empty field restriction.Gets editors.Gets first editor.Gets first viewer.getType()
Gets type.com.deiser.jira.profields.impl.field.wrapper.restriction.RestrictionType
Gets type enum.Gets viewers.boolean
Has group restriction boolean.boolean
Has project role restriction boolean.boolean
Has restrictions boolean.boolean
isEmpty()
Is empty boolean.void
validate
(FieldType fieldType, com.deiser.jira.profields.impl.field.wrapper.restriction.validation.FieldRestrictionValidator fieldRestrictionValidator) Validate.
-
Method Details
-
empty
Empty field restriction.- Returns:
- the field restriction
-
create
Create field restriction.- Parameters:
type
- the typeeditors
- the editorsviewers
- the viewers- Returns:
- the field restriction
-
byProjectRole
By project role field restriction.- Parameters:
editors
- the editorsviewers
- the viewers- Returns:
- the field restriction
-
byGroup
By group field restriction.- Parameters:
editors
- the editorsviewers
- the viewers- Returns:
- the field restriction
-
isEmpty
public boolean isEmpty()Is empty boolean.- Returns:
- the boolean
-
getType
Gets type.- Returns:
- the type
-
getTypeEnum
public com.deiser.jira.profields.impl.field.wrapper.restriction.RestrictionType getTypeEnum()Gets type enum.- Returns:
- the type enum
-
getEditors
Gets editors.- Returns:
- the editors
-
getViewers
Gets viewers.- Returns:
- the viewers
-
hasProjectRoleRestriction
public boolean hasProjectRoleRestriction()Has project role restriction boolean.- Returns:
- the boolean
-
hasGroupRestriction
public boolean hasGroupRestriction()Has group restriction boolean.- Returns:
- the boolean
-
getFirstEditor
Gets first editor.- Returns:
- the first editor
-
getFirstViewer
Gets first viewer.- Returns:
- the first viewer
-
hasRestrictions
public boolean hasRestrictions()Has restrictions boolean.- Returns:
- the boolean
-
validate
public void validate(FieldType fieldType, com.deiser.jira.profields.impl.field.wrapper.restriction.validation.FieldRestrictionValidator fieldRestrictionValidator) Validate.- Parameters:
fieldType
- the field typefieldRestrictionValidator
- the field restriction validator
-