Record Class ObjectOperationPolicyHelper.EffectiveMarksAndPolicies

java.lang.Object
java.lang.Record
com.evolveum.midpoint.repo.common.ObjectOperationPolicyHelper.EffectiveMarksAndPolicies
Enclosing class:
ObjectOperationPolicyHelper

public static record ObjectOperationPolicyHelper.EffectiveMarksAndPolicies(@NotNull Collection<ObjectReferenceType> productionModeEffectiveMarkRefs, @NotNull Collection<ObjectReferenceType> currentModeEffectiveMarkRefs, @NotNull ObjectOperationPolicyType effectiveOperationPolicy, boolean isProtected) extends Record
Contains effective mark refs (both production-mode and current-mode), and computed effective operation policy (for the current mode). Note that mark ref collections are always empty for generic repository. The client must make sure that the current-mode information on mark refs will not get into the repo!
  • Constructor Details

    • EffectiveMarksAndPolicies

      public EffectiveMarksAndPolicies(@NotNull @NotNull Collection<ObjectReferenceType> productionModeEffectiveMarkRefs, @NotNull @NotNull Collection<ObjectReferenceType> currentModeEffectiveMarkRefs, @NotNull @NotNull ObjectOperationPolicyType effectiveOperationPolicy, boolean isProtected)
      Creates an instance of a EffectiveMarksAndPolicies record class.
      Parameters:
      productionModeEffectiveMarkRefs - the value for the productionModeEffectiveMarkRefs record component
      currentModeEffectiveMarkRefs - the value for the currentModeEffectiveMarkRefs record component
      effectiveOperationPolicy - the value for the effectiveOperationPolicy record component
      isProtected - the value for the isProtected record component
  • Method Details

    • applyTo

      public void applyTo(@NotNull @NotNull ObjectType object)
      Applies current-mode effective marks and policies. BEWARE: make sure this information will not get into the repo!
    • toString

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • productionModeEffectiveMarkRefs

      @NotNull public @NotNull Collection<ObjectReferenceType> productionModeEffectiveMarkRefs()
      Returns the value of the productionModeEffectiveMarkRefs record component.
      Returns:
      the value of the productionModeEffectiveMarkRefs record component
    • currentModeEffectiveMarkRefs

      @NotNull public @NotNull Collection<ObjectReferenceType> currentModeEffectiveMarkRefs()
      Returns the value of the currentModeEffectiveMarkRefs record component.
      Returns:
      the value of the currentModeEffectiveMarkRefs record component
    • effectiveOperationPolicy

      @NotNull public @NotNull ObjectOperationPolicyType effectiveOperationPolicy()
      Returns the value of the effectiveOperationPolicy record component.
      Returns:
      the value of the effectiveOperationPolicy record component
    • isProtected

      public boolean isProtected()
      Returns the value of the isProtected record component.
      Returns:
      the value of the isProtected record component