|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.portal.identity.service.IdentityModuleService
org.jboss.portal.identity.service.UserModuleService
org.jboss.portal.identity.ldap.LDAPUserModule
org.jboss.portal.identity.ldap.LDAPUserModuleImpl
public class LDAPUserModuleImpl
Simple implementation of UserModule for LDAP support. Search of users is limited to one place * containerField - DN of entry containing users (like ou=People,dc=example,dc=com). It's where users will be added using createUser() method. Under this DN users will be searched using ONELEVEL_SCOPE * uidAttributeID - attribute that stores user id. Default value is "uid"
Nested Class Summary | |
---|---|
protected class |
LDAPUserModuleImpl.UserEntryComparator
Comparator for users entries |
Field Summary |
---|
Fields inherited from class org.jboss.portal.identity.service.IdentityModuleService |
---|
moduleType |
Constructor Summary | |
---|---|
LDAPUserModuleImpl()
|
Method Summary | |
---|---|
User |
createUser(java.lang.String userName,
java.lang.String password)
Creates a new user with the specified name. |
User |
findUserById(java.lang.Object id)
Retrieve a user by its id. |
User |
findUserById(java.lang.String id)
Retrieve a user by its id. |
User |
findUserByUserName(java.lang.String userName)
Retrieve a user by its name. |
java.util.Set |
findUsers(int offset,
int limit)
Get a range of users. |
java.util.Set |
findUsersFilteredByUserName(java.lang.String filter,
int offset,
int limit)
Get a range of users. |
int |
getUserCount()
Returns the number of users. |
protected java.util.Set |
processUsers(java.util.Collection users)
|
void |
removeUser(java.lang.Object id)
Remove a user. |
java.util.List |
searchUsers(java.lang.String filter,
java.lang.Object[] filterArgs)
This method should be used by over modules to perform searches. |
Methods inherited from class org.jboss.portal.identity.ldap.LDAPUserModule |
---|
createUserInstance, findUserByDN, getAttributesToAdd, getConnectionContext, getContainerDN, getPasswordAttributeId, getPrincipalPreffix, getPrincipalSuffix, getSearchScope, getSearchTimeLimit, getUidAttributeID, getUserProfileModule, getUserSearchCtxDN, getUserSearchFilter, isAllowEmptyPasswords, isUserNameToLowerCase, setConnectionContext, start, updatePassword, validatePassword |
Methods inherited from class org.jboss.portal.identity.service.UserModuleService |
---|
fireUserCreatedEvent, fireUserDestroyedEvent |
Methods inherited from class org.jboss.portal.identity.service.IdentityModuleService |
---|
getConnectionJNDIName, getIdentityConfiguration, getIdentityContext, getIdentityEventBroadcaster, getInitOptions, getJndiBinder, getJNDIName, getModuleType, setConnectionJNDIName, setIdentityContext, setInitOptions, setJndiBinder, setJNDIName, setModuleType, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LDAPUserModuleImpl()
Method Detail |
---|
public User findUserByUserName(java.lang.String userName) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
userName
- the user name
IdentityException
java.lang.IllegalArgumentException
NoSuchUserException
public User findUserById(java.lang.Object id) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
id
- the user id
java.lang.IllegalArgumentException
- if the id is null
IdentityException
NoSuchUserException
public User findUserById(java.lang.String id) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
id
- the user id
java.lang.IllegalArgumentException
- if the id is null or not in the good format
IdentityException
NoSuchUserException
public User createUser(java.lang.String userName, java.lang.String password) throws IdentityException, java.lang.IllegalArgumentException
UserModule
IdentityException
java.lang.IllegalArgumentException
public void removeUser(java.lang.Object id) throws IdentityException, java.lang.IllegalArgumentException
UserModule
id
- the user id
IdentityException
java.lang.IllegalArgumentException
public java.util.Set findUsers(int offset, int limit) throws IdentityException, java.lang.IllegalArgumentException
UserModule
offset
- the offset of the first result to retrievelimit
- the maximum number of users to retrieve
IdentityException
java.lang.IllegalArgumentException
public java.util.Set findUsersFilteredByUserName(java.lang.String filter, int offset, int limit) throws IdentityException, java.lang.IllegalArgumentException
UserModule
filter
- a string filter applied to the user name.offset
- the offset of the frist result to retrievelimit
- the maximum number of users to retrieve
IdentityException
java.lang.IllegalArgumentException
public int getUserCount() throws IdentityException, java.lang.IllegalArgumentException
UserModule
IdentityException
java.lang.IllegalArgumentException
public java.util.List searchUsers(java.lang.String filter, java.lang.Object[] filterArgs) throws javax.naming.NamingException, IdentityException
searchUsers
in class LDAPUserModule
filter
- that will be concatenated with proper user search filter from the module
javax.naming.NamingException
IdentityException
protected java.util.Set processUsers(java.util.Collection users) throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |