X-Git-Url: https://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=blobdiff_plain;f=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fdirectory%2Fldap%2FDefaultLdapEntry.java;fp=org.argeo.cms%2Fsrc%2Forg%2Fargeo%2Fcms%2Fdirectory%2Fldap%2FDefaultLdapEntry.java;h=f919fa6c843050d7a8564d133e91c3e91173c7db;hp=94e0ac46def207abecdfeb66743cbc77e45002c2;hb=b95462873703848193e56fcbe997693630db6121;hpb=55d88fba80cec198a0f11ba7545e19878c51fc5e diff --git a/org.argeo.cms/src/org/argeo/cms/directory/ldap/DefaultLdapEntry.java b/org.argeo.cms/src/org/argeo/cms/directory/ldap/DefaultLdapEntry.java index 94e0ac46d..f919fa6c8 100644 --- a/org.argeo.cms/src/org/argeo/cms/directory/ldap/DefaultLdapEntry.java +++ b/org.argeo.cms/src/org/argeo/cms/directory/ldap/DefaultLdapEntry.java @@ -22,6 +22,7 @@ import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttribute; import javax.naming.ldap.LdapName; +import org.argeo.api.acr.QNamed; import org.argeo.api.acr.ldap.LdapAttr; import org.argeo.api.acr.ldap.LdapObj; import org.argeo.api.cms.directory.DirectoryDigestUtils; @@ -125,9 +126,9 @@ public class DefaultLdapEntry implements LdapEntry { // modifiedAttributes = (Attributes) publishedAttributes.clone(); } - public synchronized void publishAttributes(Attributes modifiedAttributes) { -// publishedAttributes = modifiedAttributes; - } +// public synchronized void publishAttributes(Attributes modifiedAttributes) { +//// publishedAttributes = modifiedAttributes; +// } /* * PROPERTIES @@ -145,6 +146,17 @@ public class DefaultLdapEntry implements LdapEntry { return credentials; } + protected String getPropertyAsString(QNamed key) { + return getPropertyAsString(key.localName()); + } + + protected String getPropertyAsString(String key) { + Object res = getProperties().get(key); + if (res == null) + return null; + return res.toString(); + } + /* * CREDENTIALS */