projectInstance.setAllowedGroupOperations(groupOperations);
Instance groupOpInst1 = (((WrappedProtegeInstanceImpl) groupOperation).getProtegeInstance());
Instance cloneGroupOpInst = (Instance) groupOpInst1.shallowCopy(null, null);
GroupOperation cloneGroupOp = new GroupOperationImpl((MetaProjectImpl) projectInstance.getMetaProject(), cloneGroupOpInst);
Set<Operation> cloneGroupAllowedOp = cloneGroupOp.getAllowedOperations();
for (Operation op : cloneGroupAllowedOp) {
if (op.equals(operation)) {
cloneGroupAllowedOp.remove(op);
break;
}
}
if (cloneGroupAllowedOp.size() > 0) {
cloneGroupOp.setAllowedOperations(cloneGroupAllowedOp);
projectInstance.addAllowedGroupOperations(cloneGroupOp);
}
updateProjectOwnerPolicy(projectInstance);