com.ibm.ctg.client

Class 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 must be flowed to the Gateway using the JavaGateway.flow(GatewayRequest) method.

    ESI requests support two call types:

    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.

    See Also:
    GatewayRequest
    • 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

        @Deprecated
        public static final 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.

        See Also:
        Constant Field Values
      • ESI_SYSTEM_MAX

        public static final int ESI_SYSTEM_MAX
        Maximum number of characters in server name.
        See Also:
        Constant Field Values
      • ESI_VERIFY_PASSWORD

        public static final int ESI_VERIFY_PASSWORD
        Call type for a request that verifies a password or password phrase.
        See Also:
        Constant Field Values
      • ESI_CHANGE_PASSWORD

        public static final int ESI_CHANGE_PASSWORD
        Call type for a request that changes a password or password phrase.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ESIRequest

        public ESIRequest()
        The default constructor that leaves all the values set to their defaults.

        You must 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()
        Returns the current user ID as a String.

        Returns:
        String The current user ID.
      • getCurrentPassword

        public java.lang.String getCurrentPassword()
        Returns the current password or password phrase as a String.

        Returns:
        String The current password or password phrase.
      • getNewPassword

        public java.lang.String getNewPassword()
        Returns the new password or password phrase as a String. This is only set if you are using the changePassword() call.

        Returns:
        String The new password or password phrase.
      • getServer

        public java.lang.String getServer()
        Returns the server name as a String.

        Returns:
        String The server name.
      • getLastVerified

        public 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. This call returns information only 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()
        Returns the date/time of when the password or password phrase is due to expire on the server as a java.util.Calendar object. This call returns valid information only if 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.

        Returns:
        java.util.Calendar Expiry Information (null if no info)
      • passwordExpirySet

        public boolean passwordExpirySet()
        Returns a boolean value indicating whether the expiry field had been set.

        Returns:
        boolean true if the expiry field has been set, otherwise false.
      • getLastAccess

        public 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. This call returns information only if a successful verifyPassword or changePassword has been flowed, otherwise null is returned.

        Returns:
        java.util.Calendar Last Access Information (null if no info)
      • getInvalidCount

        public 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. A successful password change request always returns 0. This call returns information only 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()
        Returns the return code set in this ESI Request by the Gateway as an int. 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 0, no errors have occurred.
        Returns:
        int The return code
      • getRcString

        public java.lang.String getRcString()
        Returns the return code set in this ESI Request as a String. If a Gateway error code is set, the string equivalent is returned. However if there is no Gateway error code, then if there is a CICS return code, the CICS return code is returned as a String. If there is no error, the string "ESI_NO_ERROR" is returned.
        Returns:
        String The return code
      • getCicsRc

        public int getCicsRc()
        Returns the CICS return code set in this ESI Request as an int.
        Returns:
        int The return code
      • getCicsRcString

        public java.lang.String getCicsRcString()
        Returns the CICS return code set in this ESI Request as a String.

        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.

        Returns:
        String The return code
      • getCallType

        public int getCallType()
        Returns the Call_Type field of the ESI Request as an int. This is either the enumerated types ESI_VERIFY_PASSWORD or ESI_CHANGE_PASSWORD.
        Returns:
        int The Call_Type
      • getCallTypeString

        public java.lang.String getCallTypeString()
        Returns the Call_Type field of the ESI Request as a String. 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)
        Sets the user ID for the ESI request.
        Parameters:
        strUserid - String The user ID
      • setCurrentPassword

        public void setCurrentPassword(java.lang.String strPassword)
        Sets the current password or password phrase for the ESI Request.
        Parameters:
        strPassword - String The current password or password phrase
      • setNewPassword

        public void setNewPassword(java.lang.String strPassword)
        Sets the new password or password phrase for the ESI Request.
        Parameters:
        strPassword - String The new password or password phrase
      • setServer

        public void setServer(java.lang.String strServer)
        Sets the server name to be used for this ESI Request.
        Parameters:
        strServer - String The server
      • verifyPassword

        public void verifyPassword()
        Sets the call type of the ESI Request to be Verify Password. A Verify Password request can verify using a password or password phrase.
      • changePassword

        public void changePassword()
        Sets the call type of the ESI request to be Change Password. A Change Password request can change a password or a password phrase.
      • verifyPassword

        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.

        Parameters:
        strUserid - String The userid
        strCurrentPassword - String The current password or password phrase
        strServer - String The server
      • changePassword

        public 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.

        Parameters:
        strUserid - String The userid
        strCurrentPassword - String The current password or password phrase
        strNewPassword - String The new password or password phrase
        strServer - String The server
©Copyright IBM Corp. 1994, 2013
Legal