Class SoDeviceConfiguration
- java.lang.Object
-
- com.stepover.opensignatureapi.device.SoDeviceConfiguration
-
- All Implemented Interfaces:
MetaInfoField
public class SoDeviceConfiguration extends java.lang.Object implements MetaInfoField
the configuration class used by the configuration message to configure the signature device
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SoDeviceConfiguration.DeviceDisconnectCallback
called when the device s disconnectedstatic interface
SoDeviceConfiguration.SignatureButtonsListener
called when a button is pressed during signingstatic interface
SoDeviceConfiguration.SignatureCancelCallback
called when the signature is canceled (hash dialog, windows bridge)static interface
SoDeviceConfiguration.SignatureHashCallback
called when the hash dialog is displayed on the signature devicestatic interface
SoDeviceConfiguration.SignatureRepeatCallback
called when the signature is repeated (hash dialog, windows bridge)static interface
SoDeviceConfiguration.StartSigningCallback
celled when the green start signing button is pressed in document viewing mode
-
Field Summary
Fields Modifier and Type Field Description static int
DISPLAY_ROTATION_0_DEGREES
The Constant DISPLAY_ROTATION_0_DEGREES.static int
DISPLAY_ROTATION_180_DEGREES
The Constant DISPLAY_ROTATION_180_DEGREES.static int
DISPLAY_ROTATION_PAD_MODE
The Constant DISPLAY_ROTATION_PAD_MODE.protected boolean
emulationMode
The emulation mode.protected java.util.logging.Logger
log
The log.static int
PADMODE_DOCUMENT_VIEWING
The Constant PADMODE_DOCUMENT_VIEWING.static int
PADMODE_MANUFACTURER_LOGO
The Constant PADMODE_MANUFACTURER_LOGO.static int
PADMODE_NONE
The Constant PADMODE_NONE.protected int
padmodeAfterSigning
The padmode after signing.java.lang.String
signatureName
The signature name.java.lang.String
signatureReason
The signature reason.protected int
signingTimeout
The signing timeout.protected AbstractSignTask
signTask
The signing task.protected boolean
useDocumentViewingMode
The use document viewing mode.
-
Constructor Summary
Constructors Constructor Description SoDeviceConfiguration()
Instantiates a new so device configuration.SoDeviceConfiguration(int padmodeAfterSigning, int signingTimeout, boolean useDocumentViewingMode, boolean emulationMode, AbstractSignTask signTask)
Instantiates a new So device configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCertificateAlias()
Gets the certificate alias.java.lang.String
getCertificatePassword()
Gets the certificate password.java.io.DataInputStream
getCertificatePkcs12()
Gets the certificate pkcs12.SoDeviceConfiguration.DeviceDisconnectCallback
getDeviceDisconnectCallback()
Gets device disconnect callback.java.lang.Integer
getDocViewInitialZoom()
Gets the doc view initial zoom.int
getPadmodeAfterSigning()
Gets the padmode after signing.byte[]
getPreliminaryDocHash()
Gets the preliminary doc hash.int
getResetDisplayRotation()
Gets the reset display rotation.SoDeviceConfiguration.SignatureButtonsListener
getSignatureButtonsListener()
Gets signature buttons listener.SoDeviceConfiguration.SignatureCancelCallback
getSignatureCancelCallback()
Gets the signature cancel callback.java.lang.Integer
getSignatureFieldSizeInPercent()
Gets signature field size in percent.SoDeviceConfiguration.SignatureHashCallback
getSignatureHashCallback()
Gets the signature hash callback.java.lang.String
getSignatureLocation()
Gets the signature location.java.lang.String
getSignatureName()
Gets the signature name.java.lang.String
getSignatureReason()
Gets the signature reason.SoDeviceConfiguration.SignatureRepeatCallback
getSignatureRepeatCallback()
Gets the signature repeat callback.int
getSigningTimeout()
Gets the signing timeout.AbstractSignTask
getSignTask()
Gets the sign task.SoDeviceConfiguration.StartSigningCallback
getStartSigningCallback()
Gets the start signing callback.java.lang.String
getType()
Returns an unique identifierboolean
isDeriveCertificate()
Checks if is derivate certificate.boolean
isEmulationMode()
Checks if is emulation mode.boolean
isShowButtonsDuringSignature()
Is show buttons during signature boolean.boolean
isShowNameAndDate()
Checks if is show name and date.boolean
isUseDocumentViewingMode()
Checks if is use document viewing mode.void
setCertificateAlias(java.lang.String certificateAlias)
Sets the certificate alias.void
setCertificatePassword(java.lang.String certificatePassword)
Sets the certificate password.void
setCertificatePkcs12(java.io.DataInputStream certificatePkcs12)
Sets the certificate pkcs12.void
setDeriveCertificate(boolean deriveCertificate)
Sets the derivate certificate.void
setDeviceDisconnectCallback(SoDeviceConfiguration.DeviceDisconnectCallback deviceDisconnectCallback)
Sets device disconnect callback.void
setDocViewInitialZoom(java.lang.Integer docViewInitialZoom)
Sets the doc view initial zoom.void
setEmulationMode(boolean emulationMode)
Sets the emulation mode.void
setPadmodeAfterSigning(int padmodeAfterSigning)
Sets the padmode after signing.void
setPreliminaryDocHash(byte[] preliminaryDocHash)
Sets the preliminary doc hash.void
setResetDisplayRotation(int resetDisplayRotation)
Sets the reset display rotation.void
setShowButtonsDuringSignature(boolean showButtonsDuringSignature)
Sets show buttons during signature.void
setShowNameAndDate(boolean showNameAndDate)
Sets the show name and date.void
setSignatureButtonsListener(SoDeviceConfiguration.SignatureButtonsListener signatureButtonsListener)
Sets signature buttons listener.void
setSignatureCancelCallback(SoDeviceConfiguration.SignatureCancelCallback signatureCancelCallback)
Sets the signature cancel callback.void
setSignatureFieldSizeInPercent(java.lang.Integer signatureFieldSizeInPercent)
Sets signature field size in percent.void
setSignatureHashCallback(SoDeviceConfiguration.SignatureHashCallback signatureHashCallback)
Sets the signature hash callback.void
setSignatureLocation(java.lang.String signatureLocation)
Sets the signature location.void
setSignatureName(java.lang.String signatureName)
Sets the signature name.void
setSignatureReason(java.lang.String signatureReason)
Sets the signature reason.void
setSignatureRepeatCallback(SoDeviceConfiguration.SignatureRepeatCallback signatureRepeatCallback)
Sets the signature repeat callback.void
setSigningTimeout(int signingTimeout)
Sets the signing timeout.void
setSignTask(AbstractSignTask signTask)
Sets the sign task.void
setStartSigningCallback(SoDeviceConfiguration.StartSigningCallback startSigningCallback)
Sets the start signing callback.void
setUseDocumentViewingMode(boolean useDocumentViewingMode)
Sets the use document viewing mode.
-
-
-
Field Detail
-
log
protected java.util.logging.Logger log
The log.
-
PADMODE_NONE
public static final int PADMODE_NONE
The Constant PADMODE_NONE.- See Also:
- Constant Field Values
-
PADMODE_MANUFACTURER_LOGO
public static final int PADMODE_MANUFACTURER_LOGO
The Constant PADMODE_MANUFACTURER_LOGO.- See Also:
- Constant Field Values
-
PADMODE_DOCUMENT_VIEWING
public static final int PADMODE_DOCUMENT_VIEWING
The Constant PADMODE_DOCUMENT_VIEWING.- See Also:
- Constant Field Values
-
DISPLAY_ROTATION_0_DEGREES
public static final int DISPLAY_ROTATION_0_DEGREES
The Constant DISPLAY_ROTATION_0_DEGREES.- See Also:
- Constant Field Values
-
DISPLAY_ROTATION_180_DEGREES
public static final int DISPLAY_ROTATION_180_DEGREES
The Constant DISPLAY_ROTATION_180_DEGREES.- See Also:
- Constant Field Values
-
DISPLAY_ROTATION_PAD_MODE
public static final int DISPLAY_ROTATION_PAD_MODE
The Constant DISPLAY_ROTATION_PAD_MODE.- See Also:
- Constant Field Values
-
padmodeAfterSigning
protected int padmodeAfterSigning
The padmode after signing.
-
signingTimeout
protected int signingTimeout
The signing timeout.
-
emulationMode
protected boolean emulationMode
The emulation mode.
-
useDocumentViewingMode
protected boolean useDocumentViewingMode
The use document viewing mode.
-
signTask
protected AbstractSignTask signTask
The signing task.
-
signatureName
public java.lang.String signatureName
The signature name.
-
signatureReason
public java.lang.String signatureReason
The signature reason.
-
-
Constructor Detail
-
SoDeviceConfiguration
public SoDeviceConfiguration()
Instantiates a new so device configuration.
-
SoDeviceConfiguration
public SoDeviceConfiguration(int padmodeAfterSigning, int signingTimeout, boolean useDocumentViewingMode, boolean emulationMode, AbstractSignTask signTask)
Instantiates a new So device configuration.- Parameters:
padmodeAfterSigning
- the padmode after signingsigningTimeout
- the signing timeoutuseDocumentViewingMode
- the use document viewing modeemulationMode
- the emulation modesignTask
- the sign task
-
-
Method Detail
-
getPadmodeAfterSigning
public int getPadmodeAfterSigning()
Gets the padmode after signing.- Returns:
- the padmode after signing
-
setPadmodeAfterSigning
public void setPadmodeAfterSigning(int padmodeAfterSigning)
Sets the padmode after signing.- Parameters:
padmodeAfterSigning
- the new padmode after signing
-
getSigningTimeout
public int getSigningTimeout()
Gets the signing timeout.- Returns:
- the signing timeout
-
setSigningTimeout
public void setSigningTimeout(int signingTimeout)
Sets the signing timeout.- Parameters:
signingTimeout
- the new signing timeout
-
isEmulationMode
public boolean isEmulationMode()
Checks if is emulation mode.- Returns:
- true, if is emulation mode
-
setEmulationMode
public void setEmulationMode(boolean emulationMode)
Sets the emulation mode.- Parameters:
emulationMode
- the new emulation mode
-
getSignatureHashCallback
public SoDeviceConfiguration.SignatureHashCallback getSignatureHashCallback()
Gets the signature hash callback.- Returns:
- the signature hash callback
-
setSignatureHashCallback
public void setSignatureHashCallback(SoDeviceConfiguration.SignatureHashCallback signatureHashCallback)
Sets the signature hash callback.- Parameters:
signatureHashCallback
- the new signature hash callback
-
getSignatureCancelCallback
public SoDeviceConfiguration.SignatureCancelCallback getSignatureCancelCallback()
Gets the signature cancel callback.- Returns:
- the signature cancel callback
-
setSignatureCancelCallback
public void setSignatureCancelCallback(SoDeviceConfiguration.SignatureCancelCallback signatureCancelCallback)
Sets the signature cancel callback.- Parameters:
signatureCancelCallback
- the new signature cancel callback
-
getSignatureRepeatCallback
public SoDeviceConfiguration.SignatureRepeatCallback getSignatureRepeatCallback()
Gets the signature repeat callback.- Returns:
- the signature repeat callback
-
setSignatureRepeatCallback
public void setSignatureRepeatCallback(SoDeviceConfiguration.SignatureRepeatCallback signatureRepeatCallback)
Sets the signature repeat callback.- Parameters:
signatureRepeatCallback
- the new signature repeat callback
-
isUseDocumentViewingMode
public boolean isUseDocumentViewingMode()
Checks if is use document viewing mode.- Returns:
- true, if is use document viewing mode
-
setUseDocumentViewingMode
public void setUseDocumentViewingMode(boolean useDocumentViewingMode)
Sets the use document viewing mode.- Parameters:
useDocumentViewingMode
- the new use document viewing mode
-
getSignTask
public AbstractSignTask getSignTask()
Gets the sign task.- Returns:
- the sign task
-
setSignTask
public void setSignTask(AbstractSignTask signTask)
Sets the sign task.- Parameters:
signTask
- the new sign task
-
getSignatureName
public java.lang.String getSignatureName()
Gets the signature name.- Returns:
- the signature name
-
setSignatureName
public void setSignatureName(java.lang.String signatureName)
Sets the signature name.- Parameters:
signatureName
- the new signature name
-
getSignatureReason
public java.lang.String getSignatureReason()
Gets the signature reason.- Returns:
- the signature reason
-
setSignatureReason
public void setSignatureReason(java.lang.String signatureReason)
Sets the signature reason.- Parameters:
signatureReason
- the new signature reason
-
getSignatureLocation
public java.lang.String getSignatureLocation()
Gets the signature location.- Returns:
- the signature location
-
setSignatureLocation
public void setSignatureLocation(java.lang.String signatureLocation)
Sets the signature location.- Parameters:
signatureLocation
- the new signature location
-
isShowNameAndDate
public boolean isShowNameAndDate()
Checks if is show name and date.- Returns:
- true, if is show name and date
-
setShowNameAndDate
public void setShowNameAndDate(boolean showNameAndDate)
Sets the show name and date.- Parameters:
showNameAndDate
- the new show name and date
-
setCertificatePkcs12
public void setCertificatePkcs12(java.io.DataInputStream certificatePkcs12)
Sets the certificate pkcs12.- Parameters:
certificatePkcs12
- the new certificate pkcs12
-
getCertificatePkcs12
public java.io.DataInputStream getCertificatePkcs12()
Gets the certificate pkcs12.- Returns:
- the certificate pkcs12
-
setCertificatePassword
public void setCertificatePassword(java.lang.String certificatePassword)
Sets the certificate password.- Parameters:
certificatePassword
- the new certificate password
-
getCertificatePassword
public java.lang.String getCertificatePassword()
Gets the certificate password.- Returns:
- the certificate password
-
setCertificateAlias
public void setCertificateAlias(java.lang.String certificateAlias)
Sets the certificate alias.- Parameters:
certificateAlias
- the new certificate alias
-
getCertificateAlias
public java.lang.String getCertificateAlias()
Gets the certificate alias.- Returns:
- the certificate alias
-
isDeriveCertificate
public boolean isDeriveCertificate()
Checks if is derivate certificate.- Returns:
- true, if is derivate certificate
-
setDeriveCertificate
public void setDeriveCertificate(boolean deriveCertificate)
Sets the derivate certificate.- Parameters:
deriveCertificate
- the derive certificate
-
getType
public java.lang.String getType()
Description copied from interface:MetaInfoField
Returns an unique identifier- Specified by:
getType
in interfaceMetaInfoField
- Returns:
-
getResetDisplayRotation
public int getResetDisplayRotation()
Gets the reset display rotation.- Returns:
- the reset display rotation
-
setResetDisplayRotation
public void setResetDisplayRotation(int resetDisplayRotation)
Sets the reset display rotation.- Parameters:
resetDisplayRotation
- the new reset display rotation
-
getPreliminaryDocHash
public byte[] getPreliminaryDocHash()
Gets the preliminary doc hash.- Returns:
- the preliminary doc hash
-
setPreliminaryDocHash
public void setPreliminaryDocHash(byte[] preliminaryDocHash)
Sets the preliminary doc hash.- Parameters:
preliminaryDocHash
- the new preliminary doc hash
-
getStartSigningCallback
public SoDeviceConfiguration.StartSigningCallback getStartSigningCallback()
Gets the start signing callback.- Returns:
- the start signing callback
-
setStartSigningCallback
public void setStartSigningCallback(SoDeviceConfiguration.StartSigningCallback startSigningCallback)
Sets the start signing callback.- Parameters:
startSigningCallback
- the new start signing callback
-
getDocViewInitialZoom
public java.lang.Integer getDocViewInitialZoom()
Gets the doc view initial zoom.- Returns:
- the doc view initial zoom
-
setDocViewInitialZoom
public void setDocViewInitialZoom(java.lang.Integer docViewInitialZoom)
Sets the doc view initial zoom.- Parameters:
docViewInitialZoom
- the new doc view initial zoom
-
isShowButtonsDuringSignature
public boolean isShowButtonsDuringSignature()
Is show buttons during signature boolean.- Returns:
- the boolean
-
setShowButtonsDuringSignature
public void setShowButtonsDuringSignature(boolean showButtonsDuringSignature)
Sets show buttons during signature.- Parameters:
showButtonsDuringSignature
- the show buttons during signature
-
getSignatureButtonsListener
public SoDeviceConfiguration.SignatureButtonsListener getSignatureButtonsListener()
Gets signature buttons listener.- Returns:
- the signature buttons listener
-
setSignatureButtonsListener
public void setSignatureButtonsListener(SoDeviceConfiguration.SignatureButtonsListener signatureButtonsListener)
Sets signature buttons listener.- Parameters:
signatureButtonsListener
- the signature buttons listener
-
getSignatureFieldSizeInPercent
public java.lang.Integer getSignatureFieldSizeInPercent()
Gets signature field size in percent.- Returns:
- the signature field size in percent
-
setSignatureFieldSizeInPercent
public void setSignatureFieldSizeInPercent(java.lang.Integer signatureFieldSizeInPercent)
Sets signature field size in percent.- Parameters:
signatureFieldSizeInPercent
- the signature field size in percent
-
getDeviceDisconnectCallback
public SoDeviceConfiguration.DeviceDisconnectCallback getDeviceDisconnectCallback()
Gets device disconnect callback.- Returns:
- the device disconnect callback
-
setDeviceDisconnectCallback
public void setDeviceDisconnectCallback(SoDeviceConfiguration.DeviceDisconnectCallback deviceDisconnectCallback)
Sets device disconnect callback.- Parameters:
deviceDisconnectCallback
- the device disconnect callback
-
-