Interface ToolkitTestRegistry

  • All Superinterfaces:
    ToolkitRegistry

    public interface ToolkitTestRegistry
    extends ToolkitRegistry

    The ToolkitTestRegistry interface offers basic services and methods to allow any Toolkit Applet to register it's configuration (supported test events), during the installation phase and also possible to change it, during all the applet life time. Each Toolkit Applet will get a reference to its registry entry with the static method getEntry from the ToolkitRegistrySystem class. The initial state of all events is cleared. The registry entry object implementing the ToolkitTestRegistry interface is a permanent JCRE entry point object.

    All updates performed on the ToolkitTestRegistry are atomic. The ToolkitTestRegistry update operations are subject to atomic commit capacity limitations. If the commit capacity is exceeded, no update is performed and a TransactionException is thrown.

    • Method Detail

      • registerTestEventFileRead

        void registerTestEventFileRead​(short fileEvent,
                                       byte[] baFileList,
                                       short sOffset1,
                                       short sLength1,
                                       byte[] baADFAid,
                                       short sOffset2,
                                       byte bLength2)
                                throws ToolkitException,
                                       java.lang.NullPointerException,
                                       java.lang.ArrayIndexOutOfBoundsException,
                                       javacard.framework.TransactionException,
                                       javacard.framework.SystemException
        Register a ToolkitTestRegistry object to the EVENT_TEST_EXTERNAL_FILE_READ for a file list.
        Parameters:
        fileEvent - Indicates the File event to be registered
        baFileList - Array containing the file list. The baFileList shall be coded as the value part of the COMPREHENSION-TLV File List defined in TS 102 223 If the path provided indicates a dedicated file (DF), the Applet shall be triggered when an elementary file that is an immediate child of the DF is updated.
        sOffset1 - offset in the baFileList buffer for event registration
        sLength1 - length in the baFileList buffer for event registration
        baADFAid - array containing the AID of the ADF. The baADFAid shall be coded as the value part of the COMPREHENSION-TLV AID defined in TS 102 223. If baADFAid is null, it indicates that the file is located under the MF and not located under an ADF
        sOffset2 - offset in the baADFAid buffer for event registration
        bLength2 - length in the baADFAid buffer for event registration
        Throws:
        java.lang.NullPointerException - if baFileList is null
        java.lang.ArrayIndexOutOfBoundsException - if sOffset or sLength or both would cause access outside array bounds
        javacard.framework.TransactionException - if the operation would cause the commit capacity to be exceeded
        ToolkitException - Can appear with following reason code...
        • EVENT_NOT_ALLOWED if the event is one of the following events: EVENT_MENU_SELECTION, EVENT_MENU_SELECTION_HELP_REQUEST, EVENT_TIMER_EXPIRATION, EVENT_STATUS_COMMAND
        • EVENT_NOT_SUPPORTED if the event is not one of the following event: EVENT_TEST_EXTERNAL_FILE_READ.
        javacard.framework.SystemException - Can appear with following reason code...
        • ILLEGAL_VALUE if bLength2 is not in the range of 5 - 16 bytes.
      • deregisterTestEventFileRead

        void deregisterTestEventFileRead​(short fileEvent,
                                         byte[] baFileList,
                                         short sOffset1,
                                         short sLength1,
                                         byte[] baADFAid,
                                         short sOffset2,
                                         byte bLength2)
                                  throws ToolkitException,
                                         java.lang.NullPointerException,
                                         java.lang.ArrayIndexOutOfBoundsException,
                                         javacard.framework.TransactionException,
                                         javacard.framework.SystemException
        Deregister a ToolkitTestRegistry object from the EVENT_EXTERNAL_FILE_READ for a file list.
        Parameters:
        fileEvent - Indicates the File event to be deregistered
        baFileList - Array containing the file list. The baFileList shall be coded as the value part of the COMPREHENSION-TLV File List defined in TS 102 223 If a file in baFileList is a dedicated file the deregistration shall not affect the monitoring of an elementary file within the dedicated file that was individually registered. If a file in baFileList is an elementary file the deregistration will not affect the monitoring of the parent dedicated file that was individually registered.
        sOffset1 - offset in the baFileList buffer for event registration
        sLength1 - Length in the baFileList buffer for event registration
        baADFAid - array containing the AID of the ADF. The baADFAid shall be coded as the value part of the COMPREHENSION-TLV AID defined in TS 102 223. If baADFAid is null, it indicates that the file is located under the MF and not located under an ADF .
        sOffset2 - offset in the baADFAid buffer for event registration
        bLength2 - length in the baADFAid buffer for event registration
        Throws:
        java.lang.NullPointerException - if baFileList is null
        java.lang.ArrayIndexOutOfBoundsException - if sOffset or sLength or both would cause access outside array bounds
        javacard.framework.TransactionException - if the operation would cause the commit capacity to be exceeded
        ToolkitException - Can appear with following reason code...
        • EVENT_NOT_ALLOWED if the event is one of the following events: EVENT_MENU_SELECTION, EVENT_MENU_SELECTION_HELP_REQUEST, EVENT_TIMER_EXPIRATION, EVENT_STATUS_COMMAND
        • EVENT_NOT_SUPPORTED if the event is not one of the following event: EVENT_TEST_EXTERNAL_FILE_READ.
        javacard.framework.SystemException - Can appear with following reason code...
        • ILLEGAL_VALUE if bLength2 is not in the range of 5 - 16 bytes.
      • registerTestEventRxApdu

        void registerTestEventRxApdu​(short event,
                                     byte[] baInsCode,
                                     short sOffset1,
                                     short sLength1)
                              throws ToolkitException,
                                     java.lang.NullPointerException,
                                     java.lang.ArrayIndexOutOfBoundsException,
                                     javacard.framework.TransactionException
        Register a ToolkitTestRegistry object to the EVENT_TEST_RX_APDU for an instruction code list. Example: include INS=78 (GET IDENTITY) and INS=88 (AUTHENTICATION)
        Parameters:
        event - Indicates event (EVENT_TEST_RX_APDU for an instruction code list. Example: include INS=78 (GET IDENTITY) and INS=88 (AUTHENTICATION)) to be registered
        baInsCode - Array containing the instruction code list. It shall be coded as a list of INS codes as defined in TS 102 221.
        sOffset1 - Offset in the baInsCode buffer for event registration
        sLength1 - length in the baInsCode buffer for event registration
        Throws:
        ToolkitException -
        • EVENT_NOT_SUPPORTEDif the event is not one of the following event: EVENT_TEST_RX_APDU.
        java.lang.NullPointerException - If baInsCode is null
        java.lang.ArrayIndexOutOfBoundsException - If sOffset or sLength or both would cause access outside array bounds
        javacard.framework.TransactionException - If the operation would cause the commit capacity to be exceeded
      • deregisterTestEventRxApdu

        void deregisterTestEventRxApdu​(short event,
                                       byte[] baInsCode,
                                       short sOffset1,
                                       short sLength1)
                                throws ToolkitException,
                                       java.lang.NullPointerException,
                                       java.lang.ArrayIndexOutOfBoundsException,
                                       javacard.framework.TransactionException
        Deregister a ToolkitTestRegistry object to the EVENT_TEST_RX_APDU for an instruction code list. Example: include INS=78 (GET IDENTITY) and INS=88 (AUTHENTICATION)
        Parameters:
        event - Indicates the event (EVENT_TEST_RX_APDU for an instruction code list. Example: include INS=78 (GET IDENTITY) and INS=88 (AUTHENTICATION)) to be deregistered
        baInsCode - Array containing the instruction code list. It shall be coded as a list of INS codes as defined in TS 102 221.
        sOffset1 - Offset in the baInsCode buffer for event registration
        sLength1 - Length in the baInsCode buffer for event registration
        Throws:
        ToolkitException -
        • EVENT_NOT_SUPPORTEDif the event is not one of the following event: EVENT_TEST_RX_APDU.
        java.lang.NullPointerException - If baInsCode is null
        java.lang.ArrayIndexOutOfBoundsException - If sOffset or sLength or both would cause access outside array bounds
        javacard.framework.TransactionException - If the operation would cause the commit capacity to be exceeded