Class ArchetypeRefClause

java.lang.Object
com.evolveum.midpoint.schema.selector.spec.SelectorClause
com.evolveum.midpoint.schema.selector.spec.ArchetypeRefClause
All Implemented Interfaces:
DebugDumpable, Serializable

public class ArchetypeRefClause extends SelectorClause
Processes the `archetypeRef` clause. For checking assignments vs effective archetype references, please see javadoc for matches(PrismValue, MatchingContext) method.
See Also:
  • Method Details

    • getName

      @NotNull public @NotNull String getName()
      Description copied from class: SelectorClause
      Human-understandable name to be used e.g. in tracing messages.
      Specified by:
      getName in class SelectorClause
    • matches

      public boolean matches(@NotNull @NotNull PrismValue value, @NotNull @NotNull MatchingContext ctx)
      Determines whether the archetype(s) do match the selector. We intentionally check assignments instead of "effective" archetype OIDs here. The reasons are: 1. When GUI creates an object, it sets the assignment, not the archetypeRef. 2. Deltas that change the archetype refer to the assignment, not the archetypeRef. (This is important when determining whether we are leaving the zone of control.) The #1 could be worked around by setting the archetypeRef before autz are checked. However, the #2 is more serious. To be seen if this is the correct way forward. An alternative would be to compute the effective object content (archetypeRef, but also e.g. parentOrgRef) before the actual matching. However, this could be quite complex and expensive. So, currently we have no option other than matching the assignments values.
      Specified by:
      matches in class SelectorClause
    • toFilter

      public boolean toFilter(@NotNull @NotNull FilteringContext ctx) throws SchemaException
      Currently, we act upon the effective archetypeRef value, not the value in assignments. It should be far more efficient when running against the repository. Moreover, in the repository, it should be equivalent, as the effective value should precisely reflect the assignments' values there.
      Specified by:
      toFilter in class SelectorClause
      Throws:
      SchemaException
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object