|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface to get and set user account data. 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. As this interface can be extended, this interface can be freely used, but must not be implemented.
| Field Summary | |
static int |
LOCKED_AUTO
|
static int |
LOCKED_BY_ADMIN
|
static int |
LOCKED_NO
|
static java.lang.String |
SECURITY_POLICY
|
static java.lang.String |
SECURITY_POLICY_TYPE_DEFAULT
|
static java.lang.String |
SECURITY_POLICY_TYPE_TECHNICAL
|
static java.lang.String |
SECURITY_POLICY_TYPE_UNKNOWN
|
| 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, 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 Note: Use IUserAccount.isPasswordDisabled() before calling this. |
int |
checkPasswordExtended(java.lang.String pass)
compares the stored password with the input password Possible return values are: ILoginConstants.CHECKPWD_OK ILoginConstants.CHECKPWD_WRONGPWD ILoginConstants.CHECKPWD_NOPWD ILoginConstants.CHECKPWD_PWDLOCKED ILoginConstants.CHECKPWD_PWDEXPIRED |
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()
Deprecated. |
int |
getLockReason()
Deprecated. use isPasswordLocked() and isUserAccountLocked() instead |
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()
Deprecated. |
java.util.Iterator |
getRoles(boolean recursive)
Gets the list of all assigned roles of this principal including parent groups, grandparent groups,... |
java.lang.String |
getSecurityPolicy()
Gets the security policy which is assigned to this account. |
int |
getSuccessfulLogonCounts()
Deprecated. |
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()
Deprecated. |
boolean |
isLocked()
Deprecated. use isPasswordLocked() and isUserAccountLocked() instead |
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 |
boolean |
isPasswordDisabled()
Checks whether the password is disabled. |
boolean |
isPasswordLocked()
Gets the password locked attribute of the IUserAccount object |
boolean |
isUserAccountLocked()
Gets the locked attribute of the IUserAccount object |
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)
Deprecated. |
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 |
setPasswordDisabled()
Disables the password. |
void |
setSecurityPolicy(java.lang.String uniqueName)
assign new security policy to this account |
void |
setSuccessfulLogonCounts(int i)
Deprecated. |
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 |
addAttributeValue, commit, isModified, removeAttributeValue, 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
public static final java.lang.String SECURITY_POLICY
public static final java.lang.String SECURITY_POLICY_TYPE_DEFAULT
public static final java.lang.String SECURITY_POLICY_TYPE_TECHNICAL
public static final java.lang.String SECURITY_POLICY_TYPE_UNKNOWN
| 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()
isPasswordLocked() and isUserAccountLocked() instead
true if the user account is locked
public void setLocked(boolean lock,
int reason)
lock - the lock valuereason - specifies the lock reasonpublic int getLockReason()
isPasswordLocked() and isUserAccountLocked() instead
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 boolean isPasswordDisabled()
public void setPasswordDisabled()
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 string
public int checkPasswordExtended(java.lang.String pass)
throws UMException
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)
roleId - the ID of the role
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 boolean isPasswordLocked()
true if the user account is lockedpublic boolean isUserAccountLocked()
true if the user account is lockedpublic java.lang.String getAssignedUserID()
public java.lang.String getSecurityPolicy()
public void setSecurityPolicy(java.lang.String uniqueName)
throws UMException
uniqueName - the uniqueName of the security policyNoSuchPrincipalException - if no SecurityPolicy with the given uniqueName
existsUMException - if given unique name is not unique
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||