CICS® Transaction Gateway Programming Reference v1.1.0.0

com.ibm.ctg.client
Class ESIRequest

java.lang.Object
  extended by com.ibm.ctg.client.GatewayRequest
      extended by com.ibm.ctg.client.ESIRequest
All Implemented Interfaces:
ESIReturnCodes, GatewayReturnCodes

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 should be flowed to the Gateway using the JavaGateway.flow method

See Also:
GatewayRequest

Field Summary
static int ESI_CHANGE_PASSWORD
          Call type for change password request.
static int ESI_PASSWORD_MAX
          Maximum number of characters for password.
static int ESI_SYSTEM_MAX
          Maximum number of characters for server.
static int ESI_USERID_MAX
          Maximum number of characters for user ID.
static int ESI_VERIFY_PASSWORD
          Call type for verify password request.
 
Fields inherited from interface com.ibm.ctg.client.ESIReturnCodes
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
 
Fields inherited from interface com.ibm.ctg.client.GatewayReturnCodes
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 Summary
ESIRequest()
          Default constructor, this leaves all the values set to their defaults.
 
Method Summary
 void changePassword()
          Sets the ESI request object to be a Change Password Request.
static ESIRequest changePassword(java.lang.String strUserid, java.lang.String strCurrentPassword, java.lang.String strNewPassword, java.lang.String strServer)
          This method returns a new ESI Request object which can be used to invoke a changePassword request.
 int getCallType()
          This method returns the Call_Type field of this ESIRequest object.
 java.lang.String getCallTypeString()
          This method returns a String describing the Call_Type field of this ESIRequest object.
 int getCicsRc()
          Gets the CICS return code set in this object.
 java.lang.String getCicsRcString()
          Gets the CICS return code set in this object and returns it as a String.
 java.lang.String getCurrentPassword()
          This method returns a String of the current password defined.
 java.util.Calendar getExpiry()
          This method returns a java.util.Calendar object containing the date/time of when the user ID/password will expire on the server.
 int getInvalidCount()
          This method returns a int containing the number of invalid password attempts for that user ID on the specified server.
 java.util.Calendar getLastAccess()
          This method returns a java.util.Calendar object containing the date/time of when the user ID/password was last accessed on the server.
 java.util.Calendar getLastVerified()
          This method returns a java.util.Calendar object containing the date/time of when the user ID/password was last verified on the server.
 java.lang.String getNewPassword()
          This method returns a String of the new password defined.
 int getRc()
          Gets the return code set in this object.
 java.lang.String getRcString()
          Gets the return code set in this object and return it as a string.
 java.lang.String getServer()
          This method returns a String of the server defined.
 java.lang.String getUserid()
          This method returns a String of the current user ID defined.
 void setCurrentPassword(java.lang.String strPassword)
          Set the current password for this object.
 void setNewPassword(java.lang.String strPassword)
          Set the new password for this object.
 void setServer(java.lang.String strServer)
          Sets the server to be used for this object.
 void setUserid(java.lang.String strUserid)
          Set the user ID for this object.
 void verifyPassword()
          Sets the ESI request object to be a Verify Password Request.
static ESIRequest verifyPassword(java.lang.String strUserid, java.lang.String strCurrentPassword, java.lang.String strServer)
          This method returns a new ESI Request object which can be used to invoke a verifyPassword request.
 
Methods inherited from class com.ibm.ctg.client.GatewayRequest
getGatewayRc, getGatewayRcString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ESI_USERID_MAX

public static final int ESI_USERID_MAX
Maximum number of characters for user ID.

See Also:
Constant Field Values

ESI_PASSWORD_MAX

public static final int ESI_PASSWORD_MAX
Maximum number of characters for password.

See Also:
Constant Field Values

ESI_SYSTEM_MAX

public static final int ESI_SYSTEM_MAX
Maximum number of characters for server.

See Also:
Constant Field Values

ESI_VERIFY_PASSWORD

public static final int ESI_VERIFY_PASSWORD
Call type for verify password request.

See Also:
Constant Field Values

ESI_CHANGE_PASSWORD

public static final int ESI_CHANGE_PASSWORD
Call type for change password request.

See Also:
Constant Field Values
Constructor Detail

ESIRequest

public ESIRequest()
Default constructor, this leaves all the values set to their defaults.

You will need to use the various setter methods to define the required parameters for the type of call you require.

Method Detail

getUserid

public java.lang.String getUserid()
This method returns a String of the current user ID defined.

Returns:
String The current user ID.

getCurrentPassword

public java.lang.String getCurrentPassword()
This method returns a String of the current password defined.

Returns:
String The current password.

getNewPassword

public java.lang.String getNewPassword()
This method returns a String of the new password defined. This will only be set if you are using the changePassword() call.

Returns:
String The new password.

getServer

public java.lang.String getServer()
This method returns a String of the server defined.

Returns:
String The server defined.

getLastVerified

public java.util.Calendar getLastVerified()
This method returns a java.util.Calendar object containing the date/time of when the user ID/password was last verified on the server. This call will only return information if a successful verifyPassword or changePassword has been flowed, otherwise null is returned.

Returns:
java.util.Calendar Last Verified Information (null if no info)

getExpiry

public java.util.Calendar getExpiry()
This method returns a java.util.Calendar object containing the date/time of when the user ID/password will expire on the server. This call will only return information if a successful verifyPassword or changePassword has been flowed, otherwise null is returned.

Returns:
java.util.Calendar Last Verified Information (null if no info)

getLastAccess

public java.util.Calendar getLastAccess()
This method returns a java.util.Calendar object containing the date/time of when the user ID/password was last accessed on the server. This call will only return information if a successful verifyPassword or changePassword has been flowed, otherwise null is returned.

Returns:
java.util.Calendar Last Verified Information (null if no info)

getInvalidCount

public int getInvalidCount()
This method returns a int containing the number of invalid password attempts for that user ID on the specified server. This call will only return information if a successful verifyPassword or changePassword has been flowed, otherwise -1 is returned.

Returns:
int Invalid attempts (-1 if no info)

getRc

public int getRc()
Gets the return code set in this object. If a Gateway error code is set this is returned. However if there is no Gateway error code, then any CICS return code is returned. If this method returns zero, it can be assumed that no errors have occurred.

Returns:
int The return code

getRcString

public java.lang.String getRcString()
Gets the return code set in this object and return it as a string. If a Gateway error code is set the string equivalent is returned. However if there is no Gateway error code, then any CICS return code string is returned. If there is no error then the string ESI_NO_ERROR will be returned.

Returns:
String The return code

getCicsRc

public int getCicsRc()
Gets the CICS return code set in this object.

Returns:
int The return code

getCicsRcString

public java.lang.String getCicsRcString()
Gets the CICS return code set in this object and returns it as a String.

The String returned is the name of the appropriate Java constant e.g. 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 may have more than one meaning the String returned is a concatenation of the return codes. The two concatenated Strings are: ESI_ERR_NULL_OLD_PASSWORD_OR_ESI_ERR_NULL_PASSWORD.

Returns:
String The return code

getCallType

public int getCallType()
This method returns the Call_Type field of this ESIRequest object. This will either be the enumerated types ESI_VERIFY_PASSWORD or ESI_CHANGE_PASSWORD.

Returns:
int The Call_Type

getCallTypeString

public java.lang.String getCallTypeString()
This method returns a String describing the Call_Type field of this ESIRequest object.

The String returned is the name of the appropriate Java constant either ESI_VERIFY_PASSWORD or ESI_CHANGE_PASSWORD

Returns:
String The Call_Type as a String

setUserid

public void setUserid(java.lang.String strUserid)
               throws java.lang.IllegalArgumentException
Set the user ID for this object. If the user ID is greater than 10 characters then an IllegalArgumentException is thrown.

Parameters:
strUserid - String The user ID
Throws:
java.lang.IllegalArgumentException - if the parameter value is greater than 10 characters

setCurrentPassword

public void setCurrentPassword(java.lang.String strPassword)
                        throws java.lang.IllegalArgumentException
Set the current password for this object. If the password is greater than 10 characters then an IllegalArgumentException is thrown.

Parameters:
strPassword - String The current password
Throws:
java.lang.IllegalArgumentException - if the parameter value is greater than 10 characters

setNewPassword

public void setNewPassword(java.lang.String strPassword)
                    throws java.lang.IllegalArgumentException
Set the new password for this object. If the new password is greater than 10 characters then an IllegalArgumentException is thrown.

Parameters:
strPassword - String The new password
Throws:
java.lang.IllegalArgumentException - if the parameter value is greater than 10 characters

setServer

public void setServer(java.lang.String strServer)
               throws java.lang.IllegalArgumentException
Sets the server to be used for this object. If the server name specified is longer than 8 characters then an IllegalArgumentException is thrown. The default server name defined in the gateway is used if this method is not invoked or an empty string is supplied.

Parameters:
strServer - String The server
Throws:
java.lang.IllegalArgumentException - if the parameter value is greater than 8 characters

verifyPassword

public void verifyPassword()
Sets the ESI request object to be a Verify Password Request.


changePassword

public void changePassword()
Sets the ESI request object to be a Change Password Request.


verifyPassword

public static ESIRequest verifyPassword(java.lang.String strUserid,
                                        java.lang.String strCurrentPassword,
                                        java.lang.String strServer)
This method returns a new ESI Request object which can be used to invoke a verifyPassword request. An IllegalArgument exception will be thrown if the userid or password are greater than 10 characters or the Server is greater than 8 characters. If an empty string is supplied for the Server, the default server defined in the gateway is used.

Parameters:
strUserid - String The userid
strCurrentPassword - String The current Password
strServer - String The Server
Throws:
java.lang.IllegalArgumentException - if the parameters are too long

changePassword

public static ESIRequest changePassword(java.lang.String strUserid,
                                        java.lang.String strCurrentPassword,
                                        java.lang.String strNewPassword,
                                        java.lang.String strServer)
                                 throws java.lang.IllegalArgumentException
This method returns a new ESI Request object which can be used to invoke a changePassword request. An IllegalArgument exception will be thrown if the userid or passwords are greater than 10 characters or the Server is greater than 8 characters.

Parameters:
strUserid - String The userid
strCurrentPassword - String The current Password
strNewPassword - String The New Password
strServer - String The Server
Throws:
java.lang.IllegalArgumentException - if the parameters are too long

©Copyright IBM Corp. 1994, 2014
Legal