Interface CertificationManager
public interface CertificationManager
BEWARE: CertificationManager is responsible for authorizing all actions carried out through it.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanupCampaigns
(@NotNull CleanupPolicyType policy, Task task, OperationResult result) void
closeCampaign
(String campaignOid, Task task, OperationResult result) Closes a campaign.void
closeCurrentStage
(String campaignOid, Task task, OperationResult parentResult) Opens the next stage in the certification campaign.void
closeCurrentStageTask
(String campaignOid, Task task, OperationResult parentResult) Close current stage in the certification campaign via task in background.createCampaign
(String definitionOid, Task task, OperationResult parentResult) Creates a certification campaign: creates AccessCertificationCampaignType object, based on general information in certification definition.void
createNextStageTask
(AccessCertificationCampaignType campaign, Task task, OperationResult parentResult) Opens the next review stage in the certification campaign via task in background.void
createNextStageTask
(String campaignOid, Task task, OperationResult parentResult) Opens the next review stage in the certification campaign via task in background.getCampaignStatistics
(String campaignOid, boolean currentStageOnly, Task task, OperationResult parentResult) Provides statistical information about outcomes of cases in a given campaign.void
recordDecision
(@NotNull AccessCertificationWorkItemId workItemId, AccessCertificationResponseType response, String comment, boolean preAuthorized, Task task, OperationResult result) Records a particular decision of a reviewer.void
void
reiterateCampaign
(String campaignOid, Task task, OperationResult result) Reiterates a closed campaign.void
reiterateCampaignTask
(String campaignOid, Task task, OperationResult result) Reiterates a closed campaign.void
startRemediation
(String campaignOid, Task task, OperationResult result) Starts the remediation phase for the campaign.
-
Method Details
-
createCampaign
AccessCertificationCampaignType createCampaign(String definitionOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException 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
ObjectNotFoundException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
closeCurrentStageTask
void closeCurrentStageTask(String campaignOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Close current stage in the certification campaign via task in background. 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
ObjectNotFoundException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
createNextStageTask
void createNextStageTask(String campaignOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Opens the next review stage in the certification campaign via task in background. 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
ObjectNotFoundException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
createNextStageTask
void createNextStageTask(AccessCertificationCampaignType campaign, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Opens the next review stage in the certification campaign via task in background. 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:
campaign
- Certification campaign OID.task
- Task in context of which all operations will take place.parentResult
- Result for the operations.- Throws:
SchemaException
SecurityViolationException
ObjectNotFoundException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
closeCurrentStage
void closeCurrentStage(String campaignOid, Task task, OperationResult parentResult) throws SchemaException, SecurityViolationException, ObjectNotFoundException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException 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
ObjectNotFoundException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
startRemediation
void startRemediation(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Starts the remediation phase for the campaign. The campaign has to be in the last stage and that stage has to be already closed. -
closeCampaign
void closeCampaign(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Closes a campaign. -
reiterateCampaignTask
void reiterateCampaignTask(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Reiterates a closed campaign. -
reiterateCampaign
void reiterateCampaign(String campaignOid, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Reiterates a closed campaign. //TODO is here just because the ceritficaion trigger task. Do not use otherwise -
recordDecision
void recordDecision(@NotNull @NotNull AccessCertificationWorkItemId workItemId, AccessCertificationResponseType response, String comment, boolean preAuthorized, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Records a particular decision of a reviewer.- Parameters:
workItemId
- Complex ID of the work item to which the decision belongs.response
- The response.comment
- Reviewer's comment.preAuthorized
- Is the request already authorized?task
- Task in context of which all operations will take place.result
- Result for the operations.- Throws:
ObjectNotFoundException
SchemaException
SecurityViolationException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
getCampaignStatistics
AccessCertificationCasesStatisticsType getCampaignStatistics(String campaignOid, boolean currentStageOnly, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ExpressionEvaluationException, CommunicationException, ConfigurationException Provides statistical information about outcomes of cases in a given campaign. Doesn't require special authorization. Delegates authorization decisions to model (i.e. requires READ authorization on the campaign object).- 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:
ObjectNotFoundException
SchemaException
SecurityViolationException
ObjectAlreadyExistsException
ExpressionEvaluationException
CommunicationException
ConfigurationException
-
registerCertificationEventListener
-
cleanupCampaigns
void cleanupCampaigns(@NotNull @NotNull CleanupPolicyType policy, Task task, OperationResult result)
-