|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.security.impl.CRXUserManager
public class CRXUserManager
UserManager Implemenation that provides CRX's Authorizables
UserManager| Nested Class Summary | |
|---|---|
class |
CRXUserManager.EveryOne
|
| Field Summary |
|---|
| Fields inherited from interface com.day.cq.security.UserManager |
|---|
TYPE_GROUP, TYPE_USER |
| Method Summary | ||
|---|---|---|
void |
addModificationListener(AuthorizableListener listener)
|
|
protected Authorizable |
build(com.day.crx.security.Covenantee covenantee)
Helper to convert the CRX's Covenantee into a CQ
Authorizable |
|
Group |
createGroup(String groupId,
String principalName)
Creates a new Group for the given name and Principal-Name |
|
User |
createUser(String userId,
String password,
String principalName)
Creates a new User for given Id, password and PrincipalName. |
|
Authorizable |
find(Principal principal)
Searches for an Authorizable for the given Principal. |
|
|
find(String query,
Class<AuthType> type)
allways conduct a starts-with search Search for Authorizables that contain the given Query. |
|
Iterator<Authorizable> |
find(String propertyName,
String substring)
Searches among CRX's Authorizables for a given Property. |
|
Iterator<Authorizable> |
find(String propertyName,
String query,
int type)
|
|
Authorizable |
findByHome(String homePath)
Searches an Authorizable which has the given path as Path of it's Home Path property. |
|
Authorizable |
get(String id)
Accesses an Authorizable by its ID. |
|
Iterator<Group> |
getGroups()
|
|
Iterator<User> |
getUsers()
|
|
boolean |
hasAuthorizable(String id)
This method tests if the Manager has any Authorizable with this given ID. If this method evaluates to true a call to
get(id) has to return a non-null
Authorizable |
|
void |
removeModificationListener(AuthorizableListener listener)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public boolean hasAuthorizable(String id)
true a call to
get(id) has to return a non-null
Authorizable
hasAuthorizable in interface UserManagerid - to be probed
UserManager.get(String)
public Authorizable get(String id)
throws NoSuchAuthorizableException
ID.
if an Authorizable exists a test with
hasAuthorizable(id) has to be true.
get in interface UserManagerid - of the Authorizable requested
NoSuchAuthorizableException - in case no Authorizable for that ID existspublic Authorizable find(Principal principal)
find in interface UserManagerprincipal - the Authorizable should contain
null if none foundAuthorizable.getPrincipal()public Iterator<User> getUsers()
getUsers in interface UserManagerpublic Iterator<Group> getGroups()
getGroups in interface UserManager
public Iterator<Authorizable> find(String propertyName,
String substring)
find in interface UserManagerpropertyName - to search for, currently ignoredsubstring - value queried
UserManager.find(String, String)
public Iterator<Authorizable> find(String propertyName,
String query,
int type)
public User createUser(String userId,
String password,
String principalName)
throws AuthorizableExistsException,
AccessDeniedException
createUser in interface UserManageruserId - Id for the Userpassword - plain password, implementations may encryptprincipalName - principalName to be used when authenticated
AuthorizableExistsException - in case the ID is already in use
AccessDeniedException - in case the requesting session is not allowed to create a User
public Group createGroup(String groupId,
String principalName)
throws AuthorizableExistsException,
AccessDeniedException
createGroup in interface UserManagergroupId - to be assigned to the new GroupprincipalName - for the new Group
AuthorizableExistsException - if the id is already in use
AccessDeniedException - in case the requesting session is not allowed to create a Grouppublic Authorizable findByHome(String homePath)
findByHomepath(homePath).getHomePath().equals(homePath)
findByHome in interface UserManagerhomePath - path of the Authorizable's Home
nullAuthorizable.getHomePath()protected Authorizable build(com.day.crx.security.Covenantee covenantee)
Covenantee into a CQ
Authorizable
covenantee - to convert
public void addModificationListener(AuthorizableListener listener)
addModificationListener in interface UserManagerpublic void removeModificationListener(AuthorizableListener listener)
removeModificationListener in interface UserManager
public <AuthType extends Authorizable> RangeIterator<AuthType> find(String query,
Class<AuthType> type)
Authorizables that contain the given Query.
Searches typical ID-Properties, like authorizable ID,
principal name.
find in interface UserManagerquery - token to findtype - Class of Authorizable to take Authorizable to search for any kind
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||