Class ContextLoader
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.lens.projector.loader.ContextLoader
-
- All Implemented Interfaces:
ProjectorProcessor
@Component public class ContextLoader extends Object implements ProjectorProcessor
Context loader loads the missing parts of the context. The context enters the projector with just the minimum information. Context loader gets missing data such as accounts. It gets them from the repository or provisioning as necessary. It follows the account links in focus (linkRef) and focus deltas.- Author:
- Radovan Semancik
-
-
Constructor Summary
Constructors Constructor Description ContextLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <F extends ObjectType>
voidload(@NotNull LensContext<F> context, @NotNull String activityDescription, XMLGregorianCalendar ignored, @NotNull Task task, @NotNull OperationResult result)
Loads the whole context.<O extends ObjectType>
voidloadFocusContext(LensContext<O> context, Task task, OperationResult result)
Loads just the focus context; projections are ignored at this moment.void
loadFullShadow(@NotNull LensProjectionContext projCtx, String reason, Task task, OperationResult result)
FIXME this method sometimes return repo-only shadow in the case of consistency mechanism is applied; see `TestConsistencyReaper.test150` and MID-7970.void
loadFullShadowNoDiscovery(@NotNull LensProjectionContext projCtx, String reason, Task task, OperationResult result)
<F extends FocusType>
voidreloadSecurityPolicyIfNeeded(@NotNull LensContext<F> context, @NotNull LensFocusContext<F> focusContext, Task task, OperationResult result)
<F extends ObjectType>
voidupdateArchetypePolicyAndRelatives(@NotNull LensFocusContext<F> focusContext, boolean overwrite, @NotNull Task task, @NotNull OperationResult result)
Updates the following in the focus context: - list of archetypes, - (merged) archetype policy (stemming from archetypes), - focus template (stemming from archetype policy).<F extends ObjectType>
voidupdateProjectionContext(LensContext<F> context, LensProjectionContext projectionContext, Task task, OperationResult result)
Updates the projection context.
-
-
-
Field Detail
-
CLASS_DOT
public static final String CLASS_DOT
-
-
Method Detail
-
load
public <F extends ObjectType> void load(@NotNull @NotNull LensContext<F> context, @NotNull @NotNull String activityDescription, XMLGregorianCalendar ignored, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, PolicyViolationException, ExpressionEvaluationException
Loads the whole context. The loading is repeated if the focus is modified during the `load` operation. See MID-7725.
-
loadFocusContext
public <O extends ObjectType> void loadFocusContext(LensContext<O> context, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Loads just the focus context; projections are ignored at this moment.
-
updateProjectionContext
public <F extends ObjectType> void updateProjectionContext(LensContext<F> context, LensProjectionContext projectionContext, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Updates the projection context. For exact meaning seeProjectionUpdateOperation
.
-
updateArchetypePolicyAndRelatives
public <F extends ObjectType> void updateArchetypePolicyAndRelatives(@NotNull @NotNull LensFocusContext<F> focusContext, boolean overwrite, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ObjectNotFoundException, ConfigurationException, PolicyViolationException
Updates the following in the focus context: - list of archetypes, - (merged) archetype policy (stemming from archetypes), - focus template (stemming from archetype policy).- Parameters:
overwrite
- If true, we overwrite the information (archetype policy) previously set. This flag is set e.g. after inbounds. [Does not apply to externally set focus template. That one is never changed.]- Throws:
SchemaException
ObjectNotFoundException
ConfigurationException
PolicyViolationException
-
loadFullShadow
public void loadFullShadow(@NotNull @NotNull LensProjectionContext projCtx, String reason, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
FIXME this method sometimes return repo-only shadow in the case of consistency mechanism is applied; see `TestConsistencyReaper.test150` and MID-7970.
-
loadFullShadowNoDiscovery
public void loadFullShadowNoDiscovery(@NotNull @NotNull LensProjectionContext projCtx, String reason, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
reloadSecurityPolicyIfNeeded
public <F extends FocusType> void reloadSecurityPolicyIfNeeded(@NotNull @NotNull LensContext<F> context, @NotNull @NotNull LensFocusContext<F> focusContext, Task task, OperationResult result) throws ExpressionEvaluationException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
-
-