Class AbstractLabelPermission

    • Constructor Detail

      • AbstractLabelPermission

        public AbstractLabelPermission​(AbstractLabelPermission.ForUser forUser,
                                       String name)
        Construct a reference to an abstract 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".
      • permissionPrefix

        protected abstract String permissionPrefix()
      • permissionName

        protected 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