Package com.adobe.granite.security.user
Class UserPropertiesService
- java.lang.Object
-
- com.adobe.granite.security.user.UserPropertiesService
-
public abstract class UserPropertiesService extends java.lang.Object
UserPropertiesService
...
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_NODETYPE
static java.lang.String[]
DEFAULT_PROFILES
Constant array of the available default user profiles in descending ranking order.static java.lang.String
PREFERENCES_PATH
static java.lang.String
PRIVATE_PROFILE
Constant for the private profile root of a given user.static java.lang.String
PROFILE_PATH
Deprecated.usePRIVATE_PROFILE
instead.static java.lang.String
PROFILE_RESOURCE_TYPE
Constant for the profile resource type.static java.lang.String
PROFILES_ROOT
Constant for the profiles root of a given user.static java.lang.String
PUBLIC_PROFILE
Constant for the default public profile root of a given user.
-
Constructor Summary
Constructors Constructor Description UserPropertiesService()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract UserPropertiesManager
createUserPropertiesManager(Session session, ResourceResolver resolver)
Create a new instance ofUserPropertiesManager
for the specifiedsession
andresolver
.abstract UserPropertiesManager
createUserPropertiesManager(ResourceResolver resolver)
Create a new instance ofUserPropertiesManager
for the specifiedresolver
.abstract java.lang.String
getAuthorizableId(java.lang.String userPropertiesPath)
Retrieves the authorizableID corresponding to the given absolute path pointing to an user properties node.abstract java.lang.String
getAuthorizablePath(java.lang.String authorizableId)
Retrieves the path to the authorizable node that is identified by the specifiedauthorizableId
.abstract java.lang.String
getNodeType(java.lang.String userPropertiesName)
Retrieve the node type for the user properties with the given name.abstract java.lang.String
getResourceType(java.lang.String userPropertiesName)
Retrieve the resource type for the user properties with the specified name.
-
-
-
Field Detail
-
PREFERENCES_PATH
public static final java.lang.String PREFERENCES_PATH
- See Also:
- Constant Field Values
-
PROFILES_ROOT
public static final java.lang.String PROFILES_ROOT
Constant for the profiles root of a given user.- See Also:
- Constant Field Values
-
PRIVATE_PROFILE
public static final java.lang.String PRIVATE_PROFILE
Constant for the private profile root of a given user.- See Also:
- Constant Field Values
-
PUBLIC_PROFILE
public static final java.lang.String PUBLIC_PROFILE
Constant for the default public profile root of a given user.- See Also:
- Constant Field Values
-
DEFAULT_PROFILES
public static final java.lang.String[] DEFAULT_PROFILES
Constant array of the available default user profiles in descending ranking order.
-
PROFILE_RESOURCE_TYPE
public static final java.lang.String PROFILE_RESOURCE_TYPE
Constant for the profile resource type.- See Also:
- Constant Field Values
-
PROFILE_PATH
public static final java.lang.String PROFILE_PATH
Deprecated.usePRIVATE_PROFILE
instead.Constant for the (previous) private profile of a given user.- See Also:
- Constant Field Values
-
DEFAULT_NODETYPE
public static final java.lang.String DEFAULT_NODETYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createUserPropertiesManager
public abstract UserPropertiesManager createUserPropertiesManager(ResourceResolver resolver) throws RepositoryException
Create a new instance ofUserPropertiesManager
for the specifiedresolver
.- Parameters:
resolver
- The associated resource resolver.- Returns:
- a new instance of
UserPropertiesManager
. - Throws:
RepositoryException
- If an error occurs.
-
createUserPropertiesManager
public abstract UserPropertiesManager createUserPropertiesManager(Session session, ResourceResolver resolver) throws RepositoryException
Create a new instance ofUserPropertiesManager
for the specifiedsession
andresolver
.- Parameters:
session
- The editing session.resolver
- The associated resource resolver.- Returns:
- a new instance of
UserPropertiesManager
. - Throws:
RepositoryException
- If an error occurs.
-
getResourceType
public abstract java.lang.String getResourceType(java.lang.String userPropertiesName)
Retrieve the resource type for the user properties with the specified name. The resource types are part of the service configuration.- Parameters:
userPropertiesName
- Relative path to the user properties for which the resource type should be returned.- Returns:
- resource type for the user properties with the specified name or
null
.
-
getNodeType
public abstract java.lang.String getNodeType(java.lang.String userPropertiesName)
Retrieve the node type for the user properties with the given name. Note, that the node types are part of the service configuration.- Parameters:
userPropertiesName
- Relative path to the user properties for which the node type type should be returned.- Returns:
- node type for the user properties with the specified name or
DEFAULT_NODETYPE
.
-
getAuthorizablePath
public abstract java.lang.String getAuthorizablePath(java.lang.String authorizableId) throws RepositoryException
Retrieves the path to the authorizable node that is identified by the specifiedauthorizableId
.- Parameters:
authorizableId
- The ID of the authorizable.- Returns:
- ?The path of the authorizable or
null
. - Throws:
RepositoryException
- If an error occurs.
-
getAuthorizableId
public abstract java.lang.String getAuthorizableId(java.lang.String userPropertiesPath) throws RepositoryException
Retrieves the authorizableID corresponding to the given absolute path pointing to an user properties node.- Parameters:
userPropertiesPath
- Absolute path to user properties node.- Returns:
- The ID of the corresponding authorizable or
null
. - Throws:
RepositoryException
- If an error occurs.
-
-