Class ModelImplUtils
java.lang.Object
com.evolveum.midpoint.model.impl.util.ModelImplUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAssignmentPathVariables
(AssignmentPathVariables assignmentPathVariables, VariablesMap VariablesMap) static void
clearRequestee
(Task task) static PrismReferenceValue
determineAuditTarget
(Collection<ObjectDelta<? extends ObjectType>> deltas) static PrismReferenceValue
determineAuditTargetDeltaOps
(Collection<ObjectDeltaOperation<? extends ObjectType>> deltaOps) static void
encrypt
(Collection<ObjectDelta<? extends ObjectType>> deltas, Protector protector, ModelExecuteOptions options, OperationResult result) static <V extends PrismValue,
F extends ObjectType>
@NotNull List<V>evaluateScript
(ScriptExpression scriptExpression, LensContext<F> lensContext, VariablesMap variables, boolean useNew, String shortDesc, Task task, OperationResult parentResult) static String
static <O extends ObjectType>
@NotNull List<ObjectPolicyConfigurationType>getApplicablePolicies
(@Nullable Class<O> objectClass, List<String> objectSubtypes, SystemConfigurationType systemConfigurationType) static <F extends ObjectType>
@NotNull List<ObjectPolicyConfigurationType>getApplicablePolicies
(LensContext<F> context) static <F extends ObjectType>
ConflictResolutionTypegetConflictResolution
(LensContext<F> context) static VariablesMap
getDefaultVariablesMap
(@NotNull LensContext<?> context, @Nullable LensProjectionContext projCtx, boolean focusOdoAbsolute) static <O extends ObjectType>
VariablesMapgetDefaultVariablesMap
(PrismObject<? extends ObjectType> focus, PrismObject<? extends ShadowType> shadow, PrismObject<ResourceType> resource, PrismObject<SystemConfigurationType> configuration, LensElementContext<O> affectedElementContext) static VariablesMap
getDefaultVariablesMap
(ObjectType focus, ShadowType shadow, ResourceType resource, SystemConfigurationType configuration) static ModelExecuteOptions
getModelExecuteOptions
(PrismContainerValue<?> taskExtension) static <O extends ObjectType>
StringgetOperationUrlFromDelta
(ObjectDelta<O> delta) static CriticalityType
handleConnectorErrorCriticality
(ResourceType resourceType, Throwable e, OperationResult result) static void
recordException
(OperationResult result, Throwable e) static void
recordFatalError
(OperationResult result, String message, Throwable e) static void
recordFatalError
(OperationResult result, Throwable e) static void
recordPartialError
(OperationResult result, String message, Throwable e) static void
recordPartialError
(OperationResult result, Throwable e) static void
resolveRef
(PrismReferenceValue refVal, RepositoryService repository, boolean enforceReferentialIntegrity, boolean forceFilterReevaluation, EvaluationTimeType evaluationTime, String contextDesc, boolean throwExceptionOnFailure, OperationResult parentResult) Resolves a filter in a reference.static <T extends ObjectType>
voidresolveReferences
(ObjectDelta<T> objectDelta, RepositoryService repository, boolean enforceReferentialIntegrity, boolean forceFilterReevaluation, EvaluationTimeType resolutionTime, boolean throwExceptionOnFailure, OperationResult result) Resolves references contained in ADD and REPLACE value sets for item modifications in a given ObjectDelta.static <T extends ObjectType>
voidresolveReferences
(PrismObject<T> object, RepositoryService repository, boolean enforceReferentialIntegrity, boolean forceFilterReevaluation, EvaluationTimeType resolutionTime, boolean throwExceptionOnFailure, OperationResult result) Resolves references contained in given PrismObject.static void
setRequestee
(Task task, LensContext<?> context) static <F extends ObjectType>
voidsetRequestee
(Task task, LensFocusContext<F> context) static void
setRequestee
(Task task, PrismObject object) static void
validatePaging
(ObjectPaging paging)
-
Constructor Details
-
ModelImplUtils
public ModelImplUtils()
-
-
Method Details
-
validatePaging
-
recordFatalError
-
recordFatalError
-
recordException
-
recordPartialError
-
recordPartialError
-
getOperationUrlFromDelta
-
getApplicablePolicies
@NotNull public static <O extends ObjectType> @NotNull List<ObjectPolicyConfigurationType> getApplicablePolicies(@Nullable @Nullable Class<O> objectClass, List<String> objectSubtypes, SystemConfigurationType systemConfigurationType) throws ConfigurationException - Throws:
ConfigurationException
-
getApplicablePolicies
@NotNull public static <F extends ObjectType> @NotNull List<ObjectPolicyConfigurationType> getApplicablePolicies(LensContext<F> context) -
getConflictResolution
public static <F extends ObjectType> ConflictResolutionType getConflictResolution(LensContext<F> context) -
resolveReferences
public static <T extends ObjectType> void resolveReferences(PrismObject<T> object, RepositoryService repository, boolean enforceReferentialIntegrity, boolean forceFilterReevaluation, EvaluationTimeType resolutionTime, boolean throwExceptionOnFailure, OperationResult result) Resolves references contained in given PrismObject.- Parameters:
enforceReferentialIntegrity
- If true, missing reference causes fatal error when processing (if false, only warning is issued).forceFilterReevaluation
- If true, references are reevaluated even if OID is present. (Given that filter is present as well, of course.)
-
resolveReferences
public static <T extends ObjectType> void resolveReferences(ObjectDelta<T> objectDelta, RepositoryService repository, boolean enforceReferentialIntegrity, boolean forceFilterReevaluation, EvaluationTimeType resolutionTime, boolean throwExceptionOnFailure, OperationResult result) Resolves references contained in ADD and REPLACE value sets for item modifications in a given ObjectDelta. (specially treats collisions with values to be deleted) -
resolveRef
public static void resolveRef(PrismReferenceValue refVal, RepositoryService repository, boolean enforceReferentialIntegrity, boolean forceFilterReevaluation, EvaluationTimeType evaluationTime, String contextDesc, boolean throwExceptionOnFailure, OperationResult parentResult) Resolves a filter in a reference. Skips the resolution if there's an expression in a filter. (Currently checks only the top level!) -
encrypt
public static void encrypt(Collection<ObjectDelta<? extends ObjectType>> deltas, Protector protector, ModelExecuteOptions options, OperationResult result) -
setRequestee
-
setRequestee
-
setRequestee
-
clearRequestee
-
getModelExecuteOptions
-
getDefaultVariablesMap
public static VariablesMap getDefaultVariablesMap(@NotNull @NotNull LensContext<?> context, @Nullable @Nullable LensProjectionContext projCtx, boolean focusOdoAbsolute) throws SchemaException, ConfigurationException -
getDefaultVariablesMap
public static VariablesMap getDefaultVariablesMap(ObjectType focus, ShadowType shadow, ResourceType resource, SystemConfigurationType configuration) -
getDefaultVariablesMap
public static <O extends ObjectType> VariablesMap getDefaultVariablesMap(PrismObject<? extends ObjectType> focus, PrismObject<? extends ShadowType> shadow, PrismObject<ResourceType> resource, PrismObject<SystemConfigurationType> configuration, LensElementContext<O> affectedElementContext) -
addAssignmentPathVariables
public static void addAssignmentPathVariables(AssignmentPathVariables assignmentPathVariables, VariablesMap VariablesMap) -
determineAuditTargetDeltaOps
public static PrismReferenceValue determineAuditTargetDeltaOps(Collection<ObjectDeltaOperation<? extends ObjectType>> deltaOps) -
determineAuditTarget
public static PrismReferenceValue determineAuditTarget(Collection<ObjectDelta<? extends ObjectType>> deltas) -
evaluateScript
@NotNull public static <V extends PrismValue,F extends ObjectType> @NotNull List<V> evaluateScript(ScriptExpression scriptExpression, LensContext<F> lensContext, VariablesMap variables, boolean useNew, String shortDesc, Task task, OperationResult parentResult) throws ExpressionEvaluationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException -
handleConnectorErrorCriticality
public static CriticalityType handleConnectorErrorCriticality(ResourceType resourceType, Throwable e, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, PolicyViolationException, ExpressionEvaluationException, ObjectAlreadyExistsException -
generateRequestIdentifier
-