Class ModelImplUtils
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.util.ModelImplUtils
-
public class ModelImplUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ModelImplUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addAssignmentPathVariables(AssignmentPathVariables assignmentPathVariables, VariablesMap VariablesMap, PrismContext prismContext)
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
generateRequestIdentifier()
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 evaluationTimeType, String contextDesc, boolean throwExceptionOnFailure, OperationResult parentResult)
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)
-
-
-
Method Detail
-
validatePaging
public static void validatePaging(ObjectPaging paging)
-
recordFatalError
public static void recordFatalError(OperationResult result, Throwable e)
-
recordFatalError
public static void recordFatalError(OperationResult result, String message, Throwable e)
-
recordException
public static void recordException(OperationResult result, Throwable e)
-
recordPartialError
public static void recordPartialError(OperationResult result, Throwable e)
-
recordPartialError
public static void recordPartialError(OperationResult result, String message, Throwable e)
-
getOperationUrlFromDelta
public static <O extends ObjectType> String getOperationUrlFromDelta(ObjectDelta<O> delta)
-
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 evaluationTimeType, String contextDesc, boolean throwExceptionOnFailure, OperationResult parentResult)
-
encrypt
public static void encrypt(Collection<ObjectDelta<? extends ObjectType>> deltas, Protector protector, ModelExecuteOptions options, OperationResult result)
-
setRequestee
public static void setRequestee(Task task, LensContext context)
-
setRequestee
public static <F extends ObjectType> void setRequestee(Task task, LensFocusContext<F> context)
-
setRequestee
public static void setRequestee(Task task, PrismObject object)
-
clearRequestee
public static void clearRequestee(Task task)
-
getModelExecuteOptions
public static ModelExecuteOptions getModelExecuteOptions(PrismContainerValue<?> taskExtension)
-
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, PrismContext prismContext)
-
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
public static String generateRequestIdentifier()
-
-