* @throws ProcessingException when something went wrong.
*/
protected void manipulateCredential(Accreditable accreditable, Role role, String operation,
String method) throws ProcessingException {
try {
ModifiablePolicy policy = getPolicy();
if (operation.equals(ADD)) {
policy.addRole(accreditable, role, method);
} else if (operation.equals(DELETE)) {
policy.removeRole(accreditable, role);
} else if (operation.equals(UP)) {
policy.moveRoleUp(accreditable, role);
} else if (operation.equals(DOWN)) {
policy.moveRoleDown(accreditable, role);
}
getPolicyManager().saveSubtreePolicy(getPolicyURL(), policy);
} catch (Exception e) {
throw new ProcessingException("Manipulating credential failed: ", e);