X-Git-Url: https://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.app.core%2Fsrc%2Forg%2Fargeo%2Fapp%2Fcore%2FSuiteUtils.java;h=da794cb0cd424aa74412a3b9a3d00102833d6bb3;hp=6453b88b4c2c2d12133a1dd94923a818a668b0e1;hb=932dbdce11c1a862b6a7babcb91bfec8e491e0b8;hpb=0b492f2cfb8a24ec84e1dd52825624f5e9ab7e81 diff --git a/org.argeo.app.core/src/org/argeo/app/core/SuiteUtils.java b/org.argeo.app.core/src/org/argeo/app/core/SuiteUtils.java index 6453b88..da794cb 100644 --- a/org.argeo.app.core/src/org/argeo/app/core/SuiteUtils.java +++ b/org.argeo.app.core/src/org/argeo/app/core/SuiteUtils.java @@ -13,8 +13,8 @@ import javax.security.auth.x500.X500Principal; import javax.xml.namespace.QName; import org.argeo.api.acr.Content; -import org.argeo.api.acr.ldap.LdapAttrs; -import org.argeo.api.acr.ldap.LdapObjs; +import org.argeo.api.acr.ldap.LdapAttr; +import org.argeo.api.acr.ldap.LdapObj; import org.argeo.api.cms.CmsConstants; import org.argeo.api.cms.CmsSession; import org.argeo.app.api.EntityType; @@ -40,8 +40,8 @@ public class SuiteUtils { userNode = usersBase.addNode(uid, NodeType.NT_UNSTRUCTURED); userNode.addMixin(EntityType.user.get()); userNode.addMixin(NodeType.MIX_CREATED); - userNode.setProperty(LdapAttrs.distinguishedName.property(), userDn.toString()); - userNode.setProperty(LdapAttrs.uid.property(), uid); + userNode.setProperty(LdapAttr.distinguishedName.property(), userDn.toString()); + userNode.setProperty(LdapAttr.uid.property(), uid); adminSession.save(); // JackrabbitSecurityUtils.denyPrivilege(adminSession, userNode.getPath(), SuiteRole.coworker.dn(), // Privilege.JCR_READ); @@ -121,20 +121,20 @@ public class SuiteUtils { } synchronized static public long findNextId(Content hierarchyUnit, QName cclass) { - if (!hierarchyUnit.hasContentClass(LdapObjs.posixGroup.qName())) + if (!hierarchyUnit.hasContentClass(LdapObj.posixGroup.qName())) throw new IllegalArgumentException(hierarchyUnit + " is not a POSIX group"); - long min = hierarchyUnit.get(LdapAttrs.gidNumber.qName(), Long.class).orElseThrow(); + long min = hierarchyUnit.get(LdapAttr.gidNumber.qName(), Long.class).orElseThrow(); long currentMax = 0l; for (Content childHu : hierarchyUnit) { - if (!childHu.hasContentClass(LdapObjs.organizationalUnit.qName())) + if (!childHu.hasContentClass(LdapObj.organizationalUnit.qName())) continue; // FIXME filter out functional hierarchy unit for (Content role : childHu) { if (role.hasContentClass(cclass)) { - if (LdapObjs.posixAccount.qName().equals(cclass)) { - Long id = role.get(LdapAttrs.uidNumber.qName(), Long.class).orElseThrow(); + if (LdapObj.posixAccount.qName().equals(cclass)) { + Long id = role.get(LdapAttr.uidNumber.qName(), Long.class).orElseThrow(); if (id > currentMax) currentMax = id; }