Package com.evolveum.midpoint.model.api
Interface AccessCertificationService
public interface AccessCertificationService
Interface to access certification related functionality. E.g. launching certification campaigns,
 filling-in certification forms, etc.
 EXPERIMENTAL.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcleanupCampaigns(@NotNull CleanupPolicyType policy, com.evolveum.midpoint.task.api.Task task, OperationResult result) Cleans up closed certification campaigns.voidcloseCampaign(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult result) Closes a campaign.voidcloseCurrentStage(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) Opens the next stage in the certification campaign.intcountOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) default intcountOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) createCampaign(String definitionOid, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) Creates a certification campaign: creates AccessCertificationCampaignType object, based on general information in certification definition.getCampaignStatistics(String campaignOid, boolean currentStageOnly, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) Provides statistical information about outcomes of cases in a given campaign.voidopenNextStage(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) Opens the next review stage in the certification campaign.voidrecordDecision(String campaignOid, long caseId, long workItemId, AccessCertificationResponseType response, String comment, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) Records a particular decision of a reviewer.voidreiterateCampaign(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult result) Reiterates a closed campaign.searchOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) TODO update description Returns a set of certification decisions for currently logged-in user.default List<AccessCertificationWorkItemType>searchOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) voidstartRemediation(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult result) Starts the remediation phase for the campaign.
- 
Method Details- 
createCampaignAccessCertificationCampaignType createCampaign(String definitionOid, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, CommunicationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException Creates 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.- 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:
- SchemaException
- SecurityViolationException
- ConfigurationException
- ObjectNotFoundException
- CommunicationException
- ExpressionEvaluationException
- ObjectAlreadyExistsException
- PolicyViolationException
 
- 
openNextStagevoid openNextStage(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, CommunicationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException Opens 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).- Parameters:
- campaignOid- Certification campaign OID.
- task- Task in context of which all operations will take place.
- parentResult- Result for the operations.
- Throws:
- SchemaException
- SecurityViolationException
- ConfigurationException
- ObjectNotFoundException
- CommunicationException
- ExpressionEvaluationException
- ObjectAlreadyExistsException
- PolicyViolationException
 
- 
closeCurrentStagevoid closeCurrentStage(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException, CommunicationException, ExpressionEvaluationException, ObjectAlreadyExistsException, PolicyViolationException Opens 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).- Parameters:
- campaignOid- Certification campaign OID.
- task- Task in context of which all operations will take place.
- parentResult- Result for the operations.
- Throws:
- SchemaException
- SecurityViolationException
- ConfigurationException
- ObjectNotFoundException
- CommunicationException
- ExpressionEvaluationException
- ObjectAlreadyExistsException
- PolicyViolationException
 
- 
startRemediationvoid startRemediation(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException Starts the remediation phase for the campaign. The campaign has to be in the last stage and that stage has to be already closed.
- 
closeCampaignvoid closeCampaign(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException Closes a campaign.
- 
reiterateCampaignvoid reiterateCampaign(String campaignOid, com.evolveum.midpoint.task.api.Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException Reiterates a closed campaign.
- 
searchOpenWorkItemsList<AccessCertificationWorkItemType> searchOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException TODO 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.- 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.
- parentResult- Result for the operations.
- Returns:
- A list of relevant certification cases.
- Throws:
- ObjectNotFoundException
- SchemaException
- SecurityViolationException
- ConfigurationException
- CommunicationException
- ExpressionEvaluationException
 
- 
searchOpenWorkItemsdefault List<AccessCertificationWorkItemType> searchOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException 
- 
countOpenWorkItemsint countOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, boolean allItems, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException 
- 
countOpenWorkItemsdefault int countOpenWorkItems(ObjectQuery baseWorkItemsQuery, boolean notDecidedOnly, Collection<SelectorOptions<GetOperationOptions>> options, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException, ExpressionEvaluationException 
- 
recordDecisionvoid recordDecision(String campaignOid, long caseId, long workItemId, AccessCertificationResponseType response, String comment, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException, ObjectAlreadyExistsException, ExpressionEvaluationException Records a particular decision of a reviewer.- 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:
- ObjectNotFoundException
- SchemaException
- SecurityViolationException
- ConfigurationException
- CommunicationException
- ObjectAlreadyExistsException
- ExpressionEvaluationException
 
- 
getCampaignStatisticsAccessCertificationCasesStatisticsType getCampaignStatistics(String campaignOid, boolean currentStageOnly, com.evolveum.midpoint.task.api.Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ConfigurationException, CommunicationException, ObjectAlreadyExistsException, ExpressionEvaluationException Provides statistical information about outcomes of cases in a given campaign.- Parameters:
- campaignOid- OID of the campaign to report on
- currentStageOnly- 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:
- ObjectNotFoundException
- SchemaException
- SecurityViolationException
- ConfigurationException
- CommunicationException
- ObjectAlreadyExistsException
- ExpressionEvaluationException
 
- 
cleanupCampaignsvoid cleanupCampaigns(@NotNull @NotNull CleanupPolicyType policy, com.evolveum.midpoint.task.api.Task task, OperationResult result) Cleans up closed certification campaigns. The authorizations are checked by the method implementation.
 
-