public interface UserManager
Resources.
They are referred to by the common super-class 'Authorizable'.
Session can be accessed
by use of UserManagerFactory
NOTE: This does not go to the osg.services.UserManger, as it is not existing
now...additionly to me its relation to Authentication outside Sling is not clear enough.Authorizable,
UserManagerFactory| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_GROUP
Deprecated.
|
static int |
TYPE_USER
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
autoSave(boolean enable)
Deprecated.
Changes the auto save behavior of this
UserManager. |
Group |
createGroup(String groupId,
String principalName)
Deprecated.
Creates a new Group for the given name and Principal-Name
|
Group |
createGroup(String groupId,
String principalName,
String intermediatePath)
Deprecated.
Creates a new Group for the given name and Principal-Name
|
User |
createUser(String userId,
String password,
String principalName)
Deprecated.
Creates a new User for given Id, password and PrincipalName.
|
User |
createUser(String userId,
String password,
String principalName,
String intermediatePath)
Deprecated.
Creates a new User for given Id, password and PrincipalName.
|
Authorizable |
find(Principal principal)
Deprecated.
Searches for an Authorizable for the given Principal.
|
<AuthType extends Authorizable> |
find(String query,
Class<AuthType> type)
Deprecated.
Search for
Authorizables that contain the given Query. |
Iterator<Authorizable> |
find(String propertyName,
String substring)
Deprecated.
Search for an Authorizable that contains the given query as a value
of the given property.
The value doesn't have to match exactly. |
Authorizable |
findByHome(String homePath)
Deprecated.
Searches an Authorizable which has the given path as Path of it's
Home Path property.
|
Authorizable |
get(String id)
Deprecated.
Accesses an Authorizable by its
ID. |
Iterator<Group> |
getGroups()
Deprecated.
|
Iterator<User> |
getUsers()
Deprecated.
|
boolean |
hasAuthorizable(String id)
Deprecated.
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 |
boolean |
isAutoSave()
Deprecated.
If any write operations executed through the User API are automatically
persisted this method returns
true. |
static final int TYPE_USER
static final int TYPE_GROUP
boolean hasAuthorizable(String id)
true a call to
get(id) has to return a non-null
Authorizableid - to be probedget(String)Authorizable get(String id) throws NoSuchAuthorizableException
ID.
if an Authorizable exists a test with
hasAuthorizable(id) has to be true.id - of the Authorizable requestedNoSuchAuthorizableException - in case no Authorizable for that ID existsAuthorizable find(Principal principal)
principal - the Authorizable should containnull if none foundAuthorizable.getPrincipal()Iterator<Authorizable> find(String propertyName, String substring)
propertyName - to be searched insubstring - to be foundIterator<User> getUsers()
Iterator<Group> getGroups()
User createUser(String userId, String password, String principalName) throws AuthorizableExistsException, AccessDeniedException
userId - Id for the Userpassword - plain password, implementations may encryptprincipalName - principalName to be used when authenticatedAuthorizableExistsException - in case the ID is already in usejavax.jcr.AccessDeniedException - in case the requesting session is not allowed to create a UserAccessDeniedExceptionUser createUser(String userId, String password, String principalName, String intermediatePath) throws AuthorizableExistsException, AccessDeniedException
userId - Id for the Userpassword - plain password, implementations may encryptprincipalName - principalName to be used when authenticatedintermediatePath - AuthorizableExistsException - in case the ID is already in usejavax.jcr.AccessDeniedException - in case the requesting session is not allowed to create a UserAccessDeniedExceptionGroup createGroup(String groupId, String principalName) throws AuthorizableExistsException, AccessDeniedException
groupId - to be assigned to the new GroupprincipalName - for the new GroupAuthorizableExistsException - if the id is already in usejavax.jcr.AccessDeniedException - in case the requesting session is not allowed to create a GroupAccessDeniedExceptionGroup createGroup(String groupId, String principalName, String intermediatePath) throws AuthorizableExistsException, AccessDeniedException
groupId - to be assigned to the new GroupprincipalName - for the new GroupintermediatePath - AuthorizableExistsException - if the id is already in usejavax.jcr.AccessDeniedException - in case the requesting session is not allowed to create a GroupAccessDeniedException<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.query - token to findtype - Class of Authorizable to take Authorizable to search for any kindAuthorizable findByHome(String homePath)
findByHomepath(homePath).getHomePath().equals(homePath)homePath - path of the Authorizable's HomenullAuthorizable.getHomePath()boolean isAutoSave()
true. In this case there are
no pending transient changes left and there is no need to explicitly call
javax.jcr.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 javax.jcr.Session#save().autoSave(boolean)boolean autoSave(boolean enable)
UserManager.enable - If true changes made through this API will
be automatically savedtrue if the autoSave mode was successfully changed."Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"