Class PermissionEntry

java.lang.Object
com.michelin.cio.hudson.plugins.rolestrategy.PermissionEntry
All Implemented Interfaces:
Comparable<PermissionEntry>

public class PermissionEntry extends Object implements Comparable<PermissionEntry>
Combines sid with type.
  • Constructor Details

    • PermissionEntry

      @DataBoundConstructor public PermissionEntry(@NonNull AuthorizationType type, @NonNull String sid)
  • Method Details

    • getType

      public AuthorizationType getType()
    • getSid

      public String getSid()
    • isApplicable

      protected boolean isApplicable(boolean principal)
      Utility method checking whether this entry applies based on whether we're looking for a principal.
    • fromString

      @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @CheckForNull public static PermissionEntry fromString(@NonNull String permissionEntryString)
      Creates a PermissionEntry from a string.
      Parameters:
      permissionEntryString - String from which to create the entry
      Returns:
      the PermissinoEntry
    • user

      public static PermissionEntry user(String sid)
    • group

      public static PermissionEntry group(String sid)
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(PermissionEntry o)
      Specified by:
      compareTo in interface Comparable<PermissionEntry>