|
SAP NetWeaver 7.4 (SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IUser
This interface provides read-access to the user's attributes, and offers basic support for
authorization checking. Implementations of this interface must make sure that all get-methods
with a return type of String, e.g. getFax() etc. return
null if that attribute either does not exist or has a null value in the
user store. This does NOT apply to the generic getAttribute...() methods.
If you want to keep and persist an identifier as a reference to an instance of IUser
you must use method IPrincipal.getUniqueID(). As this identifier contains internal
information and is usually not readable, it should not be used in end user interfaces.
Use methods IPrincipal.getDisplayName() or getUniqueName() in order to
display attributes with a nice name for user interfaces.
NOTE: As this interface�can be extended, this interface can be freely used, but must not be implemented.
SAP API Classification: | Field Summary | |
|---|---|
static int |
DEFAULT_ACCESSIBILITY_LEVEL
Constant used for user's default accessibility level |
static int |
SCREENREADER_ACCESSIBILITY_LEVEL
Constant used for user's screen reader support |
static String |
VERSIONSTRING
|
| Fields inherited from interface com.sap.security.api.IPrincipal |
|---|
BYTE_TYPE, CREATED_BY, DATASOURCE, DEFAULT_NAMESPACE, DEFAULT_RELATION_NAMESPACE, DESCRIPTION, DISPLAYNAME, LAST_MODIFIED_BY, PRINCIPAL_CREATION_DATE, PRINCIPAL_MODIFY_DATE, PRINCIPAL_RELATION_MEMBER_ATTRIBUTE, PRINCIPAL_RELATION_PARENT_ATTRIBUTE, STRING_TYPE, TRANSIENT_NAMESPACE, UNIQUE_NAME |
| Method Summary | |
|---|---|
void |
checkPermission(Permission permission)
If the user has the specified permission, this method does nothing. |
void |
checkPermission(String contextID,
Permission permission)
If the user has the specified permission in the given context, this method does
nothing. |
int |
getAccessibilityLevel()
Gets the user's accessibilityLevel used for Screen Reader Support |
String |
getCellPhone()
Gets the user's default cellphone number. |
String |
getCity()
Gets the user's city. |
String |
getCompany()
NOTE: Released for internal use only. |
String |
getCountry()
Gets the ISO-3166 two-letter uppercase code of the country where the user lives. |
String |
getCurrency()
Gets the three letter uppercase code of the user's currency, e.g. |
String |
getDepartment()
Gets the user's department. |
String |
getEmail()
Gets the user's default email address. |
String |
getFax()
Gets the user's default fax number. |
String |
getFirstName()
Gets the user's first name. |
com.sap.i18n.cpbase.I18nFormatterFactory |
getI18nFormatterFactory()
NOTE: Released for internal use only. |
String |
getJobTitle()
Gets the user's job title, e.g. |
String |
getLastName()
Gets the user's last name. |
Locale |
getLocale()
Gets the user's Locale; this determines e.g. the language in which text is displayed to the user's and the style that numbers are formated. |
Iterator |
getParentGroups(boolean recursive)
Gets the list of (all) parent groups including parents, grandparents, ... if recursive is set to true |
String |
getPersonID()
Returns the personID of the IUser or null. |
Iterator |
getRoles(boolean recursive)
Gets the list of (all) assigned roles of this user including parent groups, grandparent groups,... if recursive is set to true
NOTE: This method may also return roles which are already deleted. |
String |
getSalutation()
Gets the user's salutation, e.g. |
String |
getState()
Gets the user's state or region. |
String |
getStreet()
Gets the user's street. |
String |
getTelephone()
Gets the user's default telephone number. |
TimeZone |
getTimeZone()
Gets the user's time zone. |
String |
getTitle()
Gets the user's academic title or title of nobility |
Object |
getTransientAttribute(String namespace,
String name)
Generic get method to access additional transient attributes. |
String |
getUid()
Deprecated. new applications should use IPrincipal.getUniqueID(). |
String |
getUniqueName()
Get uniqueName of this IUser object. |
IUserAccount[] |
getUserAccounts()
Returns an array of useraccount objects which are assigned to this user. |
Iterator |
getUserAccountUniqueIDs()
Returns an iterator of String objects which represent the uniqueIDs of assigned IUserAccount objects |
IUserFactory |
getUserFactory()
Gets the user factory which instantiated this user object. |
String |
getZip()
Gets the zip code of the user's city. |
boolean |
hasPermission(Permission permission)
Returns true if the user has the given permission. |
boolean |
hasPermission(String contextID,
Permission permission)
Returns true if the user has the given permission in the given
context. |
boolean |
isCompanyUser()
Checks if this user belongs to a company. |
boolean |
isMemberOfGroup(String uniqueIdOfGroup,
boolean recursive)
Checks if the principal belongs to the passed uniqueIdOfGroup This method does a recursive search, so if this principal belongs to a group which is a member of this group, true is returned. |
boolean |
isMemberOfRole(String uniqueIdOfRole,
boolean recursive)
Checks if the principal belongs to the passed roleId This method does a recursive search if parameter recursive is set to true. |
boolean |
setTransientAttribute(String namespace,
String name,
Object o)
Generic method to associate arbitrary data with a principal. |
| Methods inherited from interface java.security.Principal |
|---|
equals, getName, hashCode, toString |
| Methods inherited from interface com.sap.security.api.IPrincipal |
|---|
created, equals, getAttribute, getAttributeNames, getAttributeNamespaces, getAttributeType, getBinaryAttribute, getDisplayName, getMessages, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, lastModified, refresh |
| Field Detail |
|---|
static final String VERSIONSTRING
static final int DEFAULT_ACCESSIBILITY_LEVEL
static final int SCREENREADER_ACCESSIBILITY_LEVEL
| Method Detail |
|---|
String getUid()
IPrincipal.getUniqueID().
String getJobTitle()
String getDepartment()
String getTitle()
String getSalutation()
String getFirstName()
String getLastName()
String getStreet()
String getCity()
String getZip()
String getState()
String getCountry()
getCountry() of the user's
Locale, since expatriate users may not have their Locale's country set to the country where
they actually reside.
Locale getLocale()
getCountry() instead of using the Locale's country.
null in case no locale is stored for this
IUser object.TimeZone getTimeZone()
null in case no timezone is stored
for this IUser object.
NOTE: Do not modify this TimeZone object. For performance reasons the TimeZone object is only created once when method getTimeZone() is called the first time. In case you modify this TimeZone object you may encounter inconsistencies because the user object has a different Timezone value set on the persistence layer.
String getCurrency()
String getTelephone()
String getCellPhone()
String getFax()
String getEmail()
boolean isCompanyUser()
true if user belongs to companyString getCompany()
IUserFactory getUserFactory()
boolean hasPermission(Permission permission)
true if the user has the given permission.
permission - Permission object which is checked
true if the user has the given permission.
void checkPermission(Permission permission)
throws AccessControlException
permission, this method does nothing. If not, it
will throw an AccessControlException, and possibly trigger appropriate logging
action.
permission - Permission object which is checked
AccessControlException - if the user doesn't have the specified permission
boolean hasPermission(String contextID,
Permission permission)
true if the user has the given permission in the given
context.
Note: The context specific permission check is no longer supported. It does the same as
hasPermission(java.security.Permission).
contextID - context for that the permission is checkedpermission - Permission object which is checked
true if the user has the given permission.
void checkPermission(String contextID,
Permission permission)
throws AccessControlException
permission in the given context, this method does
nothing. If not, it will throw an AccessControlException, and possibly trigger
appropriate logging action.
Note: The context specific permission check is no longer supported. It does the same as
checkPermission(java.security.Permission).
contextID - context for that the permission is checkedpermission - Permission object which is checked
AccessControlException - if the user doesn't have the specified permission
IUserAccount[] getUserAccounts()
throws UMException
UMException
Iterator getUserAccountUniqueIDs()
throws UMException
UMExceptionint getAccessibilityLevel()
DEFAULT_ACCESSIBILITY_LEVEL Following constants can
be returned: DEFAULT_ACCESSIBILITY_LEVEL
SCREENREADER_ACCESSIBILITY_LEVELIterator getRoles(boolean recursive)
true
NOTE: This method may also return roles which are already deleted.
recursive - if true returns all parent roles
Iterator getParentGroups(boolean recursive)
true
recursive - if true returns all parent groups
boolean isMemberOfRole(String uniqueIdOfRole,
boolean recursive)
recursive is set to true. If this user belongs to a group
which is a member of a role, true is returned.
uniqueIdOfRole - identifying the rolerecursive - if true checks also all parent groups
true if this user is directly or indirectly (via role membership)
assigned.
boolean isMemberOfGroup(String uniqueIdOfGroup,
boolean recursive)
uniqueIdOfGroup - the ID of the collection
String getUniqueName()
IUser object. A (usually) unique readable name of an
instance of IUser.
Note: Depending on the persistence layer it is not guaranteed that this name is
unique. The uniqueName may change over time. Thus, do not persist the uniqueName. Always use
the unique identifier of IPrincipal.getUniqueID() for this purpose.
Use the uniqueName for searching and displaying in user interfaces.
Object getTransientAttribute(String namespace,
String name)
null.
Note: the transient attributes are instance specific.
namespace - namespace the attribute is in (may be null)name - name of the attribute
null if this namespace or
attribute within this namespace does not exist
boolean setTransientAttribute(String namespace,
String name,
Object o)
true if values is different from the attribute's previous values,
false otherwise. These texts are tansient and will not be stored in the
persistence.
namespace - namespace of the attribute to set.name - name of the attributeo - value of the attribute
String getPersonID()
throws UMException
null.
UMException - if an error occurred.
com.sap.i18n.cpbase.I18nFormatterFactory getI18nFormatterFactory()
throws UMException
UMException - if an error occurred.| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] CORE-TOOLS
|
[sap.com]
|
default
|
BC-JAS
|
[sap.com] ENGFACADE
|
[sap.com] tc/je/usermanagement/api
|
api
|
BC-JAS-SEC
|
[sap.com] ENGINEAPI
|
[sap.com]
|
-
|
BC-JAS-SEC-UME
|
[sap.com] ENGINEAPI
|
[sap.com]
|
default
|
BC-JAS-SEC-UME
|
|
SAP NetWeaver 7.4 (SP03) Composition Environment | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||