|
SAP NetWeaver 2004S SPS 09 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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(), getCompanyId() 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.
| 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. |
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()
Gets the user's company. |
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. |
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, ... |
Iterator |
getRoles(boolean recursive)
Gets the list of (all) assigned roles of this user including parent groups, grandparent groups,... |
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 |
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, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, lastModified, refresh |
| Field Detail |
public static final String VERSIONSTRING
public static final int DEFAULT_ACCESSIBILITY_LEVEL
public static final int SCREENREADER_ACCESSIBILITY_LEVEL
| Method Detail |
public String getUid()
IPrincipal.getUniqueID().
public String getJobTitle()
public String getDepartment()
public String getTitle()
public String getSalutation()
public String getFirstName()
public String getLastName()
public String getStreet()
public String getCity()
public String getZip()
public String getState()
public 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.
public Locale getLocale()
getCountry() instead of using the Locale's country.
null in case no locale
is stored for this IUser object.public 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.
public String getCurrency()
public String getTelephone()
public String getCellPhone()
public String getFax()
public String getEmail()
public boolean isCompanyUser()
true if user belongs to companypublic String getCompany()
public IUserFactory getUserFactory()
IUserFactory user factorypublic boolean hasPermission(Permission permission)
true if the user has
the given permission.
true if the user has
the given permission.
public void checkPermission(Permission permission)
throws AccessControlException
permission, this method does nothing. If not, it will
throw an AccessControlException, and possibly trigger
appropriate tracing action.
AccessControlException - if the user doesn't have the specified
permission
public IUserAccount[] getUserAccounts()
throws UMException
UMException
public Iterator getUserAccountUniqueIDs()
throws UMException
UMExceptionpublic int getAccessibilityLevel()
DEFAULT_ACCESSIBILITY_LEVEL
Following constants can be returned:
DEFAULT_ACCESSIBILITY_LEVEL
SCREENREADER_ACCESSIBILITY_LEVELpublic Iterator getRoles(boolean recursive)
true
NOTE: This method may also return roles which are already deleted.
recursive - if true returns all parent roles
public Iterator getParentGroups(boolean recursive)
true
recursive - if true returns all parent groups
public 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.
public boolean isMemberOfGroup(String uniqueIdOfGroup,
boolean recursive)
uniqueIdOfGroup - the ID of the collection
public 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.
public 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
public 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
|
SAP NetWeaver 2004S SPS 09 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||