// String aclName = element.getString("acl_name");
// String aclDomain = element.getString("acl_domain");
// IDfACL acl = ((DctmConnection)element.getConnection()).getSession().getACL(aclDomain, aclName);
IDfSysObject obj = (IDfSysObject)((DctmConnection)element.getConnection()).getDctmObject(element.getId());
IDfACL acl = obj.getACL();
switch (obj.getPermit()) {
default:
case 7:
setBoolean(DELETE, true);
case 6:
setBoolean(WRITE, true);
case 5:
setBoolean(VERSION, true);
case 4:
setBoolean(LINK, true);
case 3:
setBoolean(SEARCH, true);
case 2:
setBoolean(READ, true);
case 1:
case 0:
}
int xper = obj.getXPermit(null);
setBoolean(EXECUTE, true); //??
setBoolean(LOCATION, true); //??
setBoolean(STATE, (xper & 65536) == 65536); // Bit 16
setBoolean(GRANT, (xper & 131072) == 131072); // Bit 17
setBoolean(OWNER, false);
for (int i = 0; i < acl.getAccessorCount(); i++) {
DctmPolicy p = new DctmPolicy(element);
p.setString(PRINCIPAL, acl.getAccessorName(i));
p.setBoolean(READ, false);
p.setBoolean(SEARCH, false);
p.setBoolean(LINK, false);
p.setBoolean(VERSION, false);
p.setBoolean(WRITE, false);
p.setBoolean(DELETE, false);
// String aname = acl.getAccessorName(i);
// boolean agroup = acl.isGroup(i);
//
// if (agroup) {
// IDfGroup grp = ((DctmConnection)element.getConnection()).getSession().getGroup(aname);
// grp.getGroupsNames();
// if (grp != null) System.out.println(grp.dump());
// } else {
// if ("dm_world".equals(aname)) {
// System.out.println("dm_world");
// }else
// if ("dm_owner".equals(aname)) {
// System.out.println("dm_owner");
// } else {
// IDfUser usr = ((DctmConnection)element.getConnection()).getSession().getUser(aname);
// if (usr != null) System.out.println(usr.dump());
// }
// }
switch (acl.getAccessorPermit(i)) {
default:
case 7:
p.setBoolean(DELETE, true);
case 6:
p.setBoolean(WRITE, true);
case 5:
p.setBoolean(VERSION, true);
case 4:
p.setBoolean(LINK, true);
case 3:
p.setBoolean(SEARCH, true);
case 2:
p.setBoolean(READ, true);
case 1:
case 0:
}
int xpermit = acl.getAccessorXPermit(i);
p.setBoolean(EXECUTE, true); //??
p.setBoolean(LOCATION, true); //??
p.setBoolean(STATE, (xpermit & 65536) == 65536); // Bit 16
p.setBoolean(GRANT, (xpermit & 131072) == 131072); // Bit 17