Class PTEID_SigningDeviceFactory

java.lang.Object
pt.gov.cartaodecidadao.PTEID_SigningDeviceFactory

public class PTEID_SigningDeviceFactory extends Object
Singleton class - Factory used to obtain signing devices.
Optionally, opens a dialog to let user choose signing device type.
Since:
3.8.0
  • Method Details

    • delete

      public void delete()
    • instance

      public static PTEID_SigningDeviceFactory instance() throws PTEID_Exception
      Return the singleton object
      Throws:
      PTEID_Exception
    • getSigningDevice

      public PTEID_SigningDevice getSigningDevice(boolean allowCC, boolean allowCMD) throws PTEID_Exception
      Obtain a signing device.

      At least one of the parameters must be true. Otherwise, PTEID_ExBadUsage is thrown.
      If multiple types were allowed, this method opens a dialog to choose the signing device type.

      Parameters:
      allowCC - allow to retrieve handle to PTEID_EIDCard
      allowCMD - allow to retrieve handle to PTEID_CMDSignatureDevice
      Throws:
      PTEID_Exception
    • getSigningDevice

      public PTEID_SigningDevice getSigningDevice(boolean allowCC) throws PTEID_Exception
      Obtain a signing device.

      At least one of the parameters must be true. Otherwise, PTEID_ExBadUsage is thrown.
      If multiple types were allowed, this method opens a dialog to choose the signing device type.

      Parameters:
      allowCC - allow to retrieve handle to PTEID_EIDCard
      Throws:
      PTEID_Exception
    • getSigningDevice

      public PTEID_SigningDevice getSigningDevice() throws PTEID_Exception
      Obtain a signing device.

      At least one of the parameters must be true. Otherwise, PTEID_ExBadUsage is thrown.
      If multiple types were allowed, this method opens a dialog to choose the signing device type.


      Throws:
      PTEID_Exception