com.evolveum.midpoint.model.lens
Class LensUtil

java.lang.Object
  extended by com.evolveum.midpoint.model.lens.LensUtil

public class LensUtil
extends Object

Author:
semancik

Constructor Summary
LensUtil()
           
 
Method Summary
static
<V extends PrismValue>
ItemDelta<V>
consolidateTripleToDelta(ItemPath itemPath, DeltaSetTriple<? extends ItemValueWithOrigin<V>> triple, ItemDefinition itemDefinition, ItemDelta<V> aprioriItemDelta, PrismContainer<?> itemContainer, boolean addUnchangedValues, boolean filterExistingValues, String contextDescription)
          Consolidate the mappings of a single property to a delta.
static
<F extends ObjectType,P extends ObjectType>
Class<F>
determineFocusClass(Class<P> projectionClass)
           
static LensProjectionContext<AccountShadowType> getAccountContext(LensContext<UserType,AccountShadowType> context, PrismObject<AccountShadowType> equivalentAccount, ProvisioningService provisioningService, PrismContext prismContext, OperationResult result)
           
static LensProjectionContext<AccountShadowType> getAccountContext(LensContext<UserType,AccountShadowType> context, String resourceOid, String intent, ProvisioningService provisioningService, PrismContext prismContext, OperationResult result)
           
static LensProjectionContext<AccountShadowType> getOrCreateAccountContext(LensContext<UserType,AccountShadowType> context, ResourceShadowDiscriminator rsd)
           
static LensProjectionContext<AccountShadowType> getOrCreateAccountContext(LensContext<UserType,AccountShadowType> context, String resourceOid, String intent, ProvisioningService provisioningService, PrismContext prismContext, OperationResult result)
           
static
<F extends ObjectType,P extends ObjectType>
Class<P>
getProjectionClass(Class<F> focusClass)
           
static
<F extends ObjectType,P extends ObjectType>
ResourceType
getResource(LensContext<F,P> context, String resourceOid, ProvisioningService provisioningService, OperationResult result)
           
static
<T extends ObjectType>
boolean
isFocalClass(Class<T> clazz)
           
static
<F extends ObjectType,P extends ObjectType>
LensContext<F,P>
objectDeltasToContext(Collection<ObjectDelta<? extends ObjectType>> deltas, ProvisioningService provisioningService, PrismContext prismContext, Task task, OperationResult result)
           
static String refineAccountType(String intent, ResourceType resource, PrismContext prismContext)
           
static
<F extends ObjectType,P extends ObjectType>
void
traceContext(Trace logger, String activity, String phase, boolean important, LensContext<F,P> context, boolean showTriples)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LensUtil

public LensUtil()
Method Detail

traceContext

public static <F extends ObjectType,P extends ObjectType> void traceContext(Trace logger,
                                                                            String activity,
                                                                            String phase,
                                                                            boolean important,
                                                                            LensContext<F,P> context,
                                                                            boolean showTriples)
                         throws SchemaException
Throws:
SchemaException

getResource

public static <F extends ObjectType,P extends ObjectType> ResourceType getResource(LensContext<F,P> context,
                                                                                   String resourceOid,
                                                                                   ProvisioningService provisioningService,
                                                                                   OperationResult result)
                                throws ObjectNotFoundException,
                                       CommunicationException,
                                       SchemaException,
                                       ConfigurationException,
                                       SecurityViolationException
Throws:
ObjectNotFoundException
CommunicationException
SchemaException
ConfigurationException
SecurityViolationException

refineAccountType

public static String refineAccountType(String intent,
                                       ResourceType resource,
                                       PrismContext prismContext)
                                throws SchemaException
Throws:
SchemaException

getAccountContext

public static LensProjectionContext<AccountShadowType> getAccountContext(LensContext<UserType,AccountShadowType> context,
                                                                         PrismObject<AccountShadowType> equivalentAccount,
                                                                         ProvisioningService provisioningService,
                                                                         PrismContext prismContext,
                                                                         OperationResult result)
                                                                  throws ObjectNotFoundException,
                                                                         CommunicationException,
                                                                         SchemaException,
                                                                         ConfigurationException,
                                                                         SecurityViolationException
Throws:
ObjectNotFoundException
CommunicationException
SchemaException
ConfigurationException
SecurityViolationException

getAccountContext

public static LensProjectionContext<AccountShadowType> getAccountContext(LensContext<UserType,AccountShadowType> context,
                                                                         String resourceOid,
                                                                         String intent,
                                                                         ProvisioningService provisioningService,
                                                                         PrismContext prismContext,
                                                                         OperationResult result)
                                                                  throws ObjectNotFoundException,
                                                                         CommunicationException,
                                                                         SchemaException,
                                                                         ConfigurationException,
                                                                         SecurityViolationException
Throws:
ObjectNotFoundException
CommunicationException
SchemaException
ConfigurationException
SecurityViolationException

getOrCreateAccountContext

public static LensProjectionContext<AccountShadowType> getOrCreateAccountContext(LensContext<UserType,AccountShadowType> context,
                                                                                 String resourceOid,
                                                                                 String intent,
                                                                                 ProvisioningService provisioningService,
                                                                                 PrismContext prismContext,
                                                                                 OperationResult result)
                                                                          throws ObjectNotFoundException,
                                                                                 CommunicationException,
                                                                                 SchemaException,
                                                                                 ConfigurationException,
                                                                                 SecurityViolationException
Throws:
ObjectNotFoundException
CommunicationException
SchemaException
ConfigurationException
SecurityViolationException

getOrCreateAccountContext

public static LensProjectionContext<AccountShadowType> getOrCreateAccountContext(LensContext<UserType,AccountShadowType> context,
                                                                                 ResourceShadowDiscriminator rsd)

objectDeltasToContext

public static <F extends ObjectType,P extends ObjectType> LensContext<F,P> objectDeltasToContext(Collection<ObjectDelta<? extends ObjectType>> deltas,
                                                                                                 ProvisioningService provisioningService,
                                                                                                 PrismContext prismContext,
                                                                                                 Task task,
                                                                                                 OperationResult result)
                                                                                    throws SchemaException,
                                                                                           ObjectNotFoundException,
                                                                                           CommunicationException,
                                                                                           ConfigurationException
Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException

determineFocusClass

public static <F extends ObjectType,P extends ObjectType> Class<F> determineFocusClass(Class<P> projectionClass)

isFocalClass

public static <T extends ObjectType> boolean isFocalClass(Class<T> clazz)

getProjectionClass

public static <F extends ObjectType,P extends ObjectType> Class<P> getProjectionClass(Class<F> focusClass)

consolidateTripleToDelta

public static <V extends PrismValue> ItemDelta<V> consolidateTripleToDelta(ItemPath itemPath,
                                                                           DeltaSetTriple<? extends ItemValueWithOrigin<V>> triple,
                                                                           ItemDefinition itemDefinition,
                                                                           ItemDelta<V> aprioriItemDelta,
                                                                           PrismContainer<?> itemContainer,
                                                                           boolean addUnchangedValues,
                                                                           boolean filterExistingValues,
                                                                           String contextDescription)
                                                                throws ExpressionEvaluationException,
                                                                       PolicyViolationException,
                                                                       SchemaException
Consolidate the mappings of a single property to a delta. It takes the convenient structure of ItemValueWithOrigin triple. It produces the delta considering the mapping exclusion, authoritativeness and strength.

Throws:
ExpressionEvaluationException
PolicyViolationException
SchemaException


Copyright © 2013 evolveum. All Rights Reserved.