public class LensUtil extends Object
Constructor and Description |
---|
LensUtil() |
Modifier and Type | Method and Description |
---|---|
static <V extends PrismValue,D extends ItemDefinition> |
addAssignmentPathVariables(Mapping.Builder<V,D> builder,
AssignmentPathVariables assignmentPathVariables) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
checkContextSanity(LensContext<F> context,
String activityDescription,
OperationResult result) |
static AssignmentPathVariables |
computeAssignmentPathVariables(AssignmentPath assignmentPath) |
static <V extends PrismValue,D extends ItemDefinition,I extends ItemValueWithOrigin<V,D>> |
consolidateTripleToDelta(ItemPath itemPath,
DeltaSetTriple<I> triple,
D itemDefinition,
ItemDelta<V,D> aprioriItemDelta,
PrismContainer<?> itemContainer,
ValueMatcher<?> valueMatcher,
Comparator<V> comparator,
boolean addUnchangedValues,
boolean filterExistingValues,
boolean isExclusiveStrong,
String contextDescription,
boolean applyWeak)
Consolidate the mappings of a single item to a delta.
|
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createAccountContext(LensContext<F> context,
ResourceShadowDiscriminator rsd) |
static PropertyDelta<XMLGregorianCalendar> |
createActivationTimestampDelta(com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType status,
XMLGregorianCalendar now,
PrismContainerDefinition<com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType> activationDefinition,
OriginType origin) |
static PrismContainer<com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType> |
createAssignmentSingleValueContainerClone(com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType assignmentType) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createCreateMetadata(LensContext<F> context,
XMLGregorianCalendar now,
Task task) |
static <V extends PrismValue,D extends ItemDefinition,F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> |
createFocusMapping(MappingFactory mappingFactory,
LensContext<F> context,
com.evolveum.midpoint.xml.ns._public.common.common_3.MappingType mappingType,
com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType originObject,
ObjectDeltaObject<F> focusOdo,
AssignmentPathVariables assignmentPathVariables,
Integer iteration,
String iterationToken,
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType> configuration,
XMLGregorianCalendar now,
String contextDesc,
Task task,
OperationResult result) |
static <V extends PrismValue,D extends ItemDefinition,F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> |
createFocusMapping(MappingFactory mappingFactory,
LensContext<F> context,
com.evolveum.midpoint.xml.ns._public.common.common_3.MappingType mappingType,
com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType originObject,
ObjectDeltaObject<F> focusOdo,
AssignmentPathVariables assignmentPathVariables,
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType> configuration,
XMLGregorianCalendar now,
String contextDesc,
Task task,
OperationResult result) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createModifyMetadataDeltas(LensContext<F> context,
ItemPath metadataPath,
PrismObjectDefinition<T> def,
XMLGregorianCalendar now,
Task task) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createObjectDeltaOperation(ObjectDelta<F> focusDelta,
OperationResult result,
LensElementContext<F> focusContext,
LensProjectionContext projCtx) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
createObjectDeltaOperation(ObjectDelta<T> objectDelta,
OperationResult result,
LensElementContext<T> objectContext,
LensProjectionContext projCtx,
com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType resource) |
static int |
determineMaxIterations(com.evolveum.midpoint.xml.ns._public.common.common_3.IterationSpecificationType iterationSpecType) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
evaluateIterationCondition(LensContext<F> context,
LensElementContext<?> accountContext,
com.evolveum.midpoint.xml.ns._public.common.common_3.IterationSpecificationType iterationType,
int iteration,
String iterationToken,
boolean beforeIteration,
ExpressionFactory expressionFactory,
ExpressionVariables variables,
Task task,
OperationResult result) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> |
findAPrioriDelta(LensContext<F> context,
LensProjectionContext projCtx)
Extracts the delta from this projection context and also from all other projection contexts that have
equivalent discriminator.
|
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> |
findAPrioriDelta(LensContext<F> context,
LensProjectionContext projCtx,
ItemPath projectionPropertyPath)
Extracts the delta from this projection context and also from all other projection contexts that have
equivalent discriminator.
|
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
findLowerOrderContext(LensContext<F> context,
LensProjectionContext refProjCtx) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
findRelatedContexts(LensContext<F> context,
LensProjectionContext refProjCtx)
Returns a list of context that have equivalent discriminator with the reference context.
|
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
formatIterationToken(LensContext<F> context,
LensElementContext<?> accountContext,
com.evolveum.midpoint.xml.ns._public.common.common_3.IterationSpecificationType iterationType,
int iteration,
ExpressionFactory expressionFactory,
ExpressionVariables variables,
Task task,
OperationResult result) |
static String |
formatIterationTokenDefault(int iteration) |
static com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType |
getAssignmentType(ItemDeltaItem<PrismContainerValue<com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType>,PrismContainerDefinition<com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType>> assignmentIdi,
boolean old) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getChannel(LensContext<F> context,
Task task) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> |
getFocusDefinition(LensContext<F> context) |
static Object |
getIterationTokenVariableValue(LensProjectionContext accCtx) |
static Object |
getIterationVariableValue(LensProjectionContext accCtx) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getOrCreateProjectionContext(LensContext<F> context,
ResourceShadowDiscriminator rsd) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> |
getProjectionContext(LensContext<F> context,
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> equivalentAccount,
ProvisioningService provisioningService,
PrismContext prismContext,
Task task,
OperationResult result) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> |
getProjectionContext(LensContext<F> context,
String resourceOid,
com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType kind,
String intent,
ProvisioningService provisioningService,
PrismContext prismContext,
Task task,
OperationResult result) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getResource(LensContext<F> context,
String resourceOid,
ObjectResolver objectResolver,
Task task,
OperationResult result) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getResource(LensContext<F> context,
String resourceOid,
ProvisioningService provisioningService,
Task task,
OperationResult result) |
static PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType> |
getSystemConfiguration(LensContext context,
RepositoryService repositoryService,
OperationResult result) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
hasDependentContext(LensContext<F> context,
LensProjectionContext targetProjectionContext) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
hasLowerOrderContext(LensContext<F> context,
LensProjectionContext refProjCtx) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
isDependencyTargetContext(LensProjectionContext sourceProjContext,
LensProjectionContext targetProjectionContext,
com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectTypeDependencyType dependency) |
static boolean |
isValid(com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType assignmentType,
XMLGregorianCalendar now,
ActivationComputer activationComputer) |
static boolean |
isValid(com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType focus,
XMLGregorianCalendar now,
ActivationComputer activationComputer) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
moveTriggers(LensProjectionContext projCtx,
LensFocusContext<F> focusCtx) |
static String |
refineProjectionIntent(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType kind,
String intent,
com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType resource,
PrismContext prismContext) |
static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
setContextOid(LensContext<F> context,
LensElementContext<T> objectContext,
String oid) |
static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
setDeltaOldValue(LensElementContext<O> ctx,
ItemDelta<?,?> itemDelta) |
static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
setDeltaOldValue(LensElementContext<O> ctx,
ObjectDelta<O> objectDelta) |
static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
traceContext(Trace logger,
String activity,
String phase,
boolean important,
LensContext<F> context,
boolean showTriples) |
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void traceContext(Trace logger, String activity, String phase, boolean important, LensContext<F> context, boolean showTriples) throws SchemaException
SchemaException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType getResource(LensContext<F> context, String resourceOid, ProvisioningService provisioningService, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType getResource(LensContext<F> context, String resourceOid, ObjectResolver objectResolver, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
public static String refineProjectionIntent(com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType kind, String intent, com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType resource, PrismContext prismContext) throws SchemaException
SchemaException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> LensProjectionContext getProjectionContext(LensContext<F> context, PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> equivalentAccount, ProvisioningService provisioningService, PrismContext prismContext, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> LensProjectionContext getProjectionContext(LensContext<F> context, String resourceOid, com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowKindType kind, String intent, ProvisioningService provisioningService, PrismContext prismContext, Task task, OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> LensProjectionContext getOrCreateProjectionContext(LensContext<F> context, ResourceShadowDiscriminator rsd)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> LensProjectionContext createAccountContext(LensContext<F> context, ResourceShadowDiscriminator rsd)
public static <V extends PrismValue,D extends ItemDefinition,I extends ItemValueWithOrigin<V,D>> ItemDelta<V,D> consolidateTripleToDelta(ItemPath itemPath, DeltaSetTriple<I> triple, D itemDefinition, ItemDelta<V,D> aprioriItemDelta, PrismContainer<?> itemContainer, ValueMatcher<?> valueMatcher, Comparator<V> comparator, boolean addUnchangedValues, boolean filterExistingValues, boolean isExclusiveStrong, String contextDescription, boolean applyWeak) throws ExpressionEvaluationException, PolicyViolationException, SchemaException
public static PropertyDelta<XMLGregorianCalendar> createActivationTimestampDelta(com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType status, XMLGregorianCalendar now, PrismContainerDefinition<com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationType> activationDefinition, OriginType origin)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void moveTriggers(LensProjectionContext projCtx, LensFocusContext<F> focusCtx) throws SchemaException
SchemaException
public static Object getIterationVariableValue(LensProjectionContext accCtx)
public static Object getIterationTokenVariableValue(LensProjectionContext accCtx)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> PropertyDelta<T> findAPrioriDelta(LensContext<F> context, LensProjectionContext projCtx, ItemPath projectionPropertyPath) throws SchemaException
SchemaException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> ObjectDelta<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> findAPrioriDelta(LensContext<F> context, LensProjectionContext projCtx) throws SchemaException
SchemaException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> List<LensProjectionContext> findRelatedContexts(LensContext<F> context, LensProjectionContext refProjCtx)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> boolean hasLowerOrderContext(LensContext<F> context, LensProjectionContext refProjCtx)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> boolean hasDependentContext(LensContext<F> context, LensProjectionContext targetProjectionContext)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> boolean isDependencyTargetContext(LensProjectionContext sourceProjContext, LensProjectionContext targetProjectionContext, com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceObjectTypeDependencyType dependency)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> LensProjectionContext findLowerOrderContext(LensContext<F> context, LensProjectionContext refProjCtx)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void setContextOid(LensContext<F> context, LensElementContext<T> objectContext, String oid)
public static PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType> getSystemConfiguration(LensContext context, RepositoryService repositoryService, OperationResult result) throws ObjectNotFoundException, SchemaException
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> PrismObjectDefinition<F> getFocusDefinition(LensContext<F> context)
public static int determineMaxIterations(com.evolveum.midpoint.xml.ns._public.common.common_3.IterationSpecificationType iterationSpecType)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String formatIterationToken(LensContext<F> context, LensElementContext<?> accountContext, com.evolveum.midpoint.xml.ns._public.common.common_3.IterationSpecificationType iterationType, int iteration, ExpressionFactory expressionFactory, ExpressionVariables variables, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException
public static String formatIterationTokenDefault(int iteration)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> boolean evaluateIterationCondition(LensContext<F> context, LensElementContext<?> accountContext, com.evolveum.midpoint.xml.ns._public.common.common_3.IterationSpecificationType iterationType, int iteration, String iterationToken, boolean beforeIteration, ExpressionFactory expressionFactory, ExpressionVariables variables, Task task, OperationResult result) throws ExpressionEvaluationException, SchemaException, ObjectNotFoundException
public static boolean isValid(com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType assignmentType, XMLGregorianCalendar now, ActivationComputer activationComputer)
public static boolean isValid(com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType focus, XMLGregorianCalendar now, ActivationComputer activationComputer)
public static <V extends PrismValue,D extends ItemDefinition,F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> Mapping<V,D> createFocusMapping(MappingFactory mappingFactory, LensContext<F> context, com.evolveum.midpoint.xml.ns._public.common.common_3.MappingType mappingType, com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType originObject, ObjectDeltaObject<F> focusOdo, AssignmentPathVariables assignmentPathVariables, PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType> configuration, XMLGregorianCalendar now, String contextDesc, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, ObjectNotFoundException
public static <V extends PrismValue,D extends ItemDefinition,F extends com.evolveum.midpoint.xml.ns._public.common.common_3.FocusType> Mapping<V,D> createFocusMapping(MappingFactory mappingFactory, LensContext<F> context, com.evolveum.midpoint.xml.ns._public.common.common_3.MappingType mappingType, com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType originObject, ObjectDeltaObject<F> focusOdo, AssignmentPathVariables assignmentPathVariables, Integer iteration, String iterationToken, PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType> configuration, XMLGregorianCalendar now, String contextDesc, Task task, OperationResult result) throws SchemaException, ExpressionEvaluationException, ObjectNotFoundException
public static AssignmentPathVariables computeAssignmentPathVariables(AssignmentPath assignmentPath) throws SchemaException
SchemaException
public static <V extends PrismValue,D extends ItemDefinition> Mapping.Builder<V,D> addAssignmentPathVariables(Mapping.Builder<V,D> builder, AssignmentPathVariables assignmentPathVariables)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void checkContextSanity(LensContext<F> context, String activityDescription, OperationResult result) throws SchemaException, PolicyViolationException
public static PrismContainer<com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType> createAssignmentSingleValueContainerClone(com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType assignmentType) throws SchemaException
SchemaException
public static com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType getAssignmentType(ItemDeltaItem<PrismContainerValue<com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType>,PrismContainerDefinition<com.evolveum.midpoint.xml.ns._public.common.common_3.AssignmentType>> assignmentIdi, boolean old)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> com.evolveum.midpoint.xml.ns._public.common.common_3.MetadataType createCreateMetadata(LensContext<F> context, XMLGregorianCalendar now, Task task)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> Collection<? extends ItemDelta<?,?>> createModifyMetadataDeltas(LensContext<F> context, ItemPath metadataPath, PrismObjectDefinition<T> def, XMLGregorianCalendar now, Task task)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String getChannel(LensContext<F> context, Task task)
public static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void setDeltaOldValue(LensElementContext<O> ctx, ItemDelta<?,?> itemDelta)
public static <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void setDeltaOldValue(LensElementContext<O> ctx, ObjectDelta<O> objectDelta)
public static <F extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> LensObjectDeltaOperation<F> createObjectDeltaOperation(ObjectDelta<F> focusDelta, OperationResult result, LensElementContext<F> focusContext, LensProjectionContext projCtx)
public static <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> LensObjectDeltaOperation<T> createObjectDeltaOperation(ObjectDelta<T> objectDelta, OperationResult result, LensElementContext<T> objectContext, LensProjectionContext projCtx, com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType resource)
Copyright © 2016 evolveum. All rights reserved.