public interface UserProperties
UserProperties is a general interface used to represent user preferences and profiles. It provides convenience methods to retrieve properties in various formats.
In addition this interface allows to access the underlying JCR Node used
to write or modify this UserProperties, version or lock it
as well as to register observation event listeners.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ABOUT_ME
Constant for the property containing a description of an authorizable.
|
static java.lang.String |
DISPLAY_NAME
Constant for the display name (or nick name) property of a given user
or group.
|
static java.lang.String |
EMAIL
Constant for the email property of an authorizable.
|
static java.lang.String |
FAMILY_NAME
Constant for the family name of a given user.
|
static java.lang.String |
GIVEN_NAME
Constant for the given name of a given user or group.
|
static java.lang.String |
MIDDLE_NAME
Constant for the middle name property of a user.
|
static java.lang.String |
PHOTOS
Constant for the user property storing images of a user.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAuthorizableID()
Returns the ID of the authorizable this user properties belong to.
|
java.lang.String |
getAuthorizablePath()
Returns the authorizables path
|
java.lang.String |
getDisplayName()
Calculate a display name from this
UserProperties instance. |
java.lang.String |
getDisplayName(java.lang.String nameDisplayOrder)
Calculate a display name from this
UserProperties instance. |
Node |
getNode()
Returns the JCR
node associated with this user properties
instance. |
java.lang.String |
getProperty(java.lang.String relativePath)
Returns the string value of the property identified by the specified
relativePath. |
<T> T |
getProperty(java.lang.String relativePath,
T defaultValue,
java.lang.Class<T> type)
Returns the property at the specified relative path.
|
java.lang.String[] |
getPropertyNames()
Retrieves the property names directly available with this instance.
|
java.lang.String[] |
getPropertyNames(java.lang.String relPath)
Retrieves the property names available at the specified relative path.
|
Resource |
getResource(java.lang.String relativePath)
Retrieve the resource at the specified path relative to this instance.
|
java.lang.String |
getResourcePath(java.lang.String relativePath,
java.lang.String suffix,
java.lang.String defaultPath)
Calculates the resource path for the property located the specified
relativePath using the given suffix. |
java.util.Iterator<Resource> |
getResources(java.lang.String relativePath)
Retrieve the resources at the specified path relative to this instance.
|
boolean |
isGroupProperties()
Checks if the authorizable of this properties is a group.
|
static final java.lang.String ABOUT_ME
static final java.lang.String EMAIL
static final java.lang.String FAMILY_NAME
static final java.lang.String GIVEN_NAME
static final java.lang.String MIDDLE_NAME
static final java.lang.String DISPLAY_NAME
getDisplayName() for a implementation
specific calculation of a display name that may rely on or fallback to
various name related properties.static final java.lang.String PHOTOS
java.lang.String getAuthorizableID()
java.lang.String getAuthorizablePath()
Node getNode()
node associated with this user properties
instance. The node may then be used to write properties or execute other
JCR specific operations on this user properties that are not covered by
convenience methods defined by this interface.node associated with this user properties instance.java.lang.String[] getPropertyNames()
throws RepositoryException
getPropertyNames(String) where the relative
path is null.RepositoryException - If an error occurs.java.lang.String[] getPropertyNames(java.lang.String relPath)
throws RepositoryException
relPath - A relative path to the sub tree where to retrieve the
property names.RepositoryException - If an error occurs.java.lang.String getProperty(java.lang.String relativePath)
throws RepositoryException
Returns the string value of the property identified by the specified
relativePath. This may be a simple property name in case
of getPropertyNames() or the relative path to the property
in case of getPropertyNames(String).
Note that this method is a simplified variant of
getProperty(String, Object, Class) where the default value is
null and the desired type String.
relativePath - Relative path referring to the property to
be retrieved.null.RepositoryException - If an error occurs.<T> T getProperty(java.lang.String relativePath,
T defaultValue,
java.lang.Class<T> type)
throws RepositoryException
relativePath the specified
defaultValue is returned.T - specifies the expected format of the propertyrelativePath - Relative path referring to the property to
be retrieved.defaultValue - The default value to be used if the property at
relativePath does not exist.type - The expected value type. The property value may need to
be converted.type or the defaultValue if the property does
not exist or cannot be converted to the specified type.RepositoryException - If an error occurs.Resource getResource(java.lang.String relativePath) throws RepositoryException
relativePath - Relative path to the resource to be retrieved.null
if the the path cannot be resolved to a resource.RepositoryException - If an error occurs.java.util.Iterator<Resource> getResources(java.lang.String relativePath) throws RepositoryException
relativePath - Relative path to the resources to be retrieved.null
if the the path cannot be resolved to resources.RepositoryException - If an error occurs.java.lang.String getResourcePath(java.lang.String relativePath,
java.lang.String suffix,
java.lang.String defaultPath)
throws RepositoryException
relativePath using the given suffix. If the
property does not exist the specified defaultPath is returned.relativePath - Relative path to the property for which the resource
path will be calculated.suffix - An optional suffix to be appended to the resource path.defaultPath - An optional default path in case the requested
property does not exist (or is not accessible).RepositoryException - If an error occurs.java.lang.String getDisplayName()
throws RepositoryException
UserProperties instance.RepositoryException - If an error occurs.java.lang.String getDisplayName(java.lang.String nameDisplayOrder)
throws RepositoryException
UserProperties instance.nameDisplayOrder - Order of given, middle and family names.
Western name order should be "givenName middleName familyName",
Eastern name order should be "familyName givenName middleName".RepositoryException - If an error occurs.boolean isGroupProperties()
true if this properties belongs to a group."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"