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 interfaceSoDeviceConfiguration.DeviceDisconnectCallbackcalled when the device s disconnectedstatic interfaceSoDeviceConfiguration.SignatureButtonsListenercalled when a button is pressed during signingstatic interfaceSoDeviceConfiguration.SignatureCancelCallbackcalled when the signature is canceled (hash dialog, windows bridge)static interfaceSoDeviceConfiguration.SignatureHashCallbackcalled when the hash dialog is displayed on the signature devicestatic interfaceSoDeviceConfiguration.SignatureRepeatCallbackcalled when the signature is repeated (hash dialog, windows bridge)static interfaceSoDeviceConfiguration.StartSigningCallbackcelled when the green start signing button is pressed in document viewing mode
-
Field Summary
Fields Modifier and Type Field Description static intDISPLAY_ROTATION_0_DEGREESThe Constant DISPLAY_ROTATION_0_DEGREES.static intDISPLAY_ROTATION_180_DEGREESThe Constant DISPLAY_ROTATION_180_DEGREES.static intDISPLAY_ROTATION_PAD_MODEThe Constant DISPLAY_ROTATION_PAD_MODE.protected booleanemulationModeThe emulation mode.protected java.util.logging.LoggerlogThe log.static intPADMODE_DOCUMENT_VIEWINGThe Constant PADMODE_DOCUMENT_VIEWING.static intPADMODE_MANUFACTURER_LOGOThe Constant PADMODE_MANUFACTURER_LOGO.static intPADMODE_NONEThe Constant PADMODE_NONE.protected intpadmodeAfterSigningThe padmode after signing.java.lang.StringsignatureNameThe signature name.java.lang.StringsignatureReasonThe signature reason.protected intsigningTimeoutThe signing timeout.protected AbstractSignTasksignTaskThe signing task.protected booleanuseDocumentViewingModeThe 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.StringgetCertificateAlias()Gets the certificate alias.java.lang.StringgetCertificatePassword()Gets the certificate password.java.io.DataInputStreamgetCertificatePkcs12()Gets the certificate pkcs12.SoDeviceConfiguration.DeviceDisconnectCallbackgetDeviceDisconnectCallback()Gets device disconnect callback.java.lang.IntegergetDocViewInitialZoom()Gets the doc view initial zoom.intgetPadmodeAfterSigning()Gets the padmode after signing.byte[]getPreliminaryDocHash()Gets the preliminary doc hash.intgetResetDisplayRotation()Gets the reset display rotation.SoDeviceConfiguration.SignatureButtonsListenergetSignatureButtonsListener()Gets signature buttons listener.SoDeviceConfiguration.SignatureCancelCallbackgetSignatureCancelCallback()Gets the signature cancel callback.java.lang.IntegergetSignatureFieldSizeInPercent()Gets signature field size in percent.SoDeviceConfiguration.SignatureHashCallbackgetSignatureHashCallback()Gets the signature hash callback.java.lang.StringgetSignatureLocation()Gets the signature location.java.lang.StringgetSignatureName()Gets the signature name.java.lang.StringgetSignatureReason()Gets the signature reason.SoDeviceConfiguration.SignatureRepeatCallbackgetSignatureRepeatCallback()Gets the signature repeat callback.intgetSigningTimeout()Gets the signing timeout.AbstractSignTaskgetSignTask()Gets the sign task.SoDeviceConfiguration.StartSigningCallbackgetStartSigningCallback()Gets the start signing callback.java.lang.StringgetType()Returns an unique identifierbooleanisDeriveCertificate()Checks if is derivate certificate.booleanisEmulationMode()Checks if is emulation mode.booleanisShowButtonsDuringSignature()Is show buttons during signature boolean.booleanisShowNameAndDate()Checks if is show name and date.booleanisUseDocumentViewingMode()Checks if is use document viewing mode.voidsetCertificateAlias(java.lang.String certificateAlias)Sets the certificate alias.voidsetCertificatePassword(java.lang.String certificatePassword)Sets the certificate password.voidsetCertificatePkcs12(java.io.DataInputStream certificatePkcs12)Sets the certificate pkcs12.voidsetDeriveCertificate(boolean deriveCertificate)Sets the derivate certificate.voidsetDeviceDisconnectCallback(SoDeviceConfiguration.DeviceDisconnectCallback deviceDisconnectCallback)Sets device disconnect callback.voidsetDocViewInitialZoom(java.lang.Integer docViewInitialZoom)Sets the doc view initial zoom.voidsetEmulationMode(boolean emulationMode)Sets the emulation mode.voidsetPadmodeAfterSigning(int padmodeAfterSigning)Sets the padmode after signing.voidsetPreliminaryDocHash(byte[] preliminaryDocHash)Sets the preliminary doc hash.voidsetResetDisplayRotation(int resetDisplayRotation)Sets the reset display rotation.voidsetShowButtonsDuringSignature(boolean showButtonsDuringSignature)Sets show buttons during signature.voidsetShowNameAndDate(boolean showNameAndDate)Sets the show name and date.voidsetSignatureButtonsListener(SoDeviceConfiguration.SignatureButtonsListener signatureButtonsListener)Sets signature buttons listener.voidsetSignatureCancelCallback(SoDeviceConfiguration.SignatureCancelCallback signatureCancelCallback)Sets the signature cancel callback.voidsetSignatureFieldSizeInPercent(java.lang.Integer signatureFieldSizeInPercent)Sets signature field size in percent.voidsetSignatureHashCallback(SoDeviceConfiguration.SignatureHashCallback signatureHashCallback)Sets the signature hash callback.voidsetSignatureLocation(java.lang.String signatureLocation)Sets the signature location.voidsetSignatureName(java.lang.String signatureName)Sets the signature name.voidsetSignatureReason(java.lang.String signatureReason)Sets the signature reason.voidsetSignatureRepeatCallback(SoDeviceConfiguration.SignatureRepeatCallback signatureRepeatCallback)Sets the signature repeat callback.voidsetSigningTimeout(int signingTimeout)Sets the signing timeout.voidsetSignTask(AbstractSignTask signTask)Sets the sign task.voidsetStartSigningCallback(SoDeviceConfiguration.StartSigningCallback startSigningCallback)Sets the start signing callback.voidsetUseDocumentViewingMode(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:MetaInfoFieldReturns an unique identifier- Specified by:
getTypein 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
-
-