Class FieldRestriction

java.lang.Object
com.deiser.jira.profields.api.field.restriction.FieldRestriction

public class FieldRestriction extends Object
The type Field restriction.
  • Method Details

    • empty

      public static FieldRestriction empty()
      Empty field restriction.
      Returns:
      the field restriction
    • create

      public static FieldRestriction create(String type, List<String> editors, List<String> viewers)
      Create field restriction.
      Parameters:
      type - the type
      editors - the editors
      viewers - the viewers
      Returns:
      the field restriction
    • byProjectRole

      public static FieldRestriction byProjectRole(List<String> editors, List<String> viewers)
      By project role field restriction.
      Parameters:
      editors - the editors
      viewers - the viewers
      Returns:
      the field restriction
    • byGroup

      public static FieldRestriction byGroup(List<String> editors, List<String> viewers)
      By group field restriction.
      Parameters:
      editors - the editors
      viewers - the viewers
      Returns:
      the field restriction
    • isEmpty

      public boolean isEmpty()
      Is empty boolean.
      Returns:
      the boolean
    • getType

      public String 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

      public List<String> getEditors()
      Gets editors.
      Returns:
      the editors
    • getViewers

      public List<String> 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

      public String getFirstEditor()
      Gets first editor.
      Returns:
      the first editor
    • getFirstViewer

      public String 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 type
      fieldRestrictionValidator - the field restriction validator