|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.identity2.ldap.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"
Field Summary | |
private LDAPConnectionContext |
connectionContext
|
private java.lang.String |
containerDN
DN of entry containing users (like ou=People,dc=example,dc=com). |
private static org.jboss.logging.Logger |
log
|
private java.lang.String |
uidAttributeID
Attribute that stores user id |
private UserProfileModule |
userProfileModule
|
Constructor Summary | |
LDAPUserModuleImpl()
|
Method Summary | |
User |
createUser(java.lang.String userName,
java.lang.String password,
java.lang.String realEmail)
Creates a new user with the specified name. |
protected LDAPUserImpl |
createUserInstance(javax.naming.directory.SearchResult sr)
|
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. |
LDAPConnectionContext |
getConnectionContext()
|
java.lang.String |
getContainerDN()
|
java.lang.String |
getUidAttributeID()
|
int |
getUserCount()
Returns the number of users. |
UserProfileModule |
getUserProfileModule()
|
void |
removeUser(java.lang.Object id)
Remove a user. |
void |
setConnectionContext(LDAPConnectionContext connectionContext)
|
void |
setContainerDN(java.lang.String containerDN)
|
void |
setUidAttributeID(java.lang.String uidAttributeID)
|
void |
setUserProfileModule(UserProfileModule userProfileModule)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final org.jboss.logging.Logger log
private LDAPConnectionContext connectionContext
private UserProfileModule userProfileModule
private java.lang.String uidAttributeID
private java.lang.String containerDN
Constructor Detail |
public LDAPUserModuleImpl()
Method Detail |
public User findUserByUserName(java.lang.String userName) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
findUserByUserName
in interface UserModule
userName
- the user name
IdentityException
java.lang.IllegalArgumentException
NoSuchUserException
public User findUserById(java.lang.Object id) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
findUserById
in interface 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
findUserById
in interface 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, java.lang.String realEmail) throws IdentityException, java.lang.IllegalArgumentException
UserModule
createUser
in interface UserModule
userName
-
IdentityException
java.lang.IllegalArgumentException
public void removeUser(java.lang.Object id) throws IdentityException, java.lang.IllegalArgumentException
UserModule
removeUser
in interface UserModule
id
- the user id
IdentityException
java.lang.IllegalArgumentException
public java.util.Set findUsers(int offset, int limit) throws IdentityException, java.lang.IllegalArgumentException
UserModule
findUsers
in interface 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
findUsersFilteredByUserName
in interface 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
getUserCount
in interface UserModule
IdentityException
java.lang.IllegalArgumentException
protected LDAPUserImpl createUserInstance(javax.naming.directory.SearchResult sr) throws IdentityException
IdentityException
public UserProfileModule getUserProfileModule()
public void setUserProfileModule(UserProfileModule userProfileModule)
public java.lang.String getUidAttributeID()
public void setUidAttributeID(java.lang.String uidAttributeID)
public LDAPConnectionContext getConnectionContext()
public void setConnectionContext(LDAPConnectionContext connectionContext)
public java.lang.String getContainerDN()
public void setContainerDN(java.lang.String containerDN)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |