use of org.jbpm.casemgmt.impl.command.CaseCommentCommand in project jbpm by kiegroup.
the class CaseServiceImpl method removeCaseComment.
@Override
public void removeCaseComment(String caseId, String commentId) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.MODIFY_COMMENT);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new CaseCommentCommand(identityProvider, commentId, authorizationManager));
}
use of org.jbpm.casemgmt.impl.command.CaseCommentCommand in project jbpm by kiegroup.
the class CaseServiceImpl method updateCaseComment.
@Override
public void updateCaseComment(String caseId, String commentId, String author, String text, String... restrictedTo) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.MODIFY_COMMENT);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
List<String> accessRestriction = null;
if (restrictedTo != null && restrictedTo.length > 0) {
accessRestriction = Arrays.asList(restrictedTo);
}
processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new CaseCommentCommand(identityProvider, commentId, author, text, accessRestriction, authorizationManager));
}
use of org.jbpm.casemgmt.impl.command.CaseCommentCommand in project jbpm by kiegroup.
the class CaseServiceImpl method addCaseComment.
@Override
public String addCaseComment(String caseId, String author, String comment, String... restrictedTo) throws CaseNotFoundException {
authorizationManager.checkOperationAuthorization(caseId, ProtectedOperation.MODIFY_COMMENT);
ProcessInstanceDesc pi = verifyCaseIdExists(caseId);
List<String> accessRestriction = null;
if (restrictedTo != null && restrictedTo.length > 0) {
accessRestriction = Arrays.asList(restrictedTo);
}
return processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(pi.getId()), new CaseCommentCommand(identityProvider, author, comment, accessRestriction));
}
Aggregations