com.esri.adf.security.store
Class ArcGISSecurityUser

java.lang.Object
  extended by com.esri.adf.security.store.ArcGISSecurityUser
All Implemented Interfaces:
java.io.Serializable

public class ArcGISSecurityUser
extends java.lang.Object
implements java.io.Serializable

This class encapsulates the user information for the security store. You can use the ArcGISSecurityUser object to add, modify or get users from the security store.

See Also:
Serialized Form

Field Summary
protected  java.lang.String strEmail
           
protected  java.lang.String strFullName
           
protected  java.lang.String strMD5HashPwd
           
protected  java.lang.String strSecretAnswer
           
protected  java.lang.String strSecretQuestion
           
protected  java.lang.String strSHAHashPwd
           
protected  java.lang.String strUserName
           
 
Constructor Summary
ArcGISSecurityUser(java.lang.String username)
          Class constructor that takes in the username This constuctor is used when the security API are returning user information.
ArcGISSecurityUser(java.lang.String fullname, java.lang.String username)
          Class constructor that takes in the full name of the user along with a unique identifier for this user.
ArcGISSecurityUser(java.lang.String fullname, java.lang.String username, java.lang.String email, java.lang.String secretQuest)
          Class constructor that takes in the full name, unique identifier for user, email address, a secret question and answer to the ecret question.
ArcGISSecurityUser(java.lang.String fullname, java.lang.String username, java.lang.String plainPassword, java.lang.String email, java.lang.String secretQuest, java.lang.String secretAns)
          Class constructor that takes in the full name, unique identifier for user, password in plain text, email address, a secret question and answer to the secret question.
 
Method Summary
protected  java.util.HashMap<java.lang.String,java.lang.String> getAllProperties()
          Returns a hashmap of all the properties that have been set on this object.
 java.lang.String getEmail()
          Returns the email of the user.
 java.lang.String getFullName()
          Returns the fullname for the user.
 java.lang.String getMD5HashPwd()
          Return the MD5 hash of the password
 java.lang.String getSecretAnswer()
          Get the secret question assigned to the user
 java.lang.String getSecretQuestion()
          Get the secret question assigned to the user
 java.lang.String getSHAHashPwd()
          Return the SHA1 hash of the password
 java.lang.String getUserName()
          Returns the unique identifier for the user.
 void setEmail(java.lang.String email)
          Set the email address of a user.
 void setFullName(java.lang.String fullName)
          Set the full name of the user.
 void setPassword(java.lang.String password)
          Set the plain text password for the user.
 void setSecretAnswer(java.lang.String secretAns)
          Set the answer to the secret question for a user, this will be used to retrieve/reset password if a user forgets his password
 void setSecretQuestion(java.lang.String secretQuest)
          Set the secret question for a user, this will be used to retrieve/reset password if a user forgets his password
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strFullName

protected java.lang.String strFullName

strUserName

protected java.lang.String strUserName

strMD5HashPwd

protected java.lang.String strMD5HashPwd

strSHAHashPwd

protected java.lang.String strSHAHashPwd

strSecretQuestion

protected java.lang.String strSecretQuestion

strSecretAnswer

protected java.lang.String strSecretAnswer

strEmail

protected java.lang.String strEmail
Constructor Detail

ArcGISSecurityUser

public ArcGISSecurityUser(java.lang.String fullname,
                          java.lang.String username,
                          java.lang.String plainPassword,
                          java.lang.String email,
                          java.lang.String secretQuest,
                          java.lang.String secretAns)
                   throws ArcGISSecurityException
Class constructor that takes in the full name, unique identifier for user, password in plain text, email address, a secret question and answer to the secret question. You can use this constructor to while adding new users into the security store.

Parameters:
fullname - - String representing the full name of the user
username - - String representing the unique identifier for the user
password - - String representing the plain text password
email - - String representing the email address of the user. This parameter can be null.
secretQuest - - String representing a secret question. The user will be prompted to give the answer to this question in case he forgets the password. This parameter can be null.
secretAns - - String representing the answer to the secret question. This parameter can be null only if secretQuest is null.
Throws:
ArcGISSecurityException - - if input parameter is null

ArcGISSecurityUser

public ArcGISSecurityUser(java.lang.String fullname,
                          java.lang.String username,
                          java.lang.String email,
                          java.lang.String secretQuest)
                   throws ArcGISSecurityException
Class constructor that takes in the full name, unique identifier for user, email address, a secret question and answer to the ecret question. This constuctor is used when the security API are returning user information.

Parameters:
fullname - - String representing the full name of the user. This parameter can be null.
username - - String representing the unique identifier for the user
email - - String representing the email address of the user. This parameter can be null.
secretQuest - - String representing the secret question of the user. This parameter can be null.
Throws:
ArcGISSecurityException - - if input parameter is null

ArcGISSecurityUser

public ArcGISSecurityUser(java.lang.String username)
                   throws ArcGISSecurityException
Class constructor that takes in the username This constuctor is used when the security API are returning user information.

Parameters:
username - - String representing the unique identifier for the user
Throws:
ArcGISSecurityException - - if input parameter is null

ArcGISSecurityUser

public ArcGISSecurityUser(java.lang.String fullname,
                          java.lang.String username)
                   throws ArcGISSecurityException
Class constructor that takes in the full name of the user along with a unique identifier for this user. This constuctor is used when the security API are returning user information.

Parameters:
username - - String representing the unique identifier for the user
Throws:
ArcGISSecurityException - - if input parameter is null
Method Detail

setFullName

public void setFullName(java.lang.String fullName)
                 throws ArcGISSecurityException
Set the full name of the user.

Parameters:
fullName - - String representing the full name of the user
Throws:
ArcGISSecurityException - - if input parameter is null

setPassword

public void setPassword(java.lang.String password)
                 throws ArcGISSecurityException
Set the plain text password for the user.

Parameters:
password - - String representing the plain text password for the user
Throws:
ArcGISSecurityException - - if input parameter is null

getUserName

public java.lang.String getUserName()
Returns the unique identifier for the user.

Returns:
String representing the username

getFullName

public java.lang.String getFullName()
Returns the fullname for the user.

Returns:
String representing the fullname or null if full name is not set

setEmail

public void setEmail(java.lang.String email)
              throws ArcGISSecurityException
Set the email address of a user.

Parameters:
email - - String representing the email address
Throws:
ArcGISSecurityException - - if input parameter is null

getEmail

public java.lang.String getEmail()
Returns the email of the user.

Returns:
String representing the email of the user or null if email is not set

setSecretQuestion

public void setSecretQuestion(java.lang.String secretQuest)
                       throws ArcGISSecurityException
Set the secret question for a user, this will be used to retrieve/reset password if a user forgets his password

Parameters:
secretQuest - - String representing the secret question
Throws:
ArcGISSecurityException - if the input parameter is null

getSecretQuestion

public java.lang.String getSecretQuestion()
Get the secret question assigned to the user

Returns:
String represeting the secret question, null if question not assigned

setSecretAnswer

public void setSecretAnswer(java.lang.String secretAns)
                     throws ArcGISSecurityException
Set the answer to the secret question for a user, this will be used to retrieve/reset password if a user forgets his password

Parameters:
secretQuest - - String representing the answer to the secret question
Throws:
ArcGISSecurityException - if the input parameter is null

getSecretAnswer

public java.lang.String getSecretAnswer()
Get the secret question assigned to the user

Returns:
String represeting the secret question, null if answer not assigned

getMD5HashPwd

public java.lang.String getMD5HashPwd()
Return the MD5 hash of the password

Returns:
String representing the MD5 hash of the password

getSHAHashPwd

public java.lang.String getSHAHashPwd()
Return the SHA1 hash of the password

Returns:
String representing the SHA1 hash of the password

getAllProperties

protected java.util.HashMap<java.lang.String,java.lang.String> getAllProperties()
Returns a hashmap of all the properties that have been set on this object. The hashmap will include only those properties that are not null.

Returns:
Hashmap of all properties as key value pairs