I am doing a java project connected to Documentum data storage . I am trying to create an ACL manually using the API class . The following is my code :
StringBuilder newAcl = new StringBuilder();
newAcl.append(selectedItem.getName());
newAcl.append(selectedItem.getId());
newAcl.append("_acl");
IDfACL acl = (IDfACL)_session.newObject("dm_acl");
acl.setObjectName(newAcl.toString());
acl.setDescription(newAcl.toString());
acl.save();
IDfPermit permit = new DfPermit();
permit.setAccessorName(newAcl.toString());
permit.setPermitType(IDfPermit.DF_ACCESS_PERMIT);
permit.setPermitValue(IDfACL.DF_XPERMIT_CHANGE_FOLDER_LINKS_STR);
permit.setPermitValue(IDfACL.DF_PERMIT_READ_STR);
acl.grantPermit(permit);
acl.save();
The thing is I can successully create the ACL I'm trying to create and it's retrievable from dm_acl table object . The only thing that I've stucked at is how to set the owner as I have never specified that in my code and once I check the dm_acl table it says that the owner is dm_admin . Any idea how can I fix that ? Beside although I can create the ACL successfully in dm_acl but I get an error as well saying :
[DM_ACL_E_USER_NOT_EXIST]error: "The owner_name or accessor_name 'China InvestmentsCIL_acl' given in the ACL 'China InvestmentsCIL_acl' does not exist."