Class AbstractLabelPermission.WithValue

    • Constructor Detail

      • WithValue

        public WithValue​(AbstractLabelPermission.ForUser forUser,
                         LabelVote label)
        Construct a reference to an abstract label permission at a specific value.
        Parameters:
        forUser - SELF (default) or ON_BEHALF_OF for labelAs behavior.
        label - label name and vote.
    • Method Detail

      • label

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

        public short value()
        Returns specific value of the label, e.g. 1 or 2.
      • permissionName

        public abstract String permissionName()
      • describeForException

        public final 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 final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object other)
        Overrides:
        equals in class Object