Multiple user referentials working with IPA.
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / osgi / useradmin / UserDirectory.java
index 7d773a9e72283aed73fabe695314e1cd2da12a4f..05ed7cf7cef9260324307d66f6cac55c03cd5699 100644 (file)
@@ -1,37 +1,19 @@
 package org.argeo.osgi.useradmin;
 
-import java.util.Optional;
-
-import org.argeo.osgi.transaction.WorkControl;
+import org.argeo.util.directory.Directory;
+import org.argeo.util.directory.HierarchyUnit;
+import org.osgi.service.useradmin.Role;
 
 /** Information about a user directory. */
-public interface UserDirectory {
-       /**
-        * The base of the hierarchy defined by this directory. This could typically be
-        * an LDAP base DN.
-        */
-       String getBasePath();
-
-//     /** The base DN of all entries in this user directory */
-//     LdapName getBaseDn();
-
-//     /** The related {@link XAResource} */
-//     XAResource getXaResource();
-
-       boolean isReadOnly();
-
-       boolean isDisabled();
-
-       String getUserObjectClass();
+public interface UserDirectory extends Directory {
 
-       String getUserBase();
+       HierarchyUnit getHierarchyUnit(Role role);
 
-       String getGroupObjectClass();
+       Iterable<? extends Role> getHierarchyUnitRoles(HierarchyUnit hierarchyUnit, String filter, boolean deep);
 
-       String getGroupBase();
+       String getRolePath(Role role);
 
-       Optional<String> getRealm();
+       String getRoleSimpleName(Role role);
 
-       @Deprecated
-       void setTransactionControl(WorkControl transactionControl);
+       Role getRoleByPath(String path);
 }