import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.net.URI;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.HashSet;
import java.util.SortedMap;
import java.util.TreeMap;
+import javax.naming.NameNotFoundException;
import javax.naming.NamingEnumeration;
import javax.naming.directory.Attributes;
import javax.naming.ldap.LdapName;
}
public LdifUserAdmin(Dictionary<String, ?> properties) {
- super(properties);
+ super(null, properties);
}
+ public LdifUserAdmin(URI uri, Dictionary<String, ?> properties) {
+ super(uri, properties);
+ }
+
+ @Deprecated
public LdifUserAdmin(InputStream in) {
- super(new Hashtable<String, Object>());
+ super(null, new Hashtable<String, Object>());
load(in);
}
groups = null;
}
- protected DirectoryUser daoGetRole(LdapName key) {
+ @Override
+ protected DirectoryUser daoGetRole(LdapName key) throws NameNotFoundException {
if (groups.containsKey(key))
return groups.get(key);
if (users.containsKey(key))
return users.get(key);
- return null;
+ throw new NameNotFoundException(key + " not persisted");
}
+ @Override
protected Boolean daoHasRole(LdapName dn) {
return users.containsKey(dn) || groups.containsKey(dn);
}