Class MidpointFunctionsImpl
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.expr.MidpointFunctionsImpl
-
- All Implemented Interfaces:
MidpointFunctions
@Component public class MidpointFunctionsImpl extends Object implements MidpointFunctions
- Author:
- semancik
-
-
Constructor Summary
Constructors Constructor Description MidpointFunctionsImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ObjectType>
StringaddObject(PrismObject<T> newObject)<T extends ObjectType>
StringaddObject(PrismObject<T> newObject, ModelExecuteOptions options)<T extends ObjectType>
StringaddObject(T newObject)<T extends ObjectType>
StringaddObject(T newObject, ModelExecuteOptions options)<O extends ObjectType>
voidaddRecomputeTrigger(PrismObject<O> object, Long timestamp)<O extends ObjectType>
voidaddRecomputeTrigger(O object, Long timestamp)<O extends ObjectType>
voidapplyDefinition(O object)Collection<PrismValue>collectAssignedFocusMappingsResults(ItemPath path)Returns all non-negative values from all focus mappings (targeted to given path) from all non-negative evaluated assignments.ExtensionTypecollectExtensions(AssignmentPathType path, int startAt)<F extends FocusType>
StringcomputeProjectionLifecycle(F focus, ShadowType shadow, ResourceType resource)Default function used to compute projection lifecycle.<T> IntegercountAccounts(ResourceType resourceType, String attributeName, T attributeValue)<T> IntegercountAccounts(ResourceType resourceType, QName attributeName, T attributeValue)<T> IntegercountAccounts(String resourceOid, QName attributeName, T attributeValue)<T extends ObjectType>
intcountObjects(Class<T> type, ObjectQuery query)Count objects.<T extends ObjectType>
intcountObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options)Count objects.StringcreateAccountActivationLink(UserType userType)<T extends ObjectType>
TcreateEmptyObject(Class<T> type)Creates empty prism object of specified type in memory.<T extends ObjectType>
TcreateEmptyObjectWithName(Class<T> type, PolyString name)Creates empty prism object of specified type and with specified name in memory.<T extends ObjectType>
TcreateEmptyObjectWithName(Class<T> type, PolyStringType name)Creates empty prism object of specified type and with specified name in memory.<T extends ObjectType>
TcreateEmptyObjectWithName(Class<T> type, String name)Creates empty prism object of specified type and with specified name in memory.StringcreatePasswordResetLink(UserType userType)StringcreateRegistrationConfirmationLink(UserType userType)<T extends ObjectType>
voiddeleteObject(Class<T> type, String oid)<T extends ObjectType>
voiddeleteObject(Class<T> type, String oid, ModelExecuteOptions options)<C extends Containerable>
S_ItemEntrydeltaFor(Class<C> objectClass)ObjectexecuteAdHocProvisioningScript(ResourceType resource, String language, String code)ObjectexecuteAdHocProvisioningScript(String resourceOid, String language, String code)voidexecuteChanges(ObjectDelta<? extends ObjectType>... deltas)Execute the provided object deltas.voidexecuteChanges(Collection<ObjectDelta<? extends ObjectType>> deltas)Execute the provided object deltas.voidexecuteChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options)Execute the provided object deltas.TaskTypeexecuteChangesAsynchronously(Collection<ObjectDelta<?>> deltas, ModelExecuteOptions options, String templateTaskOid)TaskTypeexecuteChangesAsynchronously(Collection<ObjectDelta<?>> deltas, ModelExecuteOptions options, String templateTaskOid, Task opTask, OperationResult result)PrismObject<UserType>findShadowOwner(String accountOid)Returns the User object representing owner of specified account (account shadow).<O extends ObjectType>
ArchetypeTypegetArchetype(O object)Assumes single archetype.<O extends ObjectType>
StringgetArchetypeOid(O object)Assumes single archetype.StringgetChannel()StringgetConst(String name)OperationResultgetCurrentResult()OperationResultgetCurrentResult(String operationName)TaskgetCurrentTask()<F extends ObjectType>
ModelElementContext<F>getFocusContext()<F extends FocusType>
List<F>getFocusesByCorrelationRule(Class<F> type, String resourceOid, ShadowKindType kind, String intent, ShadowType shadow)ShadowTypegetLinkedShadow(FocusType focus, ResourceType resource)ShadowTypegetLinkedShadow(FocusType focus, ResourceType resource, boolean repositoryObjectOnly)ShadowTypegetLinkedShadow(FocusType focus, String resourceOid)ShadowTypegetLinkedShadow(FocusType focus, String resourceOid, boolean repositoryObjectOnly)ShadowTypegetLinkedShadow(FocusType focus, String resourceOid, ShadowKindType kind, String intent)ShadowTypegetLinkedShadow(FocusType focus, String resourceOid, ShadowKindType kind, String intent, boolean repositoryObjectOnly)Collection<UserType>getManagers(UserType user)Collection<UserType>getManagers(UserType user, String orgType, boolean allowSelf)Collection<UserType>getManagersByOrgType(UserType user, String orgType)Collection<UserType>getManagersOfOrg(String orgOid)Collection<String>getManagersOids(UserType user)Collection<String>getManagersOidsExceptUser(UserType user)Collection<String>getManagersOidsExceptUser(Collection<ObjectReferenceType> userRefList)<V extends PrismValue,D extends ItemDefinition>
Mapping<V,D>getMapping()List<UserType>getMembers(String orgOid)List<ObjectReferenceType>getMembersAsReferences(String orgOid)Map<String,Object>getMessageBodyAsMap(AsyncUpdateMessageType message)<F extends ObjectType>
ModelContext<F>getModelContext()<T extends ObjectType>
TgetObject(Class<T> type, String oid)Returns object for provided OID.<T extends ObjectType>
TgetObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options)Returns object for provided OID.<O extends ObjectType,T>
List<O>getObjectsInConflictOnPropertyValue(O objectType, String propertyPathString, T propertyValue, boolean getAllConflicting)<O extends ObjectType,T>
List<O>getObjectsInConflictOnPropertyValue(O objectType, String propertyPathString, T propertyValue, String matchingRuleName, boolean getAllConflicting)OrgTypegetOrgByName(String name)OrgTypegetOrgByOid(String oid)Collection<String>getOrgUnits(UserType user)Collection<String>getOrgUnits(UserType user, QName relation)OrgTypegetParentOrgByOrgType(ObjectType object, String orgType)Returns parent orgs of the specified object that have a specific orgType.Collection<OrgType>getParentOrgs(ObjectType object)Returns all parent orgs of the specified object.Collection<OrgType>getParentOrgs(ObjectType object, String relation, String orgType)Returns parent orgs of the specified object that have a specific relation and orgType.Collection<OrgType>getParentOrgs(ObjectType object, QName relation, String orgType)Returns parent orgs of the specified object that have a specific relation and orgType.Collection<OrgType>getParentOrgsByRelation(ObjectType object, String relation)Returns parent orgs of the specified object that have a specific relation.Collection<OrgType>getParentOrgsByRelation(ObjectType object, QName relation)Returns parent orgs of the specified object that have a specific relation.StringgetPlaintext(ProtectedStringType protectedStringType)StringgetPlaintextAccountPassword(ShadowType account)StringgetPlaintextAccountPasswordFromDelta(ObjectDelta<? extends ShadowType> delta)StringgetPlaintextUserPassword(UserType user)StringgetPlaintextUserPasswordFromDeltas(List<ObjectDelta<UserType>> objectDeltas)MidPointPrincipalgetPrincipal()Returns principal representing the user whose identity is used to execute the expression.StringgetPrincipalOid()Returns OID of the current principal.PrismContextgetPrismContext()ModelProjectionContextgetProjectionContext()ProtectorgetProtector()RelationRegistrygetRelationRegistry()RepositoryServicegetRepositoryService()ObjectDeltaTypegetResourceDelta(ModelContext context, String resourceOid)Returns aggregated delta that is to be executed on a given resource.longgetSequenceCounter(String sequenceOid)List<ShadowType>getShadowsToActivate(Collection<? extends ModelElementContext> projectionContexts)Used for account activation notifier to collect all shadows which are going to be activated.UserTypegetUserByOid(String oid)WorkflowServicegetWorkflowService()booleanhasActiveAssignmentTargetSubtype(String roleSubtype)<O extends ObjectType>
booleanhasArchetype(O object, String archetypeOid)<F extends ObjectType>
booleanhasLinkedAccount(String resourceOid)Stringhello(String name)booleanisDirectlyAssigned(ObjectType target)<F extends FocusType>
booleanisDirectlyAssigned(F focusType, ObjectType target)<F extends FocusType>
booleanisDirectlyAssigned(F focusType, String targetOid)booleanisDirectlyAssigned(String targetOid)BooleanisEvaluateNew()Returns indication whether a script code is evaluating a new value.booleanisFullShadow()booleanisManager(UserType user)Returns true if user is a manager of any organizational unit.booleanisManagerOf(UserType user, String orgOid)Returns true if user is a manager of specified organizational unit.booleanisManagerOfOrgType(UserType user, String orgType)booleanisMemberOf(UserType user, String orgOid)booleanisProjectionExists()<T> booleanisUniqueAccountValue(ResourceType resourceType, ShadowType shadowType, String attributeName, T attributeValue)<T> booleanisUniquePropertyValue(ObjectType objectType, String propertyPathString, T propertyValue)<T extends ObjectType>
voidmodifyObject(ObjectDelta<T> modifyDelta)<T extends ObjectType>
voidmodifyObject(ObjectDelta<T> modifyDelta, ModelExecuteOptions options)Map<String,String>parseXmlToMap(String xml)Returns a map from the translated xml attribute - value pairs.<F extends ObjectType>
ModelContext<F>previewChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options)<F extends FocusType>
voidrecompute(Class<F> type, String oid)Recomputes focal object with the specified OID.ShadowTyperesolveEntitlement(ShadowAssociationType shadowAssociationType)<T extends ObjectType>
TresolveReference(ObjectReferenceType reference)<T extends ObjectType>
TresolveReferenceIfExists(ObjectReferenceType reference)<T extends ObjectType>
TsearchObjectByName(Class<T> type, PolyString name)Search for objects by name.<T extends ObjectType>
TsearchObjectByName(Class<T> type, PolyStringType name)Search for objects by name.<T extends ObjectType>
TsearchObjectByName(Class<T> type, String name)Search for objects by name.<T extends ObjectType>
List<T>searchObjects(Class<T> type, ObjectQuery query)Search for objects.<T extends ObjectType>
List<T>searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options)Search for objects.<T extends ObjectType>
voidsearchObjectsIterative(Class<T> type, ObjectQuery query, ResultHandler<T> handler)Search for objects in iterative fashion (using callback).<T extends ObjectType>
voidsearchObjectsIterative(Class<T> type, ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options)Search for objects in iterative fashion (using callback).<F extends FocusType>
PrismObject<F>searchShadowOwner(String accountOid)TaskTypesubmitTaskFromTemplate(String templateTaskOid, List<Item<?,?>> extensionItems)TaskTypesubmitTaskFromTemplate(String templateTaskOid, Map<QName,Object> extensionValues)OperationResulttestResource(String resourceOid)Test the resource connection and basic resource connector functionality.List<String>toList(String... s)Stringtranslate(LocalizableMessage message)Stringtranslate(LocalizableMessageType message)ModelContextunwrapModelContext(LensContextType lensContextType)MessageWrapperwrap(AsyncUpdateMessageType message)LensContextTypewrapModelContext(LensContext<?> lensContext)
-
-
-
Field Detail
-
CLASS_DOT
public static final String CLASS_DOT
-
-
Method Detail
-
getPrismContext
public PrismContext getPrismContext()
- Specified by:
getPrismContextin interfaceMidpointFunctions
-
getRelationRegistry
public RelationRegistry getRelationRegistry()
- Specified by:
getRelationRegistryin interfaceMidpointFunctions
-
toList
public List<String> toList(String... s)
- Specified by:
toListin interfaceMidpointFunctions
-
getUserByOid
public UserType getUserByOid(String oid) throws ObjectNotFoundException, SchemaException
- Specified by:
getUserByOidin interfaceMidpointFunctions- Throws:
ObjectNotFoundExceptionSchemaException
-
isMemberOf
public boolean isMemberOf(UserType user, String orgOid)
- Specified by:
isMemberOfin interfaceMidpointFunctions
-
getPlaintextUserPassword
public String getPlaintextUserPassword(UserType user) throws EncryptionException
- Specified by:
getPlaintextUserPasswordin interfaceMidpointFunctions- Throws:
EncryptionException
-
getPlaintextAccountPassword
public String getPlaintextAccountPassword(ShadowType account) throws EncryptionException
- Specified by:
getPlaintextAccountPasswordin interfaceMidpointFunctions- Throws:
EncryptionException
-
getPlaintextAccountPasswordFromDelta
public String getPlaintextAccountPasswordFromDelta(ObjectDelta<? extends ShadowType> delta) throws EncryptionException
- Specified by:
getPlaintextAccountPasswordFromDeltain interfaceMidpointFunctions- Throws:
EncryptionException
-
getPlaintextUserPasswordFromDeltas
public String getPlaintextUserPasswordFromDeltas(List<ObjectDelta<UserType>> objectDeltas) throws EncryptionException
- Specified by:
getPlaintextUserPasswordFromDeltasin interfaceMidpointFunctions- Throws:
EncryptionException
-
hasLinkedAccount
public <F extends ObjectType> boolean hasLinkedAccount(String resourceOid)
-
isDirectlyAssigned
public <F extends FocusType> boolean isDirectlyAssigned(F focusType, String targetOid)
- Specified by:
isDirectlyAssignedin interfaceMidpointFunctions
-
isDirectlyAssigned
public <F extends FocusType> boolean isDirectlyAssigned(F focusType, ObjectType target)
- Specified by:
isDirectlyAssignedin interfaceMidpointFunctions
-
isDirectlyAssigned
public boolean isDirectlyAssigned(String targetOid)
- Specified by:
isDirectlyAssignedin interfaceMidpointFunctions
-
isDirectlyAssigned
public boolean isDirectlyAssigned(ObjectType target)
- Specified by:
isDirectlyAssignedin interfaceMidpointFunctions
-
hasActiveAssignmentTargetSubtype
public boolean hasActiveAssignmentTargetSubtype(String roleSubtype)
-
getLinkedShadow
public ShadowType getLinkedShadow(FocusType focus, ResourceType resource) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getLinkedShadowin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
getLinkedShadow
public ShadowType getLinkedShadow(FocusType focus, ResourceType resource, boolean repositoryObjectOnly) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getLinkedShadowin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
getLinkedShadow
public ShadowType getLinkedShadow(FocusType focus, String resourceOid) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getLinkedShadowin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
getLinkedShadow
public ShadowType getLinkedShadow(FocusType focus, String resourceOid, boolean repositoryObjectOnly) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getLinkedShadowin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
getLinkedShadow
public ShadowType getLinkedShadow(FocusType focus, String resourceOid, ShadowKindType kind, String intent) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getLinkedShadowin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
getLinkedShadow
public ShadowType getLinkedShadow(FocusType focus, String resourceOid, ShadowKindType kind, String intent, boolean repositoryObjectOnly) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getLinkedShadowin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
isFullShadow
public boolean isFullShadow()
- Specified by:
isFullShadowin interfaceMidpointFunctions
-
isProjectionExists
public boolean isProjectionExists()
- Specified by:
isProjectionExistsin interfaceMidpointFunctions
-
countAccounts
public <T> Integer countAccounts(String resourceOid, QName attributeName, T attributeValue) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
countAccounts
public <T> Integer countAccounts(ResourceType resourceType, QName attributeName, T attributeValue) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
countAccounts
public <T> Integer countAccounts(ResourceType resourceType, String attributeName, T attributeValue) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
isUniquePropertyValue
public <T> boolean isUniquePropertyValue(ObjectType objectType, String propertyPathString, T propertyValue) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
getObjectsInConflictOnPropertyValue
public <O extends ObjectType,T> List<O> getObjectsInConflictOnPropertyValue(O objectType, String propertyPathString, T propertyValue, boolean getAllConflicting) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
getObjectsInConflictOnPropertyValue
public <O extends ObjectType,T> List<O> getObjectsInConflictOnPropertyValue(O objectType, String propertyPathString, T propertyValue, String matchingRuleName, boolean getAllConflicting) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
isUniqueAccountValue
public <T> boolean isUniqueAccountValue(ResourceType resourceType, ShadowType shadowType, String attributeName, T attributeValue) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
getModelContext
public <F extends ObjectType> ModelContext<F> getModelContext()
- Specified by:
getModelContextin interfaceMidpointFunctions
-
getFocusContext
public <F extends ObjectType> ModelElementContext<F> getFocusContext()
- Specified by:
getFocusContextin interfaceMidpointFunctions
-
getProjectionContext
public ModelProjectionContext getProjectionContext()
- Specified by:
getProjectionContextin interfaceMidpointFunctions
-
getMapping
public <V extends PrismValue,D extends ItemDefinition> Mapping<V,D> getMapping()
- Specified by:
getMappingin interfaceMidpointFunctions
-
getCurrentTask
public Task getCurrentTask()
- Specified by:
getCurrentTaskin interfaceMidpointFunctions
-
getCurrentResult
public OperationResult getCurrentResult()
- Specified by:
getCurrentResultin interfaceMidpointFunctions
-
getCurrentResult
public OperationResult getCurrentResult(String operationName)
- Specified by:
getCurrentResultin interfaceMidpointFunctions
-
unwrapModelContext
public ModelContext unwrapModelContext(LensContextType lensContextType) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
unwrapModelContextin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
wrapModelContext
public LensContextType wrapModelContext(LensContext<?> lensContext) throws SchemaException
- Throws:
SchemaException
-
createEmptyObject
public <T extends ObjectType> T createEmptyObject(Class<T> type) throws SchemaException
Description copied from interface:MidpointFunctionsCreates empty prism object of specified type in memory. This is used to construct Java instances of object before they are added to the repository.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
- Specified by:
createEmptyObjectin interfaceMidpointFunctions- Parameters:
type- Class of the object to create- Returns:
- empty object in memory
- Throws:
SchemaException- schema error instantiating the object (e.g. attempt to instantiate abstract type).
-
createEmptyObjectWithName
public <T extends ObjectType> T createEmptyObjectWithName(Class<T> type, String name) throws SchemaException
Description copied from interface:MidpointFunctionsCreates empty prism object of specified type and with specified name in memory. This is used to construct Java instances of object before they are added to the repository. The 'name' property of the new object will be set to a specified value.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
- Specified by:
createEmptyObjectWithNamein interfaceMidpointFunctions- Parameters:
type- Class of the object to createname- Name of the object- Returns:
- empty object in memory
- Throws:
SchemaException- schema error instantiating the object (e.g. attempt to instantiate abstract type).
-
createEmptyObjectWithName
public <T extends ObjectType> T createEmptyObjectWithName(Class<T> type, PolyString name) throws SchemaException
Description copied from interface:MidpointFunctionsCreates empty prism object of specified type and with specified name in memory. This is used to construct Java instances of object before they are added to the repository. The 'name' property of the new object will be set to a specified value.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
- Specified by:
createEmptyObjectWithNamein interfaceMidpointFunctions- Parameters:
type- Class of the object to createname- Name of the object- Returns:
- empty object in memory
- Throws:
SchemaException- schema error instantiating the object (e.g. attempt to instantiate abstract type).
-
createEmptyObjectWithName
public <T extends ObjectType> T createEmptyObjectWithName(Class<T> type, PolyStringType name) throws SchemaException
Description copied from interface:MidpointFunctionsCreates empty prism object of specified type and with specified name in memory. This is used to construct Java instances of object before they are added to the repository. The 'name' property of the new object will be set to a specified value.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
- Specified by:
createEmptyObjectWithNamein interfaceMidpointFunctions- Parameters:
type- Class of the object to createname- Name of the object- Returns:
- empty object in memory
- Throws:
SchemaException- schema error instantiating the object (e.g. attempt to instantiate abstract type).
-
resolveReference
public <T extends ObjectType> T resolveReference(ObjectReferenceType reference) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
resolveReferenceIfExists
public <T extends ObjectType> T resolveReferenceIfExists(ObjectReferenceType reference) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
resolveReferenceIfExistsin interfaceMidpointFunctions- Throws:
SchemaExceptionCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
getObject
public <T extends ObjectType> T getObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsReturns object for provided OID. It retrieves the object from an appropriate source for an object type (e.g. internal repository, resource or both), merging data as necessary, processing any policies, caching mechanisms, etc. This can be influenced by using options.
Fails if object with the OID does not exists.
- Specified by:
getObjectin interfaceMidpointFunctions- Parameters:
type- (class) of an object to getoid- OID of the object to getoptions- options influencing the retrieval and processing of the object- Returns:
- Retrieved object
- Throws:
ObjectNotFoundException- requested object does not existSchemaException- the object is not schema compliantCommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ExpressionEvaluationException
-
getObject
public <T extends ObjectType> T getObject(Class<T> type, String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsReturns object for provided OID. It retrieves the object from an appropriate source for an object type (e.g. internal repository, resource or both), merging data as necessary, processing any policies, caching mechanisms, etc.
Fails if object with the OID does not exists.
- Specified by:
getObjectin interfaceMidpointFunctions- Parameters:
type- (class) of an object to getoid- OID of the object to get- Returns:
- Retrieved object
- Throws:
ObjectNotFoundException- requested object does not existSchemaException- the object is not schema compliantCommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ExpressionEvaluationException
-
executeChanges
public void executeChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Description copied from interface:MidpointFunctionsExecute the provided object deltas.
The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation also implicitly links the objects (mark them to be analogous) if such a link is part of the data model. E.g. the implementation links all accounts to the user if they are passed in a single delta collection. This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked explicitly.
There must be no more than one delta for each object. The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
The OID provided in ADD deltas may be empty. In that case the OID will be assigned by the implementation and the OIDs will be set in the deltas after the operation is completed.
Execution of ADD deltas should fail if such object already exists (if object with the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if such objects do not exist.
The operation may fail if provided OIDs are in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail or even fail partially. The consistency of the data and state are not based on operation atomicity but rather a data model that can "repair" inconsistencies.
The operation may fail if any of the objects to be created or modified does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
- Specified by:
executeChangesin interfaceMidpointFunctions- Parameters:
deltas- Collection of object deltas to executeoptions- options influencing processing of the deltas- Throws:
ObjectAlreadyExistsException- object with specified identifiers already exists, cannot addObjectNotFoundException- object required to complete the operation was not found (e.g. appropriate connector or resource definition)SchemaException- error dealing with resource schema, e.g. created object does not conform to schemaExpressionEvaluationException- evaluation of expression associated with the object has failedCommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.PolicyViolationException- Policy violation was detected during processing of the objectSecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)
-
executeChanges
public void executeChanges(Collection<ObjectDelta<? extends ObjectType>> deltas) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Description copied from interface:MidpointFunctionsExecute the provided object deltas.
The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation also implicitly links the objects (mark them to be analogous) if such a link is part of the data model. E.g. the implementation links all accounts to the user if they are passed in a single delta collection. This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked explicitly.
There must be no more than one delta for each object. The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
The OID provided in ADD deltas may be empty. In that case the OID will be assigned by the implementation and the OIDs will be set in the deltas after the operation is completed.
Execution of ADD deltas should fail if such object already exists (if object with the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if such objects do not exist.
The operation may fail if provided OIDs are in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail or even fail partially. The consistency of the data and state are not based on operation atomicity but rather a data model that can "repair" inconsistencies.
The operation may fail if any of the objects to be created or modified does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
- Specified by:
executeChangesin interfaceMidpointFunctions- Parameters:
deltas- Collection of object deltas to execute- Throws:
ObjectAlreadyExistsException- object with specified identifiers already exists, cannot addObjectNotFoundException- object required to complete the operation was not found (e.g. appropriate connector or resource definition)SchemaException- error dealing with resource schema, e.g. created object does not conform to schemaExpressionEvaluationException- evaluation of expression associated with the object has failedCommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.PolicyViolationException- Policy violation was detected during processing of the objectSecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)
-
executeChanges
public void executeChanges(ObjectDelta<? extends ObjectType>... deltas) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Description copied from interface:MidpointFunctionsExecute the provided object deltas.
The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation also implicitly links the objects (mark them to be analogous) if such a link is part of the data model. E.g. the implementation links all accounts to the user if they are passed in a single delta collection. This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked explicitly.
There must be no more than one delta for each object. The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
The OID provided in ADD deltas may be empty. In that case the OID will be assigned by the implementation and the OIDs will be set in the deltas after the operation is completed.
Execution of ADD deltas should fail if such object already exists (if object with the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if such objects do not exist.
The operation may fail if provided OIDs are in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail or even fail partially. The consistency of the data and state are not based on operation atomicity but rather a data model that can "repair" inconsistencies.
The operation may fail if any of the objects to be created or modified does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
- Specified by:
executeChangesin interfaceMidpointFunctions- Parameters:
deltas- Collection of object deltas to execute- Throws:
ObjectAlreadyExistsException- object with specified identifiers already exists, cannot addObjectNotFoundException- object required to complete the operation was not found (e.g. appropriate connector or resource definition)SchemaException- error dealing with resource schema, e.g. created object does not conform to schemaExpressionEvaluationException- evaluation of expression associated with the object has failedCommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.PolicyViolationException- Policy violation was detected during processing of the objectSecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)
-
addObject
public <T extends ObjectType> String addObject(PrismObject<T> newObject, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
addObject
public <T extends ObjectType> String addObject(PrismObject<T> newObject) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
addObject
public <T extends ObjectType> String addObject(T newObject, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
addObject
public <T extends ObjectType> String addObject(T newObject) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
modifyObject
public <T extends ObjectType> void modifyObject(ObjectDelta<T> modifyDelta, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
modifyObject
public <T extends ObjectType> void modifyObject(ObjectDelta<T> modifyDelta) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
deleteObject
public <T extends ObjectType> void deleteObject(Class<T> type, String oid, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
deleteObject
public <T extends ObjectType> void deleteObject(Class<T> type, String oid) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
-
recompute
public <F extends FocusType> void recompute(Class<F> type, String oid) throws SchemaException, PolicyViolationException, ExpressionEvaluationException, ObjectNotFoundException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, SecurityViolationException
Description copied from interface:MidpointFunctionsRecomputes focal object with the specified OID. The operation considers all the applicable policies and mapping and tries to re-apply them as necessary.- Specified by:
recomputein interfaceMidpointFunctions- Parameters:
type- type (class) of an object to recomputeoid- OID of the object to recompute- Throws:
SchemaExceptionPolicyViolationExceptionExpressionEvaluationExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionCommunicationExceptionConfigurationExceptionSecurityViolationException
-
findShadowOwner
public PrismObject<UserType> findShadowOwner(String accountOid) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException
Description copied from interface:MidpointFunctionsReturns the User object representing owner of specified account (account shadow).
May return null if there is no owner specified for the account.
Implements the backward "owns" association between account shadow and user. Forward association is implemented by property "account" of user object.
- Specified by:
findShadowOwnerin interfaceMidpointFunctions- Parameters:
accountOid- OID of the account to look for an owner- Returns:
- owner of the account or null
- Throws:
ObjectNotFoundException- specified account was not foundSecurityViolationException- todoSchemaException- todoCommunicationException- todoConfigurationExceptionExpressionEvaluationException
-
searchShadowOwner
public <F extends FocusType> PrismObject<F> searchShadowOwner(String accountOid) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException
-
searchObjects
public <T extends ObjectType> List<T> searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects.
Searches through all object of a specified type. Returns a list of objects that match search criteria.
Note that this method has a very limited scaling capability as all the results are stored in the memory. DO NOT USE on large datasets. Recommended usage is only when using queries that cannot return large number of results (e.g. queries for unique values) or when combined with paging capability. For other cases use searchObjectsIterative instead.
Returns empty list if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
- Specified by:
searchObjectsin interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchquery- search queryoptions- options influencing the retrieval and processing of the objects- Returns:
- all objects of specified type that match search criteria (subject to paging)
- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.ExpressionEvaluationException
-
searchObjects
public <T extends ObjectType> List<T> searchObjects(Class<T> type, ObjectQuery query) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects.
Searches through all object of a specified type. Returns a list of objects that match search criteria.
Note that this method has a very limited scaling capability as all the results are stored in the memory. DO NOT USE on large datasets. Recommended usage is only when using queries that cannot return large number of results (e.g. queries for unique values) or when combined with paging capability. For other cases use searchObjectsIterative instead.
Returns empty list if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
- Specified by:
searchObjectsin interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchquery- search query- Returns:
- all objects of specified type that match search criteria (subject to paging)
- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.ExpressionEvaluationException
-
searchObjectsIterative
public <T extends ObjectType> void searchObjectsIterative(Class<T> type, ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects in iterative fashion (using callback).
Searches through all object of a specified type. A handler is invoked for each object found.
The handler is not called at all if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
- Specified by:
searchObjectsIterativein interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchquery- search queryhandler- callback handler that will be called for each found objectoptions- options influencing the retrieval and processing of the objects- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ExpressionEvaluationException
-
searchObjectsIterative
public <T extends ObjectType> void searchObjectsIterative(Class<T> type, ObjectQuery query, ResultHandler<T> handler) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects in iterative fashion (using callback).
Searches through all object of a specified type. A handler is invoked for each object found.
The handler is not called at all if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
- Specified by:
searchObjectsIterativein interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchquery- search queryhandler- callback handler that will be called for each found object- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ExpressionEvaluationException
-
searchObjectByName
public <T extends ObjectType> T searchObjectByName(Class<T> type, String name) throws SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException, SchemaException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects by name.
Searches through all object of a specified type for an object with specified name. Returns that object if it is found, return null otherwise. The method fails if more than one object is found therefore it cannot be reliably used on types with non-unique names (such as Shadows).
- Specified by:
searchObjectByNamein interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchname- Name of the object to look for- Returns:
- an object of specified type with a matching name or null
- Throws:
SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ObjectNotFoundException- object required for a search was not found (e.g. resource definition)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SchemaException- unknown property used in search queryExpressionEvaluationException
-
searchObjectByName
public <T extends ObjectType> T searchObjectByName(Class<T> type, PolyString name) throws SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException, SchemaException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects by name.
Searches through all object of a specified type for an object with specified name. Returns that object if it is found, return null otherwise. The method fails if more than one object is found therefore it cannot be reliably used on types with non-unique names (such as Shadows).
- Specified by:
searchObjectByNamein interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchname- Name of the object to look for- Returns:
- an object of specified type with a matching name or null
- Throws:
SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ObjectNotFoundException- object required for a search was not found (e.g. resource definition)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SchemaException- unknown property used in search queryExpressionEvaluationException
-
searchObjectByName
public <T extends ObjectType> T searchObjectByName(Class<T> type, PolyStringType name) throws SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException, SchemaException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsSearch for objects by name.
Searches through all object of a specified type for an object with specified name. Returns that object if it is found, return null otherwise. The method fails if more than one object is found therefore it cannot be reliably used on types with non-unique names (such as Shadows).
- Specified by:
searchObjectByNamein interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchname- Name of the object to look for- Returns:
- an object of specified type with a matching name or null
- Throws:
SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ObjectNotFoundException- object required for a search was not found (e.g. resource definition)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.SchemaException- unknown property used in search queryExpressionEvaluationException
-
countObjects
public <T extends ObjectType> int countObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsCount objects.
Searches through all object of a specified type and returns a count of such objects. This method is usually much more efficient than equivalent search method. It is used mostly for presentation purposes, e.g. displaying correct number of pages in the GUI listings.
- Specified by:
countObjectsin interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchquery- search queryoptions- options influencing the retrieval and processing of the objects- Returns:
- number of objects of specified type that match search criteria (subject to paging)
- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceExpressionEvaluationException
-
countObjects
public <T extends ObjectType> int countObjects(Class<T> type, ObjectQuery query) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException
Description copied from interface:MidpointFunctionsCount objects.
Searches through all object of a specified type and returns a count of such objects. This method is usually much more efficient than equivalent search method. It is used mostly for presentation purposes, e.g. displaying correct number of pages in the GUI listings.
- Specified by:
countObjectsin interfaceMidpointFunctions- Parameters:
type- (class) of an object to searchquery- search query- Returns:
- number of objects of specified type that match search criteria (subject to paging)
- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)SecurityViolationException- Security violation during operation execution. May be caused either by midPoint internal security mechanism but also by external mechanism (e.g. on the resource)ConfigurationException- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceExpressionEvaluationException
-
testResource
public OperationResult testResource(String resourceOid) throws ObjectNotFoundException
Description copied from interface:MidpointFunctionsTest the resource connection and basic resource connector functionality.
This operation will NOT throw exception in case the resource connection fails. It such case it will indicate the failure in the return message, but the operation itself succeeds. The operations fails only if the provided arguments are wrong, in case of system error, system misconfiguration, etc.
This returns OperationResult instead of taking it as in/out argument. This is different from the other methods. The testResource method is not using OperationResult to track its own execution but rather to track the execution of resource tests (that in fact happen in provisioning).
- Specified by:
testResourcein interfaceMidpointFunctions- Parameters:
resourceOid- OID of resource to test- Returns:
- results of executed tests
- Throws:
ObjectNotFoundException- specified object does not exist
-
getResourceDelta
public ObjectDeltaType getResourceDelta(ModelContext context, String resourceOid) throws SchemaException
Description copied from interface:MidpointFunctionsReturns aggregated delta that is to be executed on a given resource.- Specified by:
getResourceDeltain interfaceMidpointFunctions- Parameters:
context- model contextresourceOid- OID of the resource in question- Throws:
SchemaException
-
getSequenceCounter
public long getSequenceCounter(String sequenceOid) throws ObjectNotFoundException, SchemaException
-
getManagersOids
public Collection<String> getManagersOids(UserType user) throws SchemaException, ObjectNotFoundException, SecurityViolationException
- Specified by:
getManagersOidsin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationException
-
getOrgUnits
public Collection<String> getOrgUnits(UserType user, QName relation)
- Specified by:
getOrgUnitsin interfaceMidpointFunctions
-
getParentOrgByOrgType
public OrgType getParentOrgByOrgType(ObjectType object, String orgType) throws SchemaException, SecurityViolationException
Description copied from interface:MidpointFunctionsReturns parent orgs of the specified object that have a specific orgType.- Specified by:
getParentOrgByOrgTypein interfaceMidpointFunctions- Parameters:
object- base objectorgType- orgType to select- Returns:
- parent orgs of the specified object that have a specific orgType
- Throws:
SchemaException- Internal schema errorSecurityViolationException- Security violation
-
getOrgByOid
public OrgType getOrgByOid(String oid) throws SchemaException
- Specified by:
getOrgByOidin interfaceMidpointFunctions- Throws:
SchemaException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object) throws SchemaException, SecurityViolationException
Description copied from interface:MidpointFunctionsReturns all parent orgs of the specified object.- Specified by:
getParentOrgsin interfaceMidpointFunctions- Parameters:
object- base object- Returns:
- all parent orgs
- Throws:
SchemaException- Internal schema errorSecurityViolationException- Security violation
-
getOrgUnits
public Collection<String> getOrgUnits(UserType user)
- Specified by:
getOrgUnitsin interfaceMidpointFunctions
-
getManagersOfOrg
public Collection<UserType> getManagersOfOrg(String orgOid) throws SchemaException, SecurityViolationException
- Specified by:
getManagersOfOrgin interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationException
-
isManagerOfOrgType
public boolean isManagerOfOrgType(UserType user, String orgType) throws SchemaException
- Specified by:
isManagerOfOrgTypein interfaceMidpointFunctions- Throws:
SchemaException
-
getManagers
public Collection<UserType> getManagers(UserType user) throws SchemaException, ObjectNotFoundException, SecurityViolationException
- Specified by:
getManagersin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationException
-
getManagersByOrgType
public Collection<UserType> getManagersByOrgType(UserType user, String orgType) throws SchemaException, ObjectNotFoundException, SecurityViolationException
- Specified by:
getManagersByOrgTypein interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationException
-
isManagerOf
public boolean isManagerOf(UserType user, String orgOid)
Description copied from interface:MidpointFunctionsReturns true if user is a manager of specified organizational unit.- Specified by:
isManagerOfin interfaceMidpointFunctions
-
getParentOrgsByRelation
public Collection<OrgType> getParentOrgsByRelation(ObjectType object, String relation) throws SchemaException, SecurityViolationException
Description copied from interface:MidpointFunctionsReturns parent orgs of the specified object that have a specific relation.- Specified by:
getParentOrgsByRelationin interfaceMidpointFunctions- Parameters:
object- base objectrelation- local part of the relation (in the String form)- Returns:
- parent orgs of the specified object that have a specific relation
- Throws:
SchemaException- Internal schema errorSecurityViolationException- Security violation
-
getManagers
public Collection<UserType> getManagers(UserType user, String orgType, boolean allowSelf) throws SchemaException, ObjectNotFoundException, SecurityViolationException
- Specified by:
getManagersin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationException
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, String relation, String orgType) throws SchemaException, SecurityViolationException
Description copied from interface:MidpointFunctionsReturns parent orgs of the specified object that have a specific relation and orgType.- Specified by:
getParentOrgsin interfaceMidpointFunctions- Parameters:
object- base objectrelation- local part of the relation (in the String form)orgType- orgType to select- Returns:
- parent orgs of the specified object that have a specific relation and orgType
- Throws:
SchemaException- Internal schema errorSecurityViolationException- Security violation
-
getManagersOidsExceptUser
public Collection<String> getManagersOidsExceptUser(UserType user) throws SchemaException, ObjectNotFoundException, SecurityViolationException
- Specified by:
getManagersOidsExceptUserin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationException
-
getManagersOidsExceptUser
public Collection<String> getManagersOidsExceptUser(@NotNull Collection<ObjectReferenceType> userRefList) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
-
getOrgByName
public OrgType getOrgByName(String name) throws SchemaException, SecurityViolationException
- Specified by:
getOrgByNamein interfaceMidpointFunctions- Throws:
SchemaExceptionSecurityViolationException
-
getParentOrgsByRelation
public Collection<OrgType> getParentOrgsByRelation(ObjectType object, QName relation) throws SchemaException, SecurityViolationException
Description copied from interface:MidpointFunctionsReturns parent orgs of the specified object that have a specific relation.- Specified by:
getParentOrgsByRelationin interfaceMidpointFunctions- Parameters:
object- base objectrelation- relation in the QName form- Returns:
- parent orgs of the specified object that have a specific relation
- Throws:
SchemaException- Internal schema errorSecurityViolationException- Security violation
-
getParentOrgs
public Collection<OrgType> getParentOrgs(ObjectType object, QName relation, String orgType) throws SchemaException, SecurityViolationException
Description copied from interface:MidpointFunctionsReturns parent orgs of the specified object that have a specific relation and orgType.- Specified by:
getParentOrgsin interfaceMidpointFunctions- Parameters:
object- base objectrelation- relation in the QName formorgType- orgType to select- Returns:
- parent orgs of the specified object that have a specific relation and orgType
- Throws:
SchemaException- Internal schema errorSecurityViolationException- Security violation
-
isManager
public boolean isManager(UserType user)
Description copied from interface:MidpointFunctionsReturns true if user is a manager of any organizational unit.- Specified by:
isManagerin interfaceMidpointFunctions
-
getProtector
public Protector getProtector()
- Specified by:
getProtectorin interfaceMidpointFunctions
-
getPlaintext
public String getPlaintext(ProtectedStringType protectedStringType) throws EncryptionException
- Specified by:
getPlaintextin interfaceMidpointFunctions- Throws:
EncryptionException
-
parseXmlToMap
public Map<String,String> parseXmlToMap(String xml)
Description copied from interface:MidpointFunctionsReturns a map from the translated xml attribute - value pairs.- Specified by:
parseXmlToMapin interfaceMidpointFunctions- Parameters:
xml- A string representation of xml formatted data.
-
getMembersAsReferences
public List<ObjectReferenceType> getMembersAsReferences(String orgOid) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException
-
getMembers
public List<UserType> getMembers(String orgOid) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
getMembersin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
computeProjectionLifecycle
public <F extends FocusType> String computeProjectionLifecycle(F focus, ShadowType shadow, ResourceType resource)
Description copied from interface:MidpointFunctionsDefault function used to compute projection lifecycle. It is provided here so it can be explicitly invoked from a custom expression and then the result can be changed for special cases.- Specified by:
computeProjectionLifecyclein interfaceMidpointFunctions
-
getPrincipal
public MidPointPrincipal getPrincipal() throws SecurityViolationException
Description copied from interface:MidpointFunctionsReturns principal representing the user whose identity is used to execute the expression.- Specified by:
getPrincipalin interfaceMidpointFunctions- Throws:
SecurityViolationException
-
getPrincipalOid
public String getPrincipalOid()
Description copied from interface:MidpointFunctionsReturns OID of the current principal. After login is complete, the returned OID is the same as getPrincipal().getOid(). However, during login process, this method returns the OID of the user that is being authenticated/logged-in.- Specified by:
getPrincipalOidin interfaceMidpointFunctions
-
getChannel
public String getChannel()
- Specified by:
getChannelin interfaceMidpointFunctions
-
getWorkflowService
public WorkflowService getWorkflowService()
- Specified by:
getWorkflowServicein interfaceMidpointFunctions
-
getShadowsToActivate
public List<ShadowType> getShadowsToActivate(Collection<? extends ModelElementContext> projectionContexts)
Description copied from interface:MidpointFunctionsUsed for account activation notifier to collect all shadows which are going to be activated.- Specified by:
getShadowsToActivatein interfaceMidpointFunctions
-
createRegistrationConfirmationLink
public String createRegistrationConfirmationLink(UserType userType)
- Specified by:
createRegistrationConfirmationLinkin interfaceMidpointFunctions
-
createPasswordResetLink
public String createPasswordResetLink(UserType userType)
- Specified by:
createPasswordResetLinkin interfaceMidpointFunctions
-
createAccountActivationLink
public String createAccountActivationLink(UserType userType)
- Specified by:
createAccountActivationLinkin interfaceMidpointFunctions
-
getConst
public String getConst(String name)
- Specified by:
getConstin interfaceMidpointFunctions
-
resolveEntitlement
public ShadowType resolveEntitlement(ShadowAssociationType shadowAssociationType)
- Specified by:
resolveEntitlementin interfaceMidpointFunctions
-
collectExtensions
public ExtensionType collectExtensions(AssignmentPathType path, int startAt) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException
-
executeChangesAsynchronously
public TaskType executeChangesAsynchronously(Collection<ObjectDelta<?>> deltas, ModelExecuteOptions options, String templateTaskOid) throws SecurityViolationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException
-
executeChangesAsynchronously
public TaskType executeChangesAsynchronously(Collection<ObjectDelta<?>> deltas, ModelExecuteOptions options, String templateTaskOid, Task opTask, OperationResult result) throws SecurityViolationException, ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException
-
submitTaskFromTemplate
public TaskType submitTaskFromTemplate(String templateTaskOid, List<Item<?,?>> extensionItems) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException
-
submitTaskFromTemplate
public TaskType submitTaskFromTemplate(String templateTaskOid, Map<QName,Object> extensionValues) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException
-
translate
public String translate(LocalizableMessage message)
- Specified by:
translatein interfaceMidpointFunctions
-
translate
public String translate(LocalizableMessageType message)
- Specified by:
translatein interfaceMidpointFunctions
-
executeAdHocProvisioningScript
public Object executeAdHocProvisioningScript(ResourceType resource, String language, String code) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException
-
executeAdHocProvisioningScript
public Object executeAdHocProvisioningScript(String resourceOid, String language, String code) throws SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException
-
isEvaluateNew
public Boolean isEvaluateNew()
Description copied from interface:MidpointFunctionsReturns indication whether a script code is evaluating a new value. If this method returns true value then the script code is evaluating "new" value. That means a value that is going to be set to target, e.g. value from "add" or "replace" parts of the delta. If this method returns false value then the script code is evaluating "old" value. That means a value that is used for the purposes of removing values from target, e.g. value from "delete" part of the delta or values from an existing object. If this method returns null then the old/new status cannot be determined or this method is invoked in a situation when such a distinction is not applicable.- Specified by:
isEvaluateNewin interfaceMidpointFunctions
-
collectAssignedFocusMappingsResults
@NotNull public Collection<PrismValue> collectAssignedFocusMappingsResults(@NotNull ItemPath path) throws SchemaException
Description copied from interface:MidpointFunctionsReturns all non-negative values from all focus mappings (targeted to given path) from all non-negative evaluated assignments. Highly experimental. Use at your own risk.- Specified by:
collectAssignedFocusMappingsResultsin interfaceMidpointFunctions- Throws:
SchemaException
-
getFocusesByCorrelationRule
public <F extends FocusType> List<F> getFocusesByCorrelationRule(Class<F> type, String resourceOid, ShadowKindType kind, String intent, ShadowType shadow)
- Specified by:
getFocusesByCorrelationRulein interfaceMidpointFunctions
-
previewChanges
public <F extends ObjectType> ModelContext<F> previewChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options) throws CommunicationException, ObjectNotFoundException, ObjectAlreadyExistsException, ConfigurationException, SchemaException, SecurityViolationException, PolicyViolationException, ExpressionEvaluationException
-
applyDefinition
public <O extends ObjectType> void applyDefinition(O object) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, ExpressionEvaluationException
- Specified by:
applyDefinitionin interfaceMidpointFunctions- Throws:
SchemaExceptionObjectNotFoundExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
deltaFor
public <C extends Containerable> S_ItemEntry deltaFor(Class<C> objectClass) throws SchemaException
- Specified by:
deltaForin interfaceMidpointFunctions- Throws:
SchemaException
-
hasArchetype
public <O extends ObjectType> boolean hasArchetype(O object, String archetypeOid)
- Specified by:
hasArchetypein interfaceMidpointFunctions
-
getArchetype
public <O extends ObjectType> ArchetypeType getArchetype(O object) throws SchemaException, ConfigurationException
Description copied from interface:MidpointFunctionsAssumes single archetype. May throw error if used on object that has more than one archetype.- Specified by:
getArchetypein interfaceMidpointFunctions- Throws:
SchemaExceptionConfigurationException
-
getArchetypeOid
public <O extends ObjectType> String getArchetypeOid(O object) throws SchemaException, ConfigurationException
Description copied from interface:MidpointFunctionsAssumes single archetype. May throw error if used on object that has more than one archetype.- Specified by:
getArchetypeOidin interfaceMidpointFunctions- Throws:
SchemaExceptionConfigurationException
-
wrap
public MessageWrapper wrap(AsyncUpdateMessageType message)
-
getMessageBodyAsMap
public Map<String,Object> getMessageBodyAsMap(AsyncUpdateMessageType message) throws IOException
- Throws:
IOException
-
addRecomputeTrigger
public <O extends ObjectType> void addRecomputeTrigger(O object, Long timestamp) throws ObjectAlreadyExistsException, SchemaException, ObjectNotFoundException
- Specified by:
addRecomputeTriggerin interfaceMidpointFunctions- Throws:
ObjectAlreadyExistsExceptionSchemaExceptionObjectNotFoundException
-
addRecomputeTrigger
public <O extends ObjectType> void addRecomputeTrigger(PrismObject<O> object, Long timestamp) throws ObjectAlreadyExistsException, SchemaException, ObjectNotFoundException
- Specified by:
addRecomputeTriggerin interfaceMidpointFunctions- Throws:
ObjectAlreadyExistsExceptionSchemaExceptionObjectNotFoundException
-
getRepositoryService
public RepositoryService getRepositoryService()
- Specified by:
getRepositoryServicein interfaceMidpointFunctions
-
-