Class LabelPermission

    • Constructor Detail

      • LabelPermission

        public LabelPermission​(LabelType type)
        Construct a reference to a label permission.
        Parameters:
        type - type description of the label.
      • LabelPermission

        public LabelPermission​(LabelPermission.ForUser forUser,
                               LabelType type)
        Construct a reference to a label permission.
        Parameters:
        forUser - SELF (default) or ON_BEHALF_OF for labelAs behavior.
        type - type description of the label.
      • LabelPermission

        public LabelPermission​(String name)
        Construct a reference to a label permission.
        Parameters:
        name - name of the label, e.g. "Code-Review" or "Verified".
      • LabelPermission

        public LabelPermission​(LabelPermission.ForUser forUser,
                               String name)
        Construct a reference to a label permission.
        Parameters:
        forUser - SELF (default) or ON_BEHALF_OF for labelAs behavior.
        name - name of the label, e.g. "Code-Review" or "Verified".
    • Method Detail

      • label

        public String label()
        Returns:
        name of the label, e.g. "Code-Review".
      • describeForException

        public String describeForException()
        Description copied from interface: GerritPermission
        A description in the context of an exception message.

        Should be grammatical when used in the construction "not permitted: [description] on [resource]", although individual PermissionBackend implementations may vary the wording.

        Specified by:
        describeForException in interface GerritPermission
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object