|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 UserModuleuserName - the user name
IdentityException
java.lang.IllegalArgumentException
NoSuchUserExceptionpublic User findUserById(java.lang.Object id) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
findUserById in interface UserModuleid - the user id
java.lang.IllegalArgumentException - if the id is null
IdentityException
NoSuchUserExceptionpublic User findUserById(java.lang.String id) throws IdentityException, java.lang.IllegalArgumentException, NoSuchUserException
UserModule
findUserById in interface UserModuleid - the user id
java.lang.IllegalArgumentException - if the id is null or not in the good format
IdentityException
NoSuchUserExceptionpublic User createUser(java.lang.String userName, java.lang.String password, java.lang.String realEmail) throws IdentityException, java.lang.IllegalArgumentException
UserModule
createUser in interface UserModuleuserName -
IdentityException
java.lang.IllegalArgumentException
public void removeUser(java.lang.Object id)
throws IdentityException,
java.lang.IllegalArgumentException
UserModule
removeUser in interface UserModuleid - 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 UserModuleoffset - 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 UserModulefilter - 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 UserModuleIdentityException
java.lang.IllegalArgumentExceptionprotected LDAPUserImpl createUserInstance(javax.naming.directory.SearchResult sr) throws IdentityException
IdentityExceptionpublic 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 | |||||||||