Class AbstractRole

java.lang.Object
io.jenkins.plugins.folderauth.roles.AbstractRole
All Implemented Interfaces:
Comparable<AbstractRole>
Direct Known Subclasses:
AgentRole, FolderRole, GlobalRole

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public abstract class AbstractRole extends Object implements Comparable<AbstractRole>
A role as an immutable object
  • Field Details

    • name

      @NonNull protected final String name
      The unique name of the role.
    • sids

      @NonNull protected final Set<String> sids
      The sids on which this role is applicable.
  • Method Details

    • compareTo

      public int compareTo(@NonNull AbstractRole other)
      Specified by:
      compareTo in interface Comparable<AbstractRole>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getName

      @NonNull public String getName()
      The name of the Role
      Returns:
      the name of the role
    • getPermissions

      @NonNull public SortedSet<PermissionWrapper> getPermissions()
      The permissions assigned to the role.

      This method, however, does not return all permissions implied by this AbstractRole

      Returns:
      the permissions assigned to the role.
      See Also:
    • getPermissionsUnsorted

      @NonNull public Set<PermissionWrapper> getPermissionsUnsorted()
      The permissions assigned to the role in an unsorted order.
      Returns:
      permissions in an unsorted order.
      See Also:
    • getSids

      @NonNull public Set<String> getSids()
      List of sids on which the role is applicable.
      Returns:
      list of sids on which this role is applicable.
    • getSidsCommaSeparated

      @NonNull public String getSidsCommaSeparated()
      Return a sorted comma separated list of sids assigned to this role
      Returns:
      a sorted comma separated list of sids assigned to this role