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(java.lang.String groupId,
java.lang.String principalName)
Deprecated.
Creates a new Group for the given name and Principal-Name
|
Group |
createGroup(java.lang.String groupId,
java.lang.String principalName,
java.lang.String intermediatePath)
Deprecated.
Creates a new Group for the given name and Principal-Name
|
User |
createUser(java.lang.String userId,
java.lang.String password,
java.lang.String principalName)
Deprecated.
Creates a new User for given Id, password and PrincipalName.
|
User |
createUser(java.lang.String userId,
java.lang.String password,
java.lang.String principalName,
java.lang.String intermediatePath)
Deprecated.
Creates a new User for given Id, password and PrincipalName.
|
Authorizable |
find(java.security.Principal principal)
Deprecated.
Searches for an Authorizable for the given Principal.
|
<AuthType extends Authorizable> |
find(java.lang.String query,
java.lang.Class<AuthType> type)
Deprecated.
Search for
Authorizables that contain the given Query. |
java.util.Iterator<Authorizable> |
find(java.lang.String propertyName,
java.lang.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(java.lang.String homePath)
Deprecated.
Searches an Authorizable which has the given path as Path of it's
Home Path property.
|
Authorizable |
get(java.lang.String id)
Deprecated.
Accesses an Authorizable by its
ID . |
java.util.Iterator<Group> |
getGroups()
Deprecated.
|
java.util.Iterator<User> |
getUsers()
Deprecated.
|
boolean |
hasAuthorizable(java.lang.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(java.lang.String id)
true
a call to
get(id)
has to return a non-null
Authorizable
id
- to be probedget(String)
Authorizable get(java.lang.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(java.security.Principal principal)
principal
- the Authorizable should containnull
if none foundAuthorizable.getPrincipal()
java.util.Iterator<Authorizable> find(java.lang.String propertyName, java.lang.String substring)
propertyName
- to be searched insubstring
- to be foundjava.util.Iterator<User> getUsers()
java.util.Iterator<Group> getGroups()
User createUser(java.lang.String userId, java.lang.String password, java.lang.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 UserAccessDeniedException
User createUser(java.lang.String userId, java.lang.String password, java.lang.String principalName, java.lang.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 UserAccessDeniedException
Group createGroup(java.lang.String groupId, java.lang.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 GroupAccessDeniedException
Group createGroup(java.lang.String groupId, java.lang.String principalName, java.lang.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> <any> find(java.lang.String query, java.lang.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(java.lang.String homePath)
findByHomepath(homePath).getHomePath().equals(homePath)
homePath
- path of the Authorizable's Homenull
Authorizable.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 - 2020 Adobe Systems Incorporated. All Rights Reserved"