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;
@Override
public LdapName getDn() {
- return dn;
+ // always return a copy since LdapName is mutable
+ return (LdapName) dn.clone();
}
public synchronized Attributes getAttributes() {
// modifiedAttributes = (Attributes) publishedAttributes.clone();
}
- public synchronized void publishAttributes(Attributes modifiedAttributes) {
-// publishedAttributes = modifiedAttributes;
- }
+// public synchronized void publishAttributes(Attributes modifiedAttributes) {
+//// publishedAttributes = modifiedAttributes;
+// }
/*
* PROPERTIES
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
*/