Package com.day.cq.security
Interface UserManager
public interface UserManager
Deprecated.
cq 5.5 Use org.apache.jackrabbit.api.security.user.UserManager instead.
UserManager allows access to Users and Groups.
These are the Objects that act on
Basic search and creation means are provided.
The UserManager for a
Resources.
They are referred to by the common super-class 'Authorizable'.
Basic search and creation means are provided.
The UserManager for a
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.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.static final intDeprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleanautoSave(boolean enable) Deprecated.Changes the auto save behavior of thisUserManager.createGroup(String groupId, String principalName) Deprecated.Creates a new Group for the given name and Principal-NamecreateGroup(String groupId, String principalName, String intermediatePath) Deprecated.Creates a new Group for the given name and Principal-NamecreateUser(String userId, String password, String principalName) Deprecated.Creates a new User for given Id, password and PrincipalName.createUser(String userId, String password, String principalName, String intermediatePath) Deprecated.Creates a new User for given Id, password and PrincipalName.<AuthType extends Authorizable>
RangeIterator<AuthType> Deprecated.Search forAuthorizablesthat contain the given Query.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.Deprecated.Searches for an Authorizable for the given Principal.findByHome(String homePath) Deprecated.Searches an Authorizable which has the given path as Path of it's Home Path property.Deprecated.Accesses an Authorizable by itsID.Deprecated.getUsers()Deprecated.booleanDeprecated.This method tests if the Manager has any Authorizable with this given ID.
If this method evaluates totruea call toget(id)has to return a non-nullAuthorizablebooleanDeprecated.If any write operations executed through the User API are automatically persisted this method returnstrue.
-
Field Details
-
TYPE_USER
static final int TYPE_USERDeprecated.- See Also:
-
TYPE_GROUP
static final int TYPE_GROUPDeprecated.- See Also:
-
-
Method Details
-
hasAuthorizable
Deprecated.This method tests if the Manager has any Authorizable with this given ID.
If this method evaluates totruea call toget(id)has to return a non-nullAuthorizable- Parameters:
id- to be probed- Returns:
- true if an Authorizable with the given id exists
- See Also:
-
get
Deprecated.Accesses an Authorizable by itsID. if an Authorizable exists a test withhasAuthorizable(id)has to betrue.- Parameters:
id- of the Authorizable requested- Returns:
- the requests Authorizable
- Throws:
NoSuchAuthorizableException- in case no Authorizable for that ID exists
-
find
Deprecated.Searches for an Authorizable for the given Principal.- Parameters:
principal- the Authorizable should contain- Returns:
- the Authorizable or
nullif none found - See Also:
-
find
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. Property names of Property to be searched. The Authorizable defines default properties, implementations may extend these- Parameters:
propertyName- to be searched insubstring- to be found- Returns:
- Iterator of hits, empty if no Authorizable matches
-
getUsers
Deprecated.- Returns:
- all Users this Manager knows. Should be used with care, may be time-consuming
-
getGroups
Deprecated.- Returns:
- all Groups this Manager knows.Should be used with care, may be time-consuming
-
createUser
User createUser(String userId, String password, String principalName) throws AuthorizableExistsException, AccessDeniedException Deprecated.Creates a new User for given Id, password and PrincipalName.- Parameters:
userId- Id for the Userpassword- plain password, implementations may encryptprincipalName- principalName to be used when authenticated- Returns:
- the newly created User
- Throws:
AuthorizableExistsException- in case the ID is already in useAccessDeniedException- in case the requesting session is not allowed to create a User
-
createUser
User createUser(String userId, String password, String principalName, String intermediatePath) throws AuthorizableExistsException, AccessDeniedException Deprecated.Creates a new User for given Id, password and PrincipalName.- Parameters:
userId- Id for the Userpassword- plain password, implementations may encryptprincipalName- principalName to be used when authenticatedintermediatePath-- Returns:
- the newly created User
- Throws:
AuthorizableExistsException- in case the ID is already in useAccessDeniedException- in case the requesting session is not allowed to create a User
-
createGroup
Group createGroup(String groupId, String principalName) throws AuthorizableExistsException, AccessDeniedException Deprecated.Creates a new Group for the given name and Principal-Name- Parameters:
groupId- to be assigned to the new GroupprincipalName- for the new Group- Returns:
- newly created Group
- Throws:
AuthorizableExistsException- if the id is already in useAccessDeniedException- in case the requesting session is not allowed to create a Group
-
createGroup
Group createGroup(String groupId, String principalName, String intermediatePath) throws AuthorizableExistsException, AccessDeniedException Deprecated.Creates a new Group for the given name and Principal-Name- Parameters:
groupId- to be assigned to the new GroupprincipalName- for the new GroupintermediatePath-- Returns:
- newly created Group
- Throws:
AuthorizableExistsException- if the id is already in useAccessDeniedException- in case the requesting session is not allowed to create a Group
-
find
Deprecated.Search forAuthorizablesthat contain the given Query. Searches typical ID-Properties, likeauthorizable ID,principal name.- Parameters:
query- token to findtype- Class of Authorizable to take Authorizable to search for any kind- Returns:
- that match the query
-
findByHome
Deprecated.Searches an Authorizable which has the given path as Path of it's Home Path property. Thus thatfindByHomepath(homePath).getHomePath().equals(homePath)- Parameters:
homePath- path of the Authorizable's Home- Returns:
- the Authorizable or
null - See Also:
-
isAutoSave
boolean isAutoSave()Deprecated.If any write operations executed through the User API are automatically persisted this method returnstrue. In this case there are no pending transient changes left and there is no need to explicitly callSession.save(). If this method returnsfalseany changes must be completed by an extra save call on theSessionassociated with thisUserManager.- Returns:
trueif changes are automatically persisted;falseif changes made through this API (including method calls onAuthorizableand subclasses are only transient and must be persisted usingSession.save().- See Also:
-
autoSave
boolean autoSave(boolean enable) Deprecated.Changes the auto save behavior of thisUserManager.- Parameters:
enable- Iftruechanges made through this API will be automatically saved- Returns:
trueif the autoSave mode was successfully changed.
-