X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.util%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fuseradmin%2FUserDirectory.java;h=18bb1a0a6eb6987e08c11c34633362f8aa2e7e57;hb=eb4324be6ac9cdff15828a21ee7d3f6ca2f19fb9;hp=ff80c5ac8385bf4aacac7699102754004cbdb6a6;hpb=9f729eeb8255a9d800ad2506735dda8cc215a135;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.util/src/org/argeo/osgi/useradmin/UserDirectory.java b/org.argeo.util/src/org/argeo/osgi/useradmin/UserDirectory.java index ff80c5ac8..18bb1a0a6 100644 --- a/org.argeo.util/src/org/argeo/osgi/useradmin/UserDirectory.java +++ b/org.argeo.util/src/org/argeo/osgi/useradmin/UserDirectory.java @@ -1,15 +1,25 @@ package org.argeo.osgi.useradmin; -import javax.naming.ldap.LdapName; -import javax.transaction.xa.XAResource; +import java.util.Optional; + +import org.argeo.osgi.transaction.WorkControl; +import org.osgi.service.useradmin.Role; /** Information about a user directory. */ public interface UserDirectory { - /** The base DN of all entries in this user directory */ - LdapName getBaseDn(); + /** + * The base of the hierarchy defined by this directory. This could typically be + * an LDAP base DN. + */ + String getContext(); + + String getName(); + +// /** The base DN of all entries in this user directory */ +// LdapName getBaseDn(); - /** The related {@link XAResource} */ - XAResource getXaResource(); +// /** The related {@link XAResource} */ +// XAResource getXaResource(); boolean isReadOnly(); @@ -17,9 +27,26 @@ public interface UserDirectory { String getUserObjectClass(); - String getUserBase(); +// String getUserBase(); String getGroupObjectClass(); - String getGroupBase(); +// String getGroupBase(); + + Optional getRealm(); + + Iterable getDirectHierarchyUnits(boolean functionalOnly); + + 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); }