Class SelectorProcessingContext
java.lang.Object
com.evolveum.midpoint.schema.selector.eval.SelectorProcessingContext
- Direct Known Subclasses:
FilteringContext
,MatchingContext
Keeps everything needed to evaluate whether a clause matches given value or how is clause translated to a filter.
Most probably will be simplified in the future.
-
Field Summary
Modifier and TypeFieldDescriptionfinal @Nullable ObjectFilterExpressionEvaluator
If provided, resolves expressions in filters.final @NotNull OrgTreeEvaluator
Evaluates organization tree questions (is descendant, is ancestor).final @Nullable OwnerResolver
Resolves the object owners, mainly for the `owner` clause.final @NotNull ProcessingTracer<? super SelectorTraceEvent>
Traces evaluation of selectors and clauses, typically into standard log. -
Constructor Summary
ConstructorDescriptionSelectorProcessingContext
(@Nullable ObjectFilterExpressionEvaluator filterEvaluator, @NotNull ProcessingTracer<? super SelectorTraceEvent> tracer, @NotNull OrgTreeEvaluator orgTreeEvaluator, @Nullable SubjectedEvaluationContext subjectedEvaluationContext, @Nullable OwnerResolver ownerResolver, @Nullable ObjectResolver objectResolver, @NotNull ClauseProcessingContextDescription description, @NotNull SubjectedEvaluationContext.DelegatorSelection delegatorSelection) -
Method Summary
Modifier and TypeMethodDescription@Nullable FocusType
@Nullable String
@NotNull String[]
getSelfPlusRolesOids
(@NotNull SubjectedEvaluationContext.DelegatorSelection delegatorSelectionMode) @NotNull String[]
getSelfPlusRolesOidsArray
(SubjectedEvaluationContext.DelegatorSelection delegatorSelectionMode) PrismObject<? extends ObjectType>
resolveReference
(ObjectReferenceType ref, Object context, String referenceName) Resolves reference to full object.void
traceClauseApplicable
(@NotNull SelectorClause clause, @NotNull String message, Object... arguments) void
traceClauseNotApplicable
(@NotNull SelectorClause clause, @NotNull String message, Object... arguments) void
traceMatchingEnd
(ValueSelector selector, @NotNull PrismValue value, boolean match) void
traceMatchingStart
(ValueSelector selector, @NotNull PrismValue value)
-
Field Details
-
filterEvaluator
If provided, resolves expressions in filters. -
tracer
Traces evaluation of selectors and clauses, typically into standard log. Mainly used for troubleshooting of selectors and their clauses; especially important for https://docs.evolveum.com/midpoint/reference/diag/troubleshooting/authorizations. -
orgTreeEvaluator
Evaluates organization tree questions (is descendant, is ancestor). Usually it is the repository itself. -
ownerResolver
Resolves the object owners, mainly for the `owner` clause.
-
-
Constructor Details
-
SelectorProcessingContext
public SelectorProcessingContext(@Nullable @Nullable ObjectFilterExpressionEvaluator filterEvaluator, @NotNull @NotNull ProcessingTracer<? super SelectorTraceEvent> tracer, @NotNull @NotNull OrgTreeEvaluator orgTreeEvaluator, @Nullable @Nullable SubjectedEvaluationContext subjectedEvaluationContext, @Nullable @Nullable OwnerResolver ownerResolver, @Nullable @Nullable ObjectResolver objectResolver, @NotNull @NotNull ClauseProcessingContextDescription description, @NotNull @NotNull SubjectedEvaluationContext.DelegatorSelection delegatorSelection)
-
-
Method Details
-
getPrincipalOid
-
getPrincipalFocus
-
getSelfOids
-
getSelfPlusRolesOids
@NotNull public @NotNull Set<String> getSelfPlusRolesOids(@NotNull @NotNull SubjectedEvaluationContext.DelegatorSelection delegatorSelectionMode) -
getSelfOidsArray
@NotNull public @NotNull String[] getSelfOidsArray(SubjectedEvaluationContext.DelegatorSelection delegation) -
getSelfPlusRolesOidsArray
@NotNull public @NotNull String[] getSelfPlusRolesOidsArray(SubjectedEvaluationContext.DelegatorSelection delegatorSelectionMode) -
resolveReference
public PrismObject<? extends ObjectType> resolveReference(ObjectReferenceType ref, Object context, String referenceName) Resolves reference to full object. TODO Note that this is not necessary in some cases (e.g. when comparing only with `self` clause). So we should do this more lazily. See MID-8899. -
traceMatchingStart
-
traceMatchingEnd
public void traceMatchingEnd(ValueSelector selector, @NotNull @NotNull PrismValue value, boolean match) -
traceClauseNotApplicable
public void traceClauseNotApplicable(@NotNull @NotNull SelectorClause clause, @NotNull @NotNull String message, Object... arguments) -
traceClauseApplicable
public void traceClauseApplicable(@NotNull @NotNull SelectorClause clause, @NotNull @NotNull String message, Object... arguments)
-