|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UserManager
| Field Summary | |
|---|---|
static int |
SEARCH_TYPE_AUTHORIZABLE
Filter flag indicating that all Authorizables should be searched. |
static int |
SEARCH_TYPE_GROUP
Filter flag indicating that only Groups should be searched and returned. |
static int |
SEARCH_TYPE_USER
Filter flag indicating that only Users should be searched and returned. |
| Method Summary | |
|---|---|
void |
autoSave(boolean enable)
Changes the auto save behavior of this UserManager. |
Group |
createGroup(Principal principal)
Creates a new Group that is based on the given principal. |
Group |
createGroup(Principal principal,
String intermediatePath)
Creates a new Group that is based on the given principal and the specified
itermediatePath hint. |
User |
createUser(String userID,
String password)
Creates an User for the given userID / password pair; neither of the specified parameters can be null.Same as createUser(String,String,Principal,String) where the specified userID is equal to the principal
name and the intermediate path is null. |
User |
createUser(String userID,
String password,
Principal principal,
String intermediatePath)
Creates an User for the given parameters. |
Iterator<Authorizable> |
findAuthorizables(String propertyName,
String value)
Returns all Authorizables that have property with the given
name and that Property equals the given value. |
Iterator<Authorizable> |
findAuthorizables(String propertyName,
String value,
int searchType)
Returns all Authorizables that have property with the given
name and that Property equals the given value. |
Authorizable |
getAuthorizable(Principal principal)
Get the Authorizable by its main Principal. |
Authorizable |
getAuthorizable(String id)
Get the Authorizable by its id. |
JCRRegistry |
getRepository()
|
boolean |
isAutoSave()
If any write operations executed through the User API are automatically persisted this method returns true. |
void |
setRepository(JCRRegistry repository)
|
| Field Detail |
|---|
static final int SEARCH_TYPE_USER
Users should be searched and returned.
static final int SEARCH_TYPE_GROUP
Groups should be searched and returned.
static final int SEARCH_TYPE_AUTHORIZABLE
Authorizables should be searched.
| Method Detail |
|---|
Authorizable getAuthorizable(String id)
throws javax.jcr.RepositoryException
id - The user or group id.
null, if not present.
javax.jcr.RepositoryException - If an error occurs.Authorizable.getID()
Authorizable getAuthorizable(Principal principal)
throws javax.jcr.RepositoryException
principal -
null, if not present.
javax.jcr.RepositoryException - If an error occurs.
Iterator<Authorizable> findAuthorizables(String propertyName,
String value)
throws javax.jcr.RepositoryException
Authorizables that have property with the given
name and that Property equals the given value.
propertyName - value -
Authorizables that have a property with the given name exactly matching the given value.
javax.jcr.RepositoryException - If an error occurs.Authorizable.getProperty(String)
Iterator<Authorizable> findAuthorizables(String propertyName,
String value,
int searchType)
throws javax.jcr.RepositoryException
Authorizables that have property with the given
name and that Property equals the given value. In contrast to findAuthorizables(String, String) the type
of authorizable is respected while executing the search.
propertyName - value - searchType - Any of the following constants:
Authorizable.
javax.jcr.RepositoryException - If an error occurs.
User createUser(String userID,
String password)
throws AuthorizableExistsException,
javax.jcr.RepositoryException
null.createUser(String,String,Principal,String) where the specified userID is equal to the principal
name and the intermediate path is null.
userID - The id of the new user.password - The initial password of this user.
User.
AuthorizableExistsException - in case the given userID is already in use or another Authorizable with the same principal name
exists.
javax.jcr.RepositoryException - If another error occurs.
User createUser(String userID,
String password,
Principal principal,
String intermediatePath)
throws AuthorizableExistsException,
javax.jcr.RepositoryException
intermediatePath that parameter should be ignored. Except for the intermediatePath,
neither of the specified parameters can be null.
userID - password - principal - intermediatePath -
User.
AuthorizableExistsException - in case the given userID is already in use or another Authorizable with the same principal name
exists.
javax.jcr.RepositoryException - If the current Session is not allowed to create users or some another error occurs.
Group createGroup(Principal principal)
throws AuthorizableExistsException,
javax.jcr.RepositoryException
Group that is based on the given principal. Note that the group's ID is implementation
specific. The implementation may take the principal name as ID hint but must in any case assert that it is unique
among the IDs known to this manager.
principal - A non-null Principal
Group.
AuthorizableExistsException - in case the given principal is already in use with another Authorizable.
javax.jcr.RepositoryException - If another error occurs.
Group createGroup(Principal principal,
String intermediatePath)
throws AuthorizableExistsException,
javax.jcr.RepositoryException
Group that is based on the given principal and the specified
itermediatePath hint. If the implementation is not able to deal with the
itermediatePath this parameter should be ignored.
principal - intermediatePath -
Group.
AuthorizableExistsException - in case the given principal is already in use with another Authorizable.
javax.jcr.RepositoryException - If another error occurs.
boolean isAutoSave()
throws javax.jcr.RepositoryException
true. In this case there are no pending transient changes left and there is no need to explicitely
call Session.save(). If this method returns false any changes must be completed by
an extra save call on the Session associated with this UserManager.
true if changes are automatically persisted; false if changes made through this
API (including method calls on Authorizable and subclasses are only transient and must be
persisted using Session.save().
javax.jcr.RepositoryExceptionautoSave(boolean)
void autoSave(boolean enable)
throws javax.jcr.UnsupportedRepositoryOperationException,
javax.jcr.RepositoryException
UserManager.
Note, that this shouldn't be allowed in cases where the associated session is different from the original session
accessing the user manager.
enable - If true changes made through this API will be automatically saved; otherwise an explict
call to Session.save() is required in order to persist changes.
javax.jcr.UnsupportedRepositoryOperationException - If the implementation does not allow to change the auto save behavior.
javax.jcr.RepositoryException - If some other error occurs.void setRepository(JCRRegistry repository)
JCRRegistry getRepository()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||