public interface UserDirectory
CompoundName
. Sites must be able to parse the user id
based on the configuration settings in properties files. Implementation classes
should implement at least a public constructor that has a single
ICS
argument. This ICS object should only be
used for configuration of the class and should NOT store this object for continued use.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPERATOR_AND
It is used to search the list of users that have all the matching criteria passed
|
static java.lang.String |
OPERATOR_OR
It is used to search the list of users that have 1 or more the matching criteria passed
|
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(java.lang.String username,
char[] password)
Try to authenticate the user with the supplied credentials.
|
void |
deleteSite(java.lang.String site)
Notification method that is invoked when Sites deletes a site.
|
void |
flushCache()
Invoked when Sites believes that caches need to be flushed.
|
java.lang.String |
getACLsFromId(java.lang.String id)
Retrieve the list of ACLs for the user.
|
java.lang.String |
getIdFromUsername(java.lang.String username)
Get the sole unique ID for this user identified by the username.
|
java.util.List<java.lang.String> |
listUsers(javax.naming.directory.Attributes matchingAttributes,
java.lang.String operator)
Return all the users based on the criteria
|
void |
readUser(UserFactory factory,
java.lang.String id)
Return a user from the user directory.
|
void |
readUsers(UserFactory factory,
java.lang.String[] id)
Return multiple users from the user directory.
|
void |
readUsers(UserFactory factory,
java.lang.String role,
java.lang.String... sites)
Return the users that have the listed roles in the provided site.
|
static final java.lang.String OPERATOR_AND
static final java.lang.String OPERATOR_OR
boolean authenticate(java.lang.String username, char[] password) throws java.lang.Exception
username
- username for authenticationpassword
- password for authenticationjava.lang.Exception
- when an error other than incorrect credentials occurs.java.lang.String getIdFromUsername(java.lang.String username) throws java.lang.Exception
username
- usernamejava.lang.Exception
java.lang.String getACLsFromId(java.lang.String id) throws java.lang.Exception
id
- user idjava.lang.Exception
void readUser(UserFactory factory, java.lang.String id) throws java.lang.Exception
factory
- to create and populate the userid
- user idjava.lang.Exception
void readUsers(UserFactory factory, java.lang.String role, java.lang.String... sites) throws java.lang.Exception
factory
- to create and populate the userrole
- the role to search for, can be null meaning all roles.sites
- the sites to restrict the search to.java.lang.Exception
void readUsers(UserFactory factory, java.lang.String[] id) throws java.lang.Exception
factory
- to create and populate the userid
- an array of user idsjava.lang.Exception
void deleteSite(java.lang.String site) throws java.lang.Exception
site
- site namejava.lang.Exception
void flushCache() throws java.lang.Exception
java.lang.Exception
java.util.List<java.lang.String> listUsers(javax.naming.directory.Attributes matchingAttributes, java.lang.String operator) throws java.lang.Exception
matchingAttributes
- list of javax.naming.directory.Attribtuesoperator
- Determines if the matching entries must contain all (UserDirectory.OPERATOR_AND) or
one or more (UserDirectory.OPERATOR_OR) of the specified attribute/value pairs.java.lang.Exception