public class ESIRequest extends GatewayRequest implements ESIReturnCodes
This class contains the details of an ESI request to the CICS Transaction
Gateway. To execute the request, the ESIRequest object must be flowed to the
Gateway using the JavaGateway.flow(GatewayRequest)
method.
ESI requests support two call types:
ESI_VERIFY_PASSWORD
verifies the password or password
phrase for a specified user id.ESI_CHANGE_PASSWORD
changes the password or password
phrase for a specified user id.Password Expiry Management is supported for the SNA and IPIC protocols.
The maximum supported password or password phrase length varies by CICS server and communication protocol. Refer to your CICS server documentation for details.
GatewayRequest
Modifier and Type | Field and Description |
---|---|
static int |
ESI_CHANGE_PASSWORD
Call type for a request that changes a password or password phrase.
|
static int |
ESI_PASSWORD_MAX
Deprecated.
This field is deprecated.
The maximum supported password or password phrase length varies by CICS server and communication protocol. Refer to your CICS server documentation for details. |
static int |
ESI_SYSTEM_MAX
Maximum number of characters in server name.
|
static int |
ESI_USERID_MAX
Maximum number of characters for user ID.
|
static int |
ESI_VERIFY_PASSWORD
Call type for a request that verifies a password or password phrase.
|
astrCics_Rc, ESI_ERR_CALL_FROM_CALLBACK, ESI_ERR_CICS_DIED, ESI_ERR_MAX_SESSIONS, ESI_ERR_MAX_SYSTEMS, ESI_ERR_NO_CICS, ESI_ERR_NO_SESSIONS, ESI_ERR_NULL_NEW_PASSWORD, ESI_ERR_NULL_OLD_PASSWORD, ESI_ERR_NULL_PASSWORD, ESI_ERR_NULL_USERID, ESI_ERR_PASSWORD_EXPIRED, ESI_ERR_PASSWORD_INVALID, ESI_ERR_PASSWORD_REJECTED, ESI_ERR_PEM_NOT_ACTIVE, ESI_ERR_PEM_NOT_SUPPORTED, ESI_ERR_RESOURCE_SHORTAGE, ESI_ERR_SECURITY_ERROR, ESI_ERR_SYSTEM_ERROR, ESI_ERR_UNKNOWN_SERVER, ESI_ERR_USERID_INVALID, ESI_NO_ERROR, rcLookup
astrGateway_Rc, ERROR_BASE, ERROR_CONNECTION_FAILED, ERROR_EXIT_RETRY_INVALID, ERROR_GATEWAY_BACK_LEVEL, ERROR_GATEWAY_CLOSED, ERROR_GATEWAY_EXCEPTION, ERROR_INVALID_REQUEST_TYPE, ERROR_NOT_AUTHORIZED, ERROR_NOT_SUPPORTED, ERROR_REPLY_MISMATCH, ERROR_UNKNOWN_REQUEST_TYPE, ERROR_WORK_WAS_REFUSED, ERROR_XA_SUPPORT_NOT_ENABLED, strINVALID_GATEWAY_RC
Constructor and Description |
---|
ESIRequest()
The default constructor that leaves all the values set to their defaults.
|
Modifier and Type | Method and Description |
---|---|
void |
changePassword()
Sets the call type of the ESI request to be Change Password.
|
static ESIRequest |
changePassword(java.lang.String strUserid,
java.lang.String strCurrentPassword,
java.lang.String strNewPassword,
java.lang.String strServer)
Returns a new ESI Request object that can be used to invoke
a changePassword request.
|
int |
getCallType()
Returns the Call_Type field of the ESI Request as an int.
|
java.lang.String |
getCallTypeString()
Returns the Call_Type field of the ESI Request as a String.
|
int |
getCicsRc()
Returns the CICS return code set in this ESI Request as an int.
|
java.lang.String |
getCicsRcString()
Returns the CICS return code set in this ESI Request as a String.
|
java.lang.String |
getCurrentPassword()
Returns the current password or password phrase as a String.
|
java.util.Calendar |
getExpiry()
Returns the date/time of when the password or password phrase is due to
expire on the server as a java.util.Calendar object.
|
int |
getInvalidCount()
Returns the number of invalid password
verification attempts for that user ID on the specified server since the
last successful password verification as an int.
|
java.util.Calendar |
getLastAccess()
Returns the date/time of when the user ID was last accessed on the server
as a java.util.Calendar object.
|
java.util.Calendar |
getLastVerified()
Returns the date/time of when the user ID credentials were last verified on the server
as a java.util.Calendar object.
|
java.lang.String |
getNewPassword()
Returns the new password or password phrase as a String.
|
int |
getRc()
Returns the return code set in this ESI Request by the Gateway as an int.
|
java.lang.String |
getRcString()
Returns the return code set in this ESI Request as a String.
|
java.lang.String |
getServer()
Returns the server name as a String.
|
java.lang.String |
getUserid()
Returns the current user ID as a String.
|
boolean |
passwordExpirySet()
Returns a boolean value indicating whether the expiry field had been set.
|
void |
setCurrentPassword(java.lang.String strPassword)
Sets the current password or password phrase for the ESI Request.
|
void |
setNewPassword(java.lang.String strPassword)
Sets the new password or password phrase for the ESI Request.
|
void |
setServer(java.lang.String strServer)
Sets the server name to be used for this ESI Request.
|
void |
setUserid(java.lang.String strUserid)
Sets the user ID for the ESI request.
|
void |
verifyPassword()
Sets the call type of the ESI Request to be Verify Password.
|
static ESIRequest |
verifyPassword(java.lang.String strUserid,
java.lang.String strCurrentPassword,
java.lang.String strServer)
Returns a new ESI Request object that can be used to invoke
a verifyPassword request.
|
getGatewayRc, getGatewayRcString
public static final int ESI_USERID_MAX
@Deprecated public static final int ESI_PASSWORD_MAX
The maximum supported password or password phrase length varies by CICS server and communication protocol. Refer to your CICS server documentation for details.
public static final int ESI_SYSTEM_MAX
public static final int ESI_VERIFY_PASSWORD
public static final int ESI_CHANGE_PASSWORD
public ESIRequest()
You must use the various setter methods to define the required parameters for the type of call you require.
public java.lang.String getUserid()
public java.lang.String getCurrentPassword()
public java.lang.String getNewPassword()
changePassword()
call.
public java.lang.String getServer()
public java.util.Calendar getLastVerified()
public java.util.Calendar getExpiry()
passwordExpirySet()
returns true
after a successful verifyPassword or changePassword request has been
flowed. If passwordExpirySet
returns false, the contents of
this calls java.util.Calendar object returned are undefined. However, if
the verifyPassword or changePassword request has not been sent or was
unsuccessful, null is returned.
public boolean passwordExpirySet()
public java.util.Calendar getLastAccess()
public int getInvalidCount()
public int getRc()
public java.lang.String getRcString()
public int getCicsRc()
public java.lang.String getCicsRcString()
The String returned is the name of the appropriate Java constant. For instance, if the Cics_Rc is ESI_NO_ERROR, then the String returned will be "ESI_NO_ERROR". If the Cics_Rc is unknown, then the String returned will be "ESI_UNKNOWN_CICS_RC".
NOTE: for CICS return codes that have more than one meaning, the String returned is a concatenation of the return codes. For example, the CICS return codes of ESI_ERR_NULL_OLD_PASSWORD and ESI_ERR_NULL_PASSWORD have the same numerical value. If the CICS return code is ESI_ERR_NULL_OLD_PASSWORD or ESI_ERR_NULL_PASSWORD, the concatentated String "ESI_ERR_NULL_OLD_PASSWORD_OR_ESI_ERR_NULL_PASSWORD" is returned.
public int getCallType()
public java.lang.String getCallTypeString()
public void setUserid(java.lang.String strUserid)
strUserid
- String The user IDpublic void setCurrentPassword(java.lang.String strPassword)
strPassword
- String The current password or password phrasepublic void setNewPassword(java.lang.String strPassword)
strPassword
- String The new password or password phrasepublic void setServer(java.lang.String strServer)
strServer
- String The serverpublic void verifyPassword()
public void changePassword()
public static ESIRequest verifyPassword(java.lang.String strUserid, java.lang.String strCurrentPassword, java.lang.String strServer)
Returns a new ESI Request object that can be used to invoke a verifyPassword request. Passwords or password phrases can be verified using this method.
The maximum supported password or password phrase length varies by CICS server and communication protocol. Refer to your CICS server documentation for details.
strUserid
- String The useridstrCurrentPassword
- String The current password or password phrasestrServer
- String The serverpublic static ESIRequest changePassword(java.lang.String strUserid, java.lang.String strCurrentPassword, java.lang.String strNewPassword, java.lang.String strServer)
Returns a new ESI Request object that can be used to invoke a changePassword request. Passwords and password phrases can be changed using this method.
The maximum supported password or password phrase length varies by CICS server and communication protocol. Refer to your CICS server documentation for details.
strUserid
- String The useridstrCurrentPassword
- String The current password or password phrasestrNewPassword
- String The new password or password phrasestrServer
- String The server