Package com.sap.security.um.user
Interface User
- All Superinterfaces:
Principal
This interface provides read access to user data and is an extension of
Principal
.-
Method Summary
Modifier and TypeMethodDescriptioncheckPassword
(char[] password) Deprecated.getAttribute
(String attributeName) Returns the value of the provided attribute.String[]
getAttributeValues
(String attributeName) Returns an array of values for an attribute.Returns the groups in which the user is included.Returns the locale of the user ornull
, if no locale is maintained for the user.getRoles()
Returns a set of roles assigned to the user.boolean
Returns whether the user is assigned to the role with the provided name.boolean
Returns the user's validity at the specified point in time.Returns a set of system-specific aliases of all attributes of this user.
-
Method Details
-
checkPassword
Deprecated.As of version 1.8, replaced byUserProvider.checkUserPassword(String, char[])
- Throws:
PersistenceException
-
getAttribute
Returns the value of the provided attribute. If the attribute does not exist or no value is maintained,null
is returned.- Parameters:
attributeName
- The system-specific alias of the attribute to read.- Returns:
- The value of the attribute or
null
. - Throws:
UnsupportedUserAttributeException
- If the method is called with the attribute name which is not supported by the user store.
-
listAttributes
Returns a set of system-specific aliases of all attributes of this user.- Returns:
- A set of attributes of this user.
-
getLocale
Locale getLocale()Returns the locale of the user ornull
, if no locale is maintained for the user.- Returns:
- The locale or
null
.
-
hasRole
Returns whether the user is assigned to the role with the provided name. The result does not depend on the existence of the role with the specified role name. So this method might return true, if the role is already deleted, but the user is still assigned.- Parameters:
roleName
- The name of the role to check.- Returns:
True
if the user is assigned to the role, otherwisefalse
.
-
isValid
Returns the user's validity at the specified point in time. This method is usually used with the current time to check whether the user is allowed to access the system.- Parameters:
date
- The date for which the validity should be checked.- Returns:
True
if the user is valid on the specified point in time, otherwisefalse
.
-
getRoles
Returns a set of roles assigned to the user.- Returns:
- A set of roles assigned to the user.
-
getAttributeValues
Returns an array of values for an attribute. If it does not exist or no value is maintained,null
is returned.- Parameters:
attributeName
- The alias of the attribute to read.- Returns:
- The value of the attribute or
null
.
-
getGroups
Returns the groups in which the user is included.
-
UserProvider.checkUserPassword(String, char[])