Record Class OtherPrivilegesLimitations.Limitation

java.lang.Object
java.lang.Record
com.evolveum.midpoint.security.api.OtherPrivilegesLimitations.Limitation
All Implemented Interfaces:
ShortDumpable, Serializable, Cloneable
Enclosing class:
OtherPrivilegesLimitations

public static record OtherPrivilegesLimitations.Limitation(@NotNull Collection<OtherPrivilegesLimitations.Type> allowedTypes) extends Record implements ShortDumpable, Serializable, Cloneable
Represents limitation to a given target (i.e. through a given assignment path or paths). Mutable.
See Also:
  • Constructor Details

    • Limitation

      public Limitation(@NotNull @NotNull Collection<OtherPrivilegesLimitations.Type> allowedTypes)
      Creates an instance of a Limitation record class.
      Parameters:
      allowedTypes - the value for the allowedTypes record component
  • Method Details

    • allowingAll

      public static OtherPrivilegesLimitations.Limitation allowingAll()
    • allowingNone

      public static OtherPrivilegesLimitations.Limitation allowingNone()
    • restrict

      public void restrict(@Nullable @Nullable OtherPrivilegesLimitationType bean)
    • clone

      Overrides:
      clone in class Object
    • allow

      @VisibleForTesting public OtherPrivilegesLimitations.Limitation allow(@NotNull @NotNull OtherPrivilegesLimitations.Type limitationType)
    • allow

    • allows

      public boolean allows(@NotNull @NotNull OtherPrivilegesLimitations.Type limitationType)
    • shortDump

      public void shortDump(StringBuilder sb)
      Description copied from interface: ShortDumpable
      Show the content of the object intended for diagnostics. This method is supposed to append a compact, human-readable output in a single line. Unlike toString() method, there is no requirement to identify the actual class or type of the object. It is assumed that the class/type will be obvious from the context in which the output is used.
      Specified by:
      shortDump in interface ShortDumpable
      Parameters:
      sb - StringBuilder to which to a compact one-line content of the object intended for diagnostics by system administrator should be appended.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • allowedTypes

      @NotNull public @NotNull Collection<OtherPrivilegesLimitations.Type> allowedTypes()
      Returns the value of the allowedTypes record component.
      Returns:
      the value of the allowedTypes record component