Class ModelController
- All Implemented Interfaces:
AccessCertificationService,BulkActionsService,CaseService,ModelService,TaskService
- Author:
- lazyman, Radovan Semancik
Note: don't autowire this bean by implementing class (ModelController), as it is proxied by Spring AOP. Use its interfaces instead.
-
Field Summary
FieldsFields inherited from interface com.evolveum.midpoint.model.api.ModelService
AUTZ_NAMESPACE, CHECK_INDESTRUCTIBLE, COMPARE_OBJECT, COUNT_CONTAINERS, COUNT_OBJECTS, COUNT_REFERENCES, DISCOVER_CONNECTORS, EXECUTE_CHANGE, EXECUTE_CHANGES, GET_OBJECT, IMPORT_ACCOUNTS_FROM_RESOURCE, IMPORT_OBJECTS_FROM_FILE, IMPORT_OBJECTS_FROM_STREAM, LIST_ACCOUNT_SHADOW_OWNER, MERGE_OBJECTS, NOTIFY_CHANGE, OPERATION_LOGGER_NAME, POST_INIT, RECOMPUTE, SEARCH_CONTAINERS, SEARCH_OBJECTS, SEARCH_REFERENCES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancelCase(@NotNull String caseOid, @NotNull Task task, @NotNull OperationResult parentResult) Cancels a case.voidclaimWorkItem(@NotNull WorkItemId workItemId, @NotNull Task task, @NotNull OperationResult parentResult) Claims a work item that is assigned to an abstract role, so it becomes assigned to the current princial.voidcleanupCampaigns(@NotNull CleanupPolicyType policy, Task task, OperationResult result) Cleans up closed certification campaigns.voidcloseCampaign(String campaignOid, Task task, OperationResult result) Closes a campaign.voidcloseCurrentStage(String campaignOid, Task task, OperationResult parentResult) Opens the next stage in the certification campaign.<T extends ObjectType>
CompareResultTypecompareObject(PrismObject<T> provided, Collection<SelectorOptions<GetOperationOptions>> rawReadOptions, ModelCompareOptions compareOptions, @NotNull List<? extends ItemPath> ignoreItems, Task task, OperationResult parentResult) TODOvoidcompleteWorkItem(@NotNull WorkItemId workItemId, @NotNull AbstractWorkItemOutputType output, @NotNull Task task, @NotNull OperationResult parentResult) Completes a work item (e.g. approves/rejects it if it belongs to an approval case).voidcompleteWorkItem(@NotNull WorkItemId workItemId, @NotNull AbstractWorkItemOutputType output, @Nullable ObjectDelta<?> additionalDelta, @NotNull Task task, @NotNull OperationResult parentResult) Completes a work item.<T extends Containerable>
IntegercountContainers(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) <T extends ObjectType>
IntegercountObjects(Class<T> type, ObjectQuery origQuery, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) Count objects.intcountOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) countReferences(ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) Reference count - currently supporting roleMembershipRef and linkRef search.createCampaign(String definitionOid, Task task, OperationResult parentResult) Creates a certification campaign: creates AccessCertificationCampaignType object, based on general information in certification definition.booleandeactivateServiceThreads(long timeToWait, Task operationTask, OperationResult parentResult) Deactivates service threads (temporarily).voiddelegateWorkItem(@NotNull WorkItemId workItemId, @NotNull WorkItemDelegationRequestType delegationRequest, @NotNull Task task, @NotNull OperationResult parentResult) Delegates a work item.voiddeleteActivityStateAndWorkers(String rootTaskOid, boolean deleteWorkers, long subtasksWaitTime, Task operationTask, OperationResult parentResult) discoverConnectors(ConnectorHostType hostType, Task task, OperationResult parentResult) Discovers local or remote connectors.discoverResourceConnectorConfiguration(PrismObject<ResourceType> resource, OperationResult result) Method work same asProvisioningService.discoverConfiguration(PrismObject, OperationResult).executeBulkAction(@NotNull ExecuteScriptConfigItem scriptExecutionCommand, @NotNull VariablesMap initialVariables, @NotNull BulkActionExecutionOptions options, @NotNull Task task, @NotNull OperationResult result) Synchronously executes any scripting expression (with no input data).Collection<ObjectDeltaOperation<? extends ObjectType>>executeChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options, Task task, Collection<ProgressListener> statusListeners, OperationResult parentResult) <F extends ObjectType>
voidexecuteRecompute(@NotNull PrismObject<F> focus, @Nullable ModelExecuteOptions options, @NotNull Task task, @NotNull OperationResult result) Generally useful convenience method.@Nullable ResourceSchemafetchSchema(@NotNull PrismObject<ResourceType> resource, @NotNull OperationResult result) Method work same asProvisioningService.fetchSchema(PrismObject, OperationResult).getCampaignStatistics(String campaignOid, boolean currentStageOnly, Task task, OperationResult parentResult) Provides statistical information about outcomes of cases in a given campaign.@NotNull CapabilityCollectionTypegetNativeCapabilities(@NotNull String connOid, OperationResult result) Method work same asProvisioningService.getNativeCapabilities(String, OperationResult).<T extends ObjectType>
@NotNull PrismObject<T>getObject(@NotNull Class<T> clazz, @NotNull String oid, @Nullable Collection<SelectorOptions<GetOperationOptions>> rawOptions, @NotNull Task task, @NotNull OperationResult parentResult) Returns object for provided OID.static <T extends ObjectType>
ObjectTypes.ObjectManagergetObjectManager(Class<T> clazz, Collection<SelectorOptions<GetOperationOptions>> options) Returns the component that is responsible for execution of get/search/count operation for given type of objects, under given options.@NotNull PrismContextgetRunningTasksThreadsDump(@NotNull Task task, @NotNull OperationResult parentResult) booleanReturns true if the service threads are running.getTaskByIdentifier(String identifier, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task operationTask, OperationResult parentResult) Returns information about task, given its identifier.getTaskThreadsDump(@NotNull String taskOid, @NotNull Task task, @NotNull OperationResult parentResult) getThreadsDump(@NotNull Task task, @NotNull OperationResult parentResult) voidimportFromResource(String shadowOid, Task task, OperationResult parentResult) Import single account from resource.voidimportFromResource(String resourceOid, QName objectClass, Task task, OperationResult parentResult) Import accounts from resource.<O extends ObjectType>
voidimportObject(PrismObject<O> object, ImportOptionsType options, Task task, OperationResult parentResult) Import object.voidimportObjectsFromFile(File input, ImportOptionsType options, Task task, OperationResult parentResult) Import objects from file.voidimportObjectsFromStream(InputStream input, String language, ImportOptionsType options, Task task, OperationResult parentResult) Import objects from stream.booleanisSupportedByRepository(@NotNull Class<? extends ObjectType> type) Returns `true` if the particular object type is supported by the current repository.<O extends ObjectType>
Collection<ObjectDeltaOperation<? extends ObjectType>>mergeObjects(Class<O> type, String leftOid, String rightOid, String mergeConfigurationName, Task task, OperationResult parentResult) Merge two objects into one.voidnotifyChange(ResourceObjectShadowChangeDescriptionType changeDescription, Task task, OperationResult parentResult) voidopenNextStage(String campaignOid, Task task, OperationResult parentResult) Opens the next review stage in the certification campaign.<O extends ObjectType>
ProcessedObjectImpl<O>parseProcessedObject(@NotNull SimulationResultProcessedObjectType bean, @NotNull Task task, @NotNull OperationResult result) voidpostInit(OperationResult parentResult) Finish initialization of the model and lower system components (provisioning, repository, etc).voidreactivateServiceThreads(Task operationTask, OperationResult parentResult) Re-activates the service threads after they have been deactivated.<F extends ObjectType>
voidrecompute(Class<F> type, String oid, ModelExecuteOptions options, Task task, OperationResult parentResult) Recomputes focal object with the specified OID.voidreconcileWorkers(String oid, Task opTask, OperationResult result) voidrecordDecision(String campaignOid, long caseId, long workItemId, AccessCertificationResponseType response, String comment, Task task, OperationResult parentResult) Records a particular decision of a reviewer.recordRunningTasksThreadsDump(String cause, @NotNull Task task, @NotNull OperationResult parentResult) voidreiterateCampaign(String campaignOid, Task task, OperationResult result) Reiterates a closed campaign.voidreleaseWorkItem(@NotNull WorkItemId workItemId, @NotNull Task task, @NotNull OperationResult parentResult) Releases claimed work item.voidresumeTask(String taskOid, Task operationTask, OperationResult parentResult) voidresumeTasks(Collection<String> taskOids, Task operationTask, OperationResult parentResult) Resume suspended tasks.voidresumeTaskTree(String coordinatorOid, Task operationTask, OperationResult parentResult) voidscheduleTaskNow(String taskOid, Task operationTask, OperationResult parentResult) voidscheduleTasksNow(Collection<String> taskOids, Task operationTask, OperationResult parentResult) Schedules a RUNNABLE/CLOSED tasks to be run immediately.<T extends Containerable>
SearchResultList<T>searchContainers(@NotNull Class<T> type, @Nullable ObjectQuery origQuery, @Nullable Collection<SelectorOptions<GetOperationOptions>> rawOptions, @NotNull Task task, @NotNull OperationResult parentResult) Search for "sub-object" structures, i.e. containers.<T extends Containerable>
SearchResultMetadatasearchContainersIterative(Class<T> type, ObjectQuery origQuery, ObjectHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) <T extends ObjectType>
SearchResultList<PrismObject<T>>searchObjects(Class<T> type, ObjectQuery origQuery, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) Search for objects.<T extends ObjectType>
SearchResultMetadatasearchObjectsIterative(Class<T> type, ObjectQuery origQuery, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) Search for objects in iterative fashion (using callback).searchOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) TODO update description Returns a set of certification decisions for currently logged-in user.searchReferences(ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) Reference search - currently supporting roleMembershipRef and linkRef search.searchReferencesIterative(@NotNull ObjectQuery query, @NotNull ObjectHandler<ObjectReferenceType> handler, @Nullable Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) PrismObject<? extends FocusType>searchShadowOwner(String shadowOid, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) Returns the Focus object representing owner of specified shadow.voidshutdown()shutdown model and lower system componentsvoidstartRemediation(String campaignOid, Task task, OperationResult result) Starts the remediation phase for the campaign.voidstartSchedulers(Collection<String> nodeIdentifiers, Task operationTask, OperationResult parentResult) Starts the scheduler on a given nodes.voidstopSchedulers(Collection<String> nodeIdentifiers, Task operationTask, OperationResult parentResult) Stops the schedulers on a given nodes.booleanstopSchedulersAndTasks(Collection<String> nodeIdentifiers, long waitTime, Task operationTask, OperationResult parentResult) Stops a set of schedulers (on their nodes) and tasks that are executing on these nodes.voidsuspendAndDeleteTask(String taskOid, long waitForStop, boolean alsoSubtasks, Task operationTask, OperationResult parentResult) voidsuspendAndDeleteTasks(Collection<String> taskOids, long waitForStop, boolean alsoSubtasks, Task operationTask, OperationResult parentResult) Suspends tasks and deletes them.booleansuspendTask(String taskOid, long waitForStop, Task operationTask, OperationResult parentResult) booleansuspendTasks(Collection<String> taskOids, long waitForStop, Task operationTask, OperationResult parentResult) Suspends a set of tasks.booleansuspendTaskTree(String taskOid, long waitForStop, Task operationTask, OperationResult parentResult) voidsynchronizeTasks(Task operationTask, OperationResult parentResult) Synchronizes information in midPoint repository and task scheduling database.testResource(PrismObject<ResourceType> resource, Task task, OperationResult result) Test the resource connection and basic resource connector functionality.testResource(String resourceOid, Task task, OperationResult result) Test the resource connection and basic resource connector functionality.testResourcePartialConfiguration(PrismObject<ResourceType> resource, Task task, OperationResult result) Test partial resource connector configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.evolveum.midpoint.model.api.AccessCertificationService
countOpenWorkItems, searchOpenWorkItemsMethods inherited from interface com.evolveum.midpoint.model.api.ModelService
countContainers, countObjects, executeChanges, searchContainers, searchObjects
-
Field Details
-
OP_HANDLE_OBJECT_FOUND
-
-
Constructor Details
-
ModelController
public ModelController()
-
-
Method Details
-
getObjectResolver
-
getObject
@NotNull public <T extends ObjectType> @NotNull PrismObject<T> getObject(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull String oid, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> rawOptions, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelServiceReturns 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 exist.
- Specified by:
getObjectin interfaceModelService- Parameters:
clazz- (class) of an object to getoid- OID of the object to getrawOptions- options influencing the retrieval and processing of the objecttask- Task instance. It gives context to the execution (e.g. security context)parentResult- parent OperationResult (in/out)- 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 Collection<ObjectDeltaOperation<? extends ObjectType>> executeChanges(Collection<ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options, Task task, Collection<ProgressListener> statusListeners, OperationResult parentResult) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException -
recompute
public <F extends ObjectType> void recompute(Class<F> type, String oid, ModelExecuteOptions options, Task task, OperationResult parentResult) throws SchemaException, PolicyViolationException, ExpressionEvaluationException, ObjectNotFoundException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, SecurityViolationException Description copied from interface:ModelServiceRecomputes 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 interfaceModelService- Parameters:
type- type (class) of an object to recomputeoid- OID of the object to recomputeoptions- execute optionstask- Task instance. It gives context to the execution (e.g. security context)parentResult- parent OperationResult (in/out)- Throws:
SchemaExceptionPolicyViolationExceptionExpressionEvaluationExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionCommunicationExceptionConfigurationExceptionSecurityViolationException
-
executeRecompute
public <F extends ObjectType> void executeRecompute(@NotNull @NotNull PrismObject<F> focus, @Nullable @Nullable ModelExecuteOptions options, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectNotFoundException, SecurityViolationException, PolicyViolationException, ObjectAlreadyExistsException Generally useful convenience method. -
searchObjects
public <T extends ObjectType> SearchResultList<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery origQuery, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelServiceSearch 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. When searching for objects ofShadowType, there are specific requirements related to the query. Please seeProvisioningService.searchObjects(Class, ObjectQuery, Collection, Task, OperationResult)for more information.- Specified by:
searchObjectsin interfaceModelService- Parameters:
type- (class) of an object to searchorigQuery- search queryrawOptions- options influencing the retrieval and processing of the objectstask- Task instance. It gives context to the execution (e.g. security context)parentResult- parent OperationResult (in/out)- 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)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
-
getObjectManager
@NotNull public static <T extends ObjectType> ObjectTypes.ObjectManager getObjectManager(Class<T> clazz, Collection<SelectorOptions<GetOperationOptions>> options) Returns the component that is responsible for execution of get/search/count operation for given type of objects, under given options. Specifically, in raw mode we simply skip specialized components like provisioning or task manager, and we go directly to repository. Actually it is a bit questionable if this is really correct. But this is how it has been implemented for a long time. -
searchContainers
public <T extends Containerable> SearchResultList<T> searchContainers(@NotNull @NotNull Class<T> type, @Nullable @Nullable ObjectQuery origQuery, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> rawOptions, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException Description copied from interface:ModelServiceSearch for "sub-object" structures, i.e. containers. Supported types are: AccessCertificationCaseType, CaseWorkItemType, OperationExecutionType and AssignmentType. The current implementation ignores the `readOnly` option because of the way how security constraints are applied. Currently, the objects are returned in the context of their parent values, up to the level of prism objects. (In the future, we may make this behavior configurable.) The security is applied to all levels - from the parent objects downwards.- Specified by:
searchContainersin interfaceModelService- Throws:
SchemaExceptionSecurityViolationExceptionConfigurationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationException
-
searchContainersIterative
public <T extends Containerable> SearchResultMetadata searchContainersIterative(Class<T> type, ObjectQuery origQuery, ObjectHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException -
countContainers
public <T extends Containerable> Integer countContainers(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
countContainersin interfaceModelService- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
searchObjectsIterative
public <T extends ObjectType> SearchResultMetadata searchObjectsIterative(Class<T> type, ObjectQuery origQuery, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelServiceSearch 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. When searching for objects ofShadowType, there are specific requirements related to the query. Please seeProvisioningService.searchObjects(Class, ObjectQuery, Collection, Task, OperationResult)for more information.- Specified by:
searchObjectsIterativein interfaceModelService- Parameters:
type- (class) of an object to searchorigQuery- search queryhandler- callback handler that will be called for each found objectrawOptions- options influencing the retrieval and processing of the objectstask- Task instance. It gives context to the execution (e.g. security context)parentResult- parent OperationResult (in/out)- 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
-
countObjects
public <T extends ObjectType> Integer countObjects(Class<T> type, ObjectQuery origQuery, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ConfigurationException, SecurityViolationException, CommunicationException, ExpressionEvaluationException Description copied from interface:ModelServiceCount 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. When counting objects ofShadowType, there are specific requirements related to the query. Please seeProvisioningService.searchObjects(Class, ObjectQuery, Collection, Task, OperationResult)for more information.- Specified by:
countObjectsin interfaceModelService- Parameters:
type- (class) of an object to searchorigQuery- search queryrawOptions- options influencing the retrieval and processing of the objectstask- Task instance. It gives context to the execution (e.g. security context)parentResult- parent OperationResult (in/out)- Returns:
- number of objects of specified type that match search criteria (subject to paging). May return null if the number of objects is not known.
- Throws:
SchemaException- unknown property used in search queryObjectNotFoundException- object required for a search was not found (e.g. resource definition)ConfigurationException- 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)CommunicationException- Communication (network) error during retrieval. E.g. error communicating with the resourceExpressionEvaluationException
-
searchShadowOwner
public PrismObject<? extends FocusType> searchShadowOwner(String shadowOid, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException Description copied from interface:ModelServiceReturns the Focus object representing owner of specified 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:
searchShadowOwnerin interfaceModelService- Parameters:
shadowOid- OID of the shadow to look for an ownertask- Task instance. It gives context to the execution (e.g. security context)parentResult- parent OperationResult (in/out)- Returns:
- owner of the account or null
- Throws:
ObjectNotFoundException- specified account was not foundSecurityViolationExceptionSchemaExceptionConfigurationExceptionExpressionEvaluationExceptionCommunicationException
-
searchReferences
public SearchResultList<ObjectReferenceType> searchReferences(ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException Description copied from interface:ModelServiceReference search - currently supporting roleMembershipRef and linkRef search. This returns reference objects extracted from the actual object(s) that own them, but selection of which (and cardinality of the result list) is based on a repository search. Query must not be null and its filter must be: * either a OWNER-BY filter, * or AND filter containing exactly one OWNER-BY filter and optionally one or more REF filters with empty path (self).- Specified by:
searchReferencesin interfaceModelService- Parameters:
query- mandatory query with exactly one root OWNER-BY and additional REF filters- Throws:
SchemaExceptionSecurityViolationExceptionConfigurationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationException
-
countReferences
public Integer countReferences(ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:ModelServiceReference count - currently supporting roleMembershipRef and linkRef search. SeeModelService.searchReferences(ObjectQuery, Collection, Task, OperationResult)for more details.- Specified by:
countReferencesin interfaceModelService- Parameters:
query- mandatory query- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
searchReferencesIterative
public SearchResultMetadata searchReferencesIterative(@NotNull @NotNull ObjectQuery query, @NotNull @NotNull ObjectHandler<ObjectReferenceType> handler, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException Description copied from interface:ModelService -
testResource
public OperationResult testResource(String resourceOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, ConfigurationException, ExpressionEvaluationException, CommunicationException, SecurityViolationException Description copied from interface:ModelServiceTest the resource connection and basic resource connector functionality. Authorizations are checked here. Work same asProvisioningService.testResource(PrismObject, Task, OperationResult).- Specified by:
testResourcein interfaceModelService- Parameters:
resourceOid- OID of resource to test- Returns:
- results of executed tests
- Throws:
ObjectNotFoundException- specified object does not existSchemaExceptionConfigurationExceptionExpressionEvaluationExceptionCommunicationExceptionSecurityViolationException
-
testResource
public OperationResult testResource(PrismObject<ResourceType> resource, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, ConfigurationException Description copied from interface:ModelServiceTest the resource connection and basic resource connector functionality. Work same asProvisioningService.testResource(PrismObject, Task, OperationResult). For internal use. Authorizations are NOT checked here!- Specified by:
testResourcein interfaceModelService- Parameters:
resource- resource to test- Returns:
- results of executed tests
- Throws:
ObjectNotFoundException- specified object does not existSchemaExceptionConfigurationException
-
testResourcePartialConfiguration
public OperationResult testResourcePartialConfiguration(PrismObject<ResourceType> resource, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, ConfigurationException Description copied from interface:ModelServiceTest partial resource connector configuration. Testing only basic connection. Method work with OperationResult same as methodProvisioningService.testResource(PrismObject, Task, OperationResult). For internal use. Authorizations are NOT checked here!- Specified by:
testResourcePartialConfigurationin interfaceModelService- Parameters:
resource- resource to test- Returns:
- results of executed partial test
- Throws:
ObjectNotFoundException- specified object does not existSchemaExceptionConfigurationException
-
discoverResourceConnectorConfiguration
public DiscoveredConfiguration discoverResourceConnectorConfiguration(PrismObject<ResourceType> resource, OperationResult result) Description copied from interface:ModelServiceMethod work same as
ProvisioningService.discoverConfiguration(PrismObject, OperationResult).- Specified by:
discoverResourceConnectorConfigurationin interfaceModelService- Parameters:
resource- resource with minimal connector configuration- Returns:
- Suggested configuration properties wrapped in DiscoveredConfiguration.
-
fetchSchema
@Nullable public @Nullable ResourceSchema fetchSchema(@NotNull @NotNull PrismObject<ResourceType> resource, @NotNull @NotNull OperationResult result) Description copied from interface:ModelServiceMethod work same as
ProvisioningService.fetchSchema(PrismObject, OperationResult).- Specified by:
fetchSchemain interfaceModelService- Parameters:
resource- resource with connector configuration- Returns:
- Resource schema fetched by connector
-
getNativeCapabilities
@NotNull public @NotNull CapabilityCollectionType getNativeCapabilities(@NotNull @NotNull String connOid, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, ObjectNotFoundException Description copied from interface:ModelServiceMethod work same as
EXPERIMENTAL feature.ProvisioningService.getNativeCapabilities(String, OperationResult).- Specified by:
getNativeCapabilitiesin interfaceModelService- Throws:
SchemaExceptionCommunicationExceptionConfigurationExceptionObjectNotFoundException
-
importFromResource
public void importFromResource(String resourceOid, QName objectClass, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelServiceImport accounts from resource.
Invocation of this method may be switched to background.
TODO: Better description- Specified by:
importFromResourcein interfaceModelService- Throws:
ObjectNotFoundExceptionSchemaExceptionCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
importFromResource
public void importFromResource(String shadowOid, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ModelServiceImport single account from resource.
TODO: Better description- Specified by:
importFromResourcein interfaceModelService- Throws:
ObjectNotFoundExceptionSchemaExceptionCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
importObjectsFromFile
public void importObjectsFromFile(File input, ImportOptionsType options, Task task, OperationResult parentResult) throws FileNotFoundException Description copied from interface:ModelServiceImport objects from file. Invocation of this method may be switched to background.- Specified by:
importObjectsFromFilein interfaceModelService- Throws:
FileNotFoundException
-
importObjectsFromStream
public void importObjectsFromStream(InputStream input, String language, ImportOptionsType options, Task task, OperationResult parentResult) Description copied from interface:ModelServiceImport objects from stream. Invocation of this method will happen in foreground, as the stream cannot be serialized. The results will be provided in the task.- Specified by:
importObjectsFromStreamin interfaceModelService
-
importObject
public <O extends ObjectType> void importObject(PrismObject<O> object, ImportOptionsType options, Task task, OperationResult parentResult) Description copied from interface:ModelServiceImport object. The results will be provided in the task.- Specified by:
importObjectin interfaceModelService
-
discoverConnectors
public Set<ConnectorType> discoverConnectors(ConnectorHostType hostType, Task task, OperationResult parentResult) throws CommunicationException, SecurityViolationException Description copied from interface:ModelServiceDiscovers local or remote connectors. The operation will try to search for new connectors. It works either on local host (hostType is null) or on a remote host (hostType is not null). All discovered connectors are stored in the repository. It returns connectors that were discovered: those that were not in the repository before invocation of this operation.- Specified by:
discoverConnectorsin interfaceModelService- Parameters:
hostType- definition of a connector host or nullparentResult- parentResult parent OperationResult (in/out)- Returns:
- discovered connectors
- Throws:
CommunicationException- error communicating with the connector hostSecurityViolationException
-
postInit
Description copied from interface:ModelServiceFinish initialization of the model and lower system components (provisioning, repository, etc). The implementation may execute resource-intensive tasks in this method. All the dependencies should be already constructed, properly wired and initialized. Also logging and other infrastructure should be already set up.- Specified by:
postInitin interfaceModelService
-
shutdown
public void shutdown()Description copied from interface:ModelServiceshutdown model and lower system components- Specified by:
shutdownin interfaceModelService
-
compareObject
public <T extends ObjectType> CompareResultType compareObject(PrismObject<T> provided, Collection<SelectorOptions<GetOperationOptions>> rawReadOptions, ModelCompareOptions compareOptions, @NotNull @NotNull List<? extends ItemPath> ignoreItems, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException Description copied from interface:ModelServiceTODO- Specified by:
compareObjectin interfaceModelService- Throws:
SchemaExceptionObjectNotFoundExceptionSecurityViolationExceptionCommunicationExceptionConfigurationExceptionExpressionEvaluationException
-
suspendTasks
public boolean suspendTasks(Collection<String> taskOids, long waitForStop, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceSuspends a set of tasks. Sets their execution status to SUSPENDED. Stops their execution (unless doNotStop is set).- Specified by:
suspendTasksin interfaceTaskService- Parameters:
taskOids- a collection of OIDs of tasks that have to be suspendedwaitForStop- how long (in milliseconds) to wait for stopping the execution of tasks;TaskManager.WAIT_INDEFINITELYmeans wait indefinitely,TaskManager.DO_NOT_WAITmeans stop the tasks, but do not wait for finishing their execution,TaskManager.DO_NOT_STOPmeans do not try to stop the task execution. Tasks will only be put into SUSPENDED state, and their executions (if any) will be left as they are. Use this option only when you know what you're doing.operationTask- Task in which the operation is executed. NOT the task that be being operated on.- Returns:
- true if all the tasks were stopped, false if some tasks continue to run or if stopping was not requested (DO_NOT_STOP option)
- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
suspendTask
public boolean suspendTask(String taskOid, long waitForStop, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
suspendTaskin interfaceTaskService- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
suspendTaskTree
public boolean suspendTaskTree(String taskOid, long waitForStop, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
suspendTaskTreein interfaceTaskService- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
suspendAndDeleteTasks
public void suspendAndDeleteTasks(Collection<String> taskOids, long waitForStop, boolean alsoSubtasks, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceSuspends tasks and deletes them.- Specified by:
suspendAndDeleteTasksin interfaceTaskService- Parameters:
taskOids- Collection of task OIDs to be suspended and deleted.waitForStop- How long (in milliseconds) to wait for task stop before proceeding with deletion.TaskManager.WAIT_INDEFINITELYmeans wait indefinitely,TaskManager.DO_NOT_WAITmeans stop the tasks, but do not wait for finishing their execution,TaskManager.DO_NOT_STOPmeans do not try to stop the task execution. Tasks will only be put into SUSPENDED state, and their executions (if any) will be left as they are. Use this option only when you know what you're doing.alsoSubtasks- Should also subtasks be deleted?- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
suspendAndDeleteTask
public void suspendAndDeleteTask(String taskOid, long waitForStop, boolean alsoSubtasks, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
suspendAndDeleteTaskin interfaceTaskService- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
resumeTasks
public void resumeTasks(Collection<String> taskOids, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceResume suspended tasks.- Specified by:
resumeTasksin interfaceTaskService- Parameters:
taskOids- a collection of OIDs of tasks that have to be resumed- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
resumeTask
public void resumeTask(String taskOid, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
resumeTaskin interfaceTaskService- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
resumeTaskTree
public void resumeTaskTree(String coordinatorOid, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
resumeTaskTreein interfaceTaskService- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
scheduleTasksNow
public void scheduleTasksNow(Collection<String> taskOids, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceSchedules a RUNNABLE/CLOSED tasks to be run immediately. (If a task will really start immediately, depends e.g. on whether a scheduler is started, whether there are available threads, and so on.)- Specified by:
scheduleTasksNowin interfaceTaskService- Parameters:
taskOids- a collection of OIDs of tasks that have to be scheduled- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
scheduleTaskNow
public void scheduleTaskNow(String taskOid, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException - Specified by:
scheduleTaskNowin interfaceTaskService- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
getTaskByIdentifier
public PrismObject<TaskType> getTaskByIdentifier(String identifier, Collection<SelectorOptions<GetOperationOptions>> rawOptions, Task operationTask, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException, CommunicationException Description copied from interface:TaskServiceReturns information about task, given its identifier.- Specified by:
getTaskByIdentifierin interfaceTaskService- Throws:
SchemaExceptionObjectNotFoundExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationExceptionCommunicationException
-
deactivateServiceThreads
public boolean deactivateServiceThreads(long timeToWait, Task operationTask, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceDeactivates service threads (temporarily). This will suspend all background activity such as scanning threads, heartbeats and similar mechanisms. Note: The threads are normally activated after task manager implementation starts. This methods should not be used in a normal case. WARNING: this feature is intended for development-time diagnostics and should not be used on production environments. Suspending the threads may affect correct behavior of the system (such as timeouts on heartbeats). Use this feature only if you really know what you are doing. timeToWait is only for orientation = it may be so that the implementation would wait 2 or 3 times this value (if it waits separately for several threads completion) -
reactivateServiceThreads
public void reactivateServiceThreads(Task operationTask, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceRe-activates the service threads after they have been deactivated. -
getServiceThreadsActivationState
public boolean getServiceThreadsActivationState()Description copied from interface:TaskServiceReturns true if the service threads are running. This method returns true in a normal case. It returns false is the threads were temporarily suspended.- Specified by:
getServiceThreadsActivationStatein interfaceTaskService- Returns:
- true if the service threads are running.
-
stopSchedulers
public void stopSchedulers(Collection<String> nodeIdentifiers, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceStops the schedulers on a given nodes. This means that at that nodes no tasks will be started.- Specified by:
stopSchedulersin interfaceTaskService- Parameters:
nodeIdentifiers- Nodes on which the schedulers should be stopped.- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
stopSchedulersAndTasks
public boolean stopSchedulersAndTasks(Collection<String> nodeIdentifiers, long waitTime, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceStops a set of schedulers (on their nodes) and tasks that are executing on these nodes.- Specified by:
stopSchedulersAndTasksin interfaceTaskService- Parameters:
nodeIdentifiers- collection of node identifierswaitTime- how long to wait for task shutdown, in milliseconds;TaskManager.WAIT_INDEFINITELYmeans wait indefinitely,TaskManager.DO_NOT_WAITmeans stop the tasks, but do not wait for finishing their execution.- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
startSchedulers
public void startSchedulers(Collection<String> nodeIdentifiers, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceStarts the scheduler on a given nodes. A prerequisite is that nodes are running and their TaskManagers are not in an error state.- Specified by:
startSchedulersin interfaceTaskService- Parameters:
nodeIdentifiers- Nodes on which the scheduler should be started.- Throws:
SecurityViolationExceptionObjectNotFoundExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
synchronizeTasks
public void synchronizeTasks(Task operationTask, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:TaskServiceSynchronizes information in midPoint repository and task scheduling database. Not needed to use during normal operation (only when problems occur).- Specified by:
synchronizeTasksin interfaceTaskService- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
reconcileWorkers
public void reconcileWorkers(String oid, Task opTask, OperationResult result) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException - Specified by:
reconcileWorkersin interfaceTaskService- Throws:
CommunicationExceptionObjectNotFoundExceptionSchemaExceptionSecurityViolationExceptionConfigurationExceptionExpressionEvaluationException
-
deleteActivityStateAndWorkers
public void deleteActivityStateAndWorkers(String rootTaskOid, boolean deleteWorkers, long subtasksWaitTime, Task operationTask, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException -
completeWorkItem
public void completeWorkItem(@NotNull @NotNull WorkItemId workItemId, @NotNull @NotNull AbstractWorkItemOutputType output, @Nullable @Nullable ObjectDelta<?> additionalDelta, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws SecurityViolationException, SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:CaseServiceCompletes a work item. For approvals only: Additional delta is here present in "prism" form (not as ObjectDeltaType), to simplify the life for clients. It is applied only if the output signals that work item is approved.- Specified by:
completeWorkItemin interfaceCaseService- Throws:
SecurityViolationExceptionSchemaExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
completeWorkItem
public void completeWorkItem(@NotNull @NotNull WorkItemId workItemId, @NotNull @NotNull AbstractWorkItemOutputType output, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws SecurityViolationException, SchemaException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:CaseServiceCompletes a work item (e.g. approves/rejects it if it belongs to an approval case).- Specified by:
completeWorkItemin interfaceCaseService- Throws:
SecurityViolationExceptionSchemaExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
cancelCase
public void cancelCase(@NotNull @NotNull String caseOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ExpressionEvaluationException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException Description copied from interface:CaseServiceCancels a case. The case should be in `created` or `open` state. -
claimWorkItem
public void claimWorkItem(@NotNull @NotNull WorkItemId workItemId, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, ExpressionEvaluationException Description copied from interface:CaseServiceClaims a work item that is assigned to an abstract role, so it becomes assigned to the current princial. -
releaseWorkItem
public void releaseWorkItem(@NotNull @NotNull WorkItemId workItemId, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, ExpressionEvaluationException Description copied from interface:CaseServiceReleases claimed work item. -
delegateWorkItem
public void delegateWorkItem(@NotNull @NotNull WorkItemId workItemId, @NotNull @NotNull WorkItemDelegationRequestType delegationRequest, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:CaseServiceDelegates a work item.- Specified by:
delegateWorkItemin interfaceCaseService- Throws:
ObjectNotFoundExceptionSecurityViolationExceptionSchemaExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
executeBulkAction
public BulkActionExecutionResult executeBulkAction(@NotNull @NotNull ExecuteScriptConfigItem scriptExecutionCommand, @NotNull @NotNull VariablesMap initialVariables, @NotNull @NotNull BulkActionExecutionOptions options, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, ObjectAlreadyExistsException Description copied from interface:BulkActionsServiceSynchronously executes any scripting expression (with no input data). Determines and respects the execution profile with regards to the origin of the script.- Specified by:
executeBulkActionin interfaceBulkActionsService- Parameters:
scriptExecutionCommand- Scripting request to execute.task- Task in context of which the script should execute (in foreground!)result- Operation result TODO consider returning ExecutionContext (requires moving the context to model api)- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationExceptionPolicyViolationExceptionObjectAlreadyExistsException
-
getCampaignStatistics
public AccessCertificationCasesStatisticsType getCampaignStatistics(String campaignOid, boolean currentStageOnly, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceProvides statistical information about outcomes of cases in a given campaign.- Specified by:
getCampaignStatisticsin interfaceAccessCertificationService- Parameters:
campaignOid- OID of the campaign to report oncurrentStageOnly- Whether to report on stage outcomes for current-stage cases (if true), or to report on overall outcomes of all cases (if false).task- Task in context of which all operations will take place.parentResult- Result for the operations.- Returns:
- filled-in statistics object
- Throws:
ObjectNotFoundExceptionSchemaExceptionSecurityViolationExceptionObjectAlreadyExistsExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
cleanupCampaigns
public void cleanupCampaigns(@NotNull @NotNull CleanupPolicyType policy, Task task, OperationResult result) Description copied from interface:AccessCertificationServiceCleans up closed certification campaigns. The authorizations are checked by the method implementation.- Specified by:
cleanupCampaignsin interfaceAccessCertificationService
-
recordDecision
public void recordDecision(String campaignOid, long caseId, long workItemId, AccessCertificationResponseType response, String comment, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceRecords a particular decision of a reviewer.- Specified by:
recordDecisionin interfaceAccessCertificationService- Parameters:
campaignOid- OID of the campaign to which the decision belongs.caseId- ID of the certification case to which the decision belongs.workItemId- ID of the work item to which the decision belongs.response- The response.comment- Reviewer's comment.task- Task in context of which all operations will take place.parentResult- Result for the operations.- Throws:
ObjectNotFoundExceptionSchemaExceptionSecurityViolationExceptionObjectAlreadyExistsExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
searchOpenWorkItems
public List<AccessCertificationWorkItemType> searchOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceTODO update description Returns a set of certification decisions for currently logged-in user. Each decision is returned in context of its certification case. Case has to match a given query. So, in contrast to model.searchContainers(AccessCertificationCaseType...) method that returns specified cases with all their decisions, this one returns a list of cases where each case has at most one decision: the one that corresponds to specified reviewer and current certification stage. Zero decisions means that the reviewer has not provided any decision yet. Query argument for cases is the same as in the model.searchContainers(AccessCertificationCaseType...) call.- Specified by:
searchOpenWorkItemsin interfaceAccessCertificationService- Parameters:
baseWorkItemsQuery- Specification of the cases to retrieve.notDecidedOnly- If true, only response==(NO_DECISION or null) should be returned. Although it can be formulated in Query API terms, this would refer to implementation details - so the cleaner way is keep this knowledge inside certification module only.allItems- If true, returns items for all users (requires "ALL" authorization).options- Options to use (e.g. RESOLVE_NAMES).task- Task in context of which all operations will take place.result- Result for the operations.- Returns:
- A list of relevant certification cases.
- Throws:
ObjectNotFoundExceptionSchemaExceptionSecurityViolationExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
countOpenWorkItems
public int countOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ExpressionEvaluationException, CommunicationException, ConfigurationException -
closeCampaign
public void closeCampaign(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceCloses a campaign. -
reiterateCampaign
public void reiterateCampaign(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceReiterates a closed campaign. -
startRemediation
public void startRemediation(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceStarts the remediation phase for the campaign. The campaign has to be in the last stage and that stage has to be already closed. -
closeCurrentStage
public void closeCurrentStage(String campaignOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceOpens the next stage in the certification campaign. If the stage being opened is the first stage, certification cases will be generated for the campaign, depending on the certification definition (scope and handler). In all stages, reviewers will be assigned to cases, based again on the definition (reviewer specification in stage definition and handler).- Specified by:
closeCurrentStagein interfaceAccessCertificationService- Parameters:
campaignOid- Certification campaign OID.task- Task in context of which all operations will take place.parentResult- Result for the operations.- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
openNextStage
public void openNextStage(String campaignOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceOpens the next review stage in the certification campaign. If the stage being opened is the first stage, certification cases will be generated for the campaign, depending on the certification definition (scope and handler). In all stages, reviewers will be assigned to cases, based again on the definition (reviewer specification in stage definition and handler).- Specified by:
openNextStagein interfaceAccessCertificationService- Parameters:
campaignOid- Certification campaign OID.task- Task in context of which all operations will take place.parentResult- Result for the operations.- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
createCampaign
public AccessCertificationCampaignType createCampaign(String definitionOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Description copied from interface:AccessCertificationServiceCreates a certification campaign: creates AccessCertificationCampaignType object, based on general information in certification definition. Mandatory information in the certification definition are: - definition name - definition description - handlerUri - scope definition - stage(s) definition Optional information in the certification definition: - tenant reference Owner of newly created campaign is the currently logged-on user. The campaign will NOT be started upon creation. It should be started explicitly by calling openNextStage method.- Specified by:
createCampaignin interfaceAccessCertificationService- Parameters:
definitionOid- OID of certification definition for this campaign.task- Task in context of which all operations will take place.parentResult- Result for the operations.- Returns:
- Object for the created campaign. It will be stored in the repository as well.
- Throws:
SchemaExceptionSecurityViolationExceptionObjectNotFoundExceptionObjectAlreadyExistsExceptionExpressionEvaluationExceptionCommunicationExceptionConfigurationException
-
mergeObjects
public <O extends ObjectType> Collection<ObjectDeltaOperation<? extends ObjectType>> mergeObjects(Class<O> type, String leftOid, String rightOid, String mergeConfigurationName, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, ConfigurationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, PolicyViolationException, SecurityViolationException Description copied from interface:ModelServiceMerge two objects into one. EXPERIMENTAL feature. The method signature is likely to change in the future.- Specified by:
mergeObjectsin interfaceModelService- Parameters:
type- object typeleftOid- left-side object OIDrightOid- right-side object OIDmergeConfigurationName- name of the merge configuration to use- Throws:
ObjectNotFoundExceptionSchemaExceptionConfigurationExceptionObjectAlreadyExistsExceptionExpressionEvaluationExceptionCommunicationExceptionPolicyViolationExceptionSecurityViolationException
-
getPrismContext
- Specified by:
getPrismContextin interfaceModelService
-
getThreadsDump
public String getThreadsDump(@NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException - Specified by:
getThreadsDumpin interfaceTaskService- Throws:
CommunicationExceptionObjectNotFoundExceptionSchemaExceptionSecurityViolationExceptionConfigurationExceptionExpressionEvaluationException
-
getRunningTasksThreadsDump
public String getRunningTasksThreadsDump(@NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException -
recordRunningTasksThreadsDump
public String recordRunningTasksThreadsDump(String cause, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException, ObjectAlreadyExistsException -
getTaskThreadsDump
public String getTaskThreadsDump(@NotNull @NotNull String taskOid, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult parentResult) throws CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, ExpressionEvaluationException - Specified by:
getTaskThreadsDumpin interfaceTaskService- Throws:
CommunicationExceptionObjectNotFoundExceptionSchemaExceptionSecurityViolationExceptionConfigurationExceptionExpressionEvaluationException
-
notifyChange
public void notifyChange(ResourceObjectShadowChangeDescriptionType changeDescription, Task task, OperationResult parentResult) throws CommonException - Specified by:
notifyChangein interfaceModelService- Throws:
CommonException
-
isSupportedByRepository
Description copied from interface:ModelServiceReturns `true` if the particular object type is supported by the current repository.- Specified by:
isSupportedByRepositoryin interfaceModelService
-
parseProcessedObject
public <O extends ObjectType> ProcessedObjectImpl<O> parseProcessedObject(@NotNull @NotNull SimulationResultProcessedObjectType bean, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws SchemaException - Specified by:
parseProcessedObjectin interfaceModelService- Throws:
SchemaException
-