Simplify hierarchy units
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / osgi / useradmin / UserDirectory.java
index 781b7855a34c08b973d49fd0be9273b7d07cddc4..3800b75489f92418120e26a2074a757f31f10342 100644 (file)
@@ -6,12 +6,14 @@ import org.argeo.osgi.transaction.WorkControl;
 import org.osgi.service.useradmin.Role;
 
 /** Information about a user directory. */
-public interface UserDirectory extends HierarchyUnit {
+public interface UserDirectory {
        /**
         * The base of the hierarchy defined by this directory. This could typically be
         * an LDAP base DN.
         */
-       String getBasePath();
+       String getGlobalId();
+       
+       String getName();
 
 //     /** The base DN of all entries in this user directory */
 //     LdapName getBaseDn();
@@ -33,10 +35,18 @@ public interface UserDirectory extends HierarchyUnit {
 
        Optional<String> getRealm();
 
+       Iterable<HierarchyUnit> getRootHierarchyUnits();
+
        HierarchyUnit getHierarchyUnit(String path);
 
        HierarchyUnit getHierarchyUnit(Role role);
 
+       String getRolePath(Role role);
+
+       String getRoleSimpleName(Role role);
+
+       Role getRoleByPath(String path);
+
        @Deprecated
        void setTransactionControl(WorkControl transactionControl);
 }