|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Title: Interface to get and set user account data Description: Copyright: Copyright (c) 2001 Company: SAPMarkets, Inc Note : get methods returning an object may return null if a valid value is not available unless specified otherwise in the respective method description.
| Field Summary | |
static int |
LOCKED_AUTO
|
static int |
LOCKED_BY_ADMIN
|
static int |
LOCKED_NO
|
| Fields inherited from interface com.sap.security.api.IPrincipal |
BYTE_TYPE, DEFAULT_NAMESPACE, DEFAULT_RELATION_NAMESPACE, DESCRIPTION, DISPLAYNAME, PRINCIPAL_CREATION_DATE, PRINCIPAL_MODIFY_DATE, PRINCIPAL_RELATION_MEMBER_ATTRIBUTE, PRINCIPAL_RELATION_PARENT_ATTRIBUTE, STRING_TYPE, TRANSIENT_NAMESPACE, UNIQUE_NAME, VERSIONSTRING |
| Method Summary | |
void |
addToGroup(java.lang.String uniqueIdOfGroup)
Deprecated. use IUserMaint.addToGroup(String) instead |
void |
addToRole(java.lang.String uniqueIdOfRole)
Deprecated. use IUserMaint.addToRole(String) instead |
boolean |
checkPassword(java.lang.String pass)
compares the stored password with the input password |
java.util.Date |
created()
returns the creation date of this user account |
void |
deleteCertificates(java.security.cert.X509Certificate[] certificate)
Deletes the user's certificate |
IUser |
getAssignedUser()
get the user that belongs to this account |
java.lang.String |
getAssignedUserID()
Gets the unique id of the user which is assigned to this account. |
java.security.cert.X509Certificate[] |
getCertificates()
Returns the user's certificates |
int |
getFailedLogonAttempts()
get number of failed logon attempts. |
java.lang.String |
getHashedPassword()
|
java.util.Date |
getLastFailedLogonDate()
get last failed logon time |
java.util.Date |
getLastPasswordChangedDate()
Gets the LastPasswordChangedDate attribute of the IUserAccount object |
java.util.Date |
getLastSuccessfulLogonDate()
get last sucessful logon date |
int |
getLockReason()
Returns the reason code for account lock. |
java.lang.String |
getLogonUid()
get logon uid (long uid) |
java.util.Iterator |
getParentGroups(boolean recursive)
Gets the list of all parent principals including parents, grandparents, ... |
java.util.Date |
getPreviousSuccessfulLogonDate()
get previous sucessful logon date |
java.util.Iterator |
getRoles(boolean recursive)
Gets the list of all assigned roles of this principal including parent groups, grandparent groups,... |
int |
getSuccessfulLogonCounts()
get number of successful logon attempts |
java.util.Date |
getValidFromDate()
get valid from date |
java.util.Date |
getValidToDate()
get valid to date |
void |
incrementFailedLogonAttempts()
set the number of failed logon attemps by a parameter |
void |
incrementSuccessfulLogonCounts()
increase the number of logon counts by 1 |
boolean |
isLocked()
Gets the Locked attribute of the IUserAccount object |
boolean |
isMemberOfGroup(java.lang.String uniqueIdOfGroup,
boolean recursive)
Checks if the principal belongs to the passed groupId |
boolean |
isMemberOfRole(java.lang.String roleId,
boolean recursive)
Checks if the principal belongs to the passed roleId This method does a recursive search, so if this principal belongs to a collection which is a member of this collection, true is returned. |
boolean |
isPasswordChangeRequired()
indicator the need of force change password on next logon default: false if true, user need to change logon password on next logon |
java.util.Date |
lastModified()
returns the last modification date of this user account |
java.util.Date |
lockDate()
returns lock date |
void |
removeFromGroup(java.lang.String uniqueIdOfGroup)
Deprecated. use IUserMaint.removeFromGroup(String) instead |
void |
removeFromRole(java.lang.String uniqueIdOfRole)
Deprecated. use IUserMaint.removeFromRole(String) instead |
void |
resetFailedLogonAttempts()
Description of the Method |
void |
setCertificates(java.security.cert.X509Certificate[] certificate)
Stores the user's certificate and creates a mapping |
void |
setFailedLogonAttempts(int i)
increase the number of failed logon attempts by 1 |
void |
setLastFailedLogonDate(java.util.Date timeStamp)
set last logon time |
void |
setLastLogoutDate(java.util.Date timeStamp)
set last logout date |
void |
setLastSuccessfulLogonDate(java.util.Date timeStamp)
set last successful logon date |
void |
setLocked(boolean lock,
int reason)
Sets the locked attribute of the IUserAccount object |
void |
setPassword(java.lang.String pass)
Changes user password to newpass. |
void |
setPassword(java.lang.String oldpass,
java.lang.String newpass)
Changes user password from oldpass to newpass. |
void |
setPasswordChangeRequired(boolean chng)
Sets the PasswordChangeRequired attribute of the IUserAccount object. |
void |
setSuccessfulLogonCounts(int i)
Sets the SuccessfulLogonCounts attribute of the IUserAccount object |
void |
setValidFromDate(java.util.Date date)
Sets the ValidFromDate attribute of the IUserAccount object |
void |
setValidToDate(java.util.Date date)
Sets the ValidToDate attribute of the IUserAccount object |
| Methods inherited from interface com.sap.security.api.IPrincipalMaint |
commit, isModified, rollback, save, setAttribute, setBinaryAttribute, setDisplayName |
| Methods inherited from interface com.sap.security.api.IPrincipal |
equals, getAttribute, getAttributeNames, getAttributeNamespaces, getAttributeType, getBinaryAttribute, getDisplayName, getParents, getUniqueID, hashCode, isExistenceChecked, isMutable, refresh |
| Field Detail |
public static final int LOCKED_NO
public static final int LOCKED_AUTO
public static final int LOCKED_BY_ADMIN
| Method Detail |
public java.lang.String getLogonUid()
public java.util.Date getValidFromDate()
public void setValidFromDate(java.util.Date date)
date - The new ValidFromDate valuepublic java.util.Date getValidToDate()
public IUser getAssignedUser()
throws UMException
public void setValidToDate(java.util.Date date)
date - The new ValidToDate valuepublic boolean isLocked()
true if the user account is locked
public void setLocked(boolean lock,
int reason)
lock - the lock valuereason - specifies the lock reasonpublic int getLockReason()
public java.util.Date getLastFailedLogonDate()
public void setLastFailedLogonDate(java.util.Date timeStamp)
timeStamp - The new LastFailedLogonDate valuepublic int getFailedLogonAttempts()
public void setFailedLogonAttempts(int i)
i - The new FailedLogonAttempts valuepublic void incrementFailedLogonAttempts()
public void resetFailedLogonAttempts()
public java.util.Date getLastSuccessfulLogonDate()
public void setLastSuccessfulLogonDate(java.util.Date timeStamp)
timeStamp - The new LastSuccessfulLogonDate valuepublic int getSuccessfulLogonCounts()
public void incrementSuccessfulLogonCounts()
public void setSuccessfulLogonCounts(int i)
i - The new SuccessfulLogonCounts valuepublic boolean isPasswordChangeRequired()
public java.util.Date getLastPasswordChangedDate()
public void setPasswordChangeRequired(boolean chng)
Note:
Attribute com.sap.security.core.usermanagement|->passwordchangerequired
can only be modified by changing or resetting the password if any
datasource of class com.sap.security.core.persistence.datasource.imp.R3Persistence
is responsible for writing it.
The exception may be raised in following cases
IUserAccount.commit() may raise UMException
for SAP System user with following exception text:
setPassword(String, String)
or setPassword(String) in the same
IPrincipalMaint.commit() transaction.
setPasswordChangeRequired and
setPassword(...)
is used:
setPassword(String) and setPasswordChangeRequired(false) setPassword(String, String) and setPasswordChangeRequired(true)
chng - The new PasswordChangeRequired value
public void setPassword(java.lang.String pass)
throws InvalidPasswordException
pass - The new Password value
public void setPassword(java.lang.String oldpass,
java.lang.String newpass)
throws InvalidPasswordException
oldpass - The new Password valuenewpass - The new Password value
public java.security.cert.X509Certificate[] getCertificates()
throws java.security.cert.CertificateException,
UMException
null if the user doesn't have certificatesjava.security.cert.CertificateException - Description of ExceptionUMException - UMException is thrown
is getCertificates operation is failed for some reason
public void setCertificates(java.security.cert.X509Certificate[] certificate)
throws java.security.cert.CertificateException,
UMException
certificate - array of allowed certifiates, pass
null to remove existing mappingjava.security.cert.CertificateException - Description of ExceptionUMException - UMException is thrown
is setCertificates operation is failed for some reason
public void deleteCertificates(java.security.cert.X509Certificate[] certificate)
throws java.security.cert.CertificateException,
UMException
certificate - array of allowed certifiates, pass
null to remove existing mappingjava.security.cert.CertificateException - Description of ExceptionUMException - UMException is thrown
is setCertificates operation is failed for some reasonpublic boolean checkPassword(java.lang.String pass)
pass - Password stringpublic java.util.Date created()
created in interface IPrincipalcom.sap.security.api.IPrincipalnull if creation date is not availablepublic java.util.Date lastModified()
lastModified in interface IPrincipalcom.sap.security.api.IPrincipalnull if last modification date is not availablepublic java.util.Date lockDate()
public java.lang.String getHashedPassword()
throws UMException
FeatureNotAvailableException - if feature is not implementedpublic void setLastLogoutDate(java.util.Date timeStamp)
timeStamp - The new LastSuccessfulLogonDate value
if timeStamp is null a new Date object will be allocated
and measured to the nearest millisecond.public java.util.Date getPreviousSuccessfulLogonDate()
public java.util.Iterator getRoles(boolean recursive)
recursive - if true returns all parent rolespublic java.util.Iterator getParentGroups(boolean recursive)
public boolean isMemberOfRole(java.lang.String roleId,
boolean recursive)
parentId - the ID of the collection
public boolean isMemberOfGroup(java.lang.String uniqueIdOfGroup,
boolean recursive)
uniqueIdOfGroup - the ID of the grouprecursive. - This method does a recursive search, so if this principal belongs to a
collection which is a member of this collection, true is returned.
returns true if the principal is directly or indirectly (via role membership)
assigned.
public void addToGroup(java.lang.String uniqueIdOfGroup)
throws UMException
IUserMaint.addToGroup(String) instead
uniqueIdOfGroup - id of the groupUMException -
public void removeFromGroup(java.lang.String uniqueIdOfGroup)
throws UMException
IUserMaint.removeFromGroup(String) instead
uniqueIdOfGroup - id of the parent groupUMException -
public void addToRole(java.lang.String uniqueIdOfRole)
throws UMException
IUserMaint.addToRole(String) instead
uniqueIdOfRole - id of the roleUMException -
public void removeFromRole(java.lang.String uniqueIdOfRole)
throws UMException
IUserMaint.removeFromRole(String) instead
uniqueIdOfRole - id of the roleUMException - public java.lang.String getAssignedUserID()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||