Class TerminalSettings
- java.lang.Object
-
- com.six.timapi.TerminalSettings
-
public class TerminalSettings extends Object
The per terminal configuration can be done on two ways:
- In a configuration file "TimApi.cfg"
- With the API TerminalSettings done from the application.
TIMApi reads the configuration file when the first Terminal instance is created.
The class TerminalSettings allows the setting from Application. Each instance of the Terminal class is initialized using an own instance of TerminalSettings containing the configuration relevant for this terminal. The Terminal instances read only the configuration file section with the matching terminal identifier. Multiple terminals can be configured as long as their terminal identifier are different.
All configuration has to be done before an instance of TerminalSettings is used to create a Terminal class instance.
Defines also automatic behavior for interacting with EFT terminals. By default all automatic behaviors are enabled.
-
-
Field Summary
Fields Modifier and Type Field Description static String
pathTimApiCfg
Path to configuration file to load.
-
Constructor Summary
Constructors Constructor Description TerminalSettings()
Create terminal settings loading the configuration from the global section in the configuration file.TerminalSettings(TerminalSettings settings)
Create copy of terminal settings.TerminalSettings(InputStreamReader inputReader)
Create terminal settings loading the configuration from the global section in the configuration file.TerminalSettings(InputStreamReader inputReader, String deviceId)
Create terminal settings loading the configuration from the device specific section in the configuration file.TerminalSettings(String deviceId)
Create terminal settings loading the configuration from the device specific section in the configuration file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBroadcastInterface()
Interface to use for broadcasting or empty string to broadcast on all available interfaces.int
getCardInsertionTimeout()
Timeout in seconds the terminal waits for a card to be inserted before canceling an open transaction request.int
getCardRemovalTimeout()
Timeout in seconds the terminal waits for a card to be removed before requesting attendant interaction.int
getCommitTimeout()
Timeout in seconds the terminal waits until the technical auto-reversal is processed, if no commit received.int
getConnectionIPPort()
Listening Port of the EFT terminal in case of ConnectionMode OnFixIP.String
getConnectionIPString()
IP address of the EFT terminal in case of ConnectionMode OnFixIP.int
getConnectionListenIPPort()
Listening Port of ECR if listening.String
getConnectionListenIPString()
IP address of the ECR if listening.ConnectionMode
getConnectionMode()
Broadcast (default) or OnFixIP.EnumSet<Guides>
getGuides()
Required guides.String
getIntegratorId()
Integrator identifier.int
getLateCheckinTimeout()
This timeout indicates how long a terminal shall wait in seconds for an AmtAdjustment notification from the ECR in case of a late-checkin.String
getLogDir()
Defines where the Log File has to be generated.int
getLogFileCountPerArchive()
Number of log files to keep before per archive file.int
getLogRetainArchiveCount()
Number of log file archives to keep before deleting them.int
getLogRetainFileCount()
Number of log files to keep before archiving them.int
getManufacturerFlags()
Manufacturer flags.String
getOmnichannelAPIKey()
Omnichannel: Key for API access.String
getOmnichannelAPISecret()
Omnichannel: Secret key for API access.int
getOmnichannelHostTimeout()
Omnichannel: Timeout of Omnichannel host communication (in seconds).String
getOmnichannelHostURL()
Omnichannel: Host-URL (for example Ogone's Direct API URL).EnumSet<TransactionType>
getPreferOmniChannel()
Prefer OmniChannel for these functions.int
getProceedTimeout()
Timeout in seconds the terminal waits in WaitForProceed state for an additional function until an error is returned.ProtocolType
getProtocolType()
Protocol type.int
getQRCTimeout()
Timeout in seconds the terminal displays the loyalty QR code after a "StartCheckout" call before returning to its "Idle" screen.int
getRequestRepetition()
Number of send request repetitions or 0 to disable.String
getSaferpayBaseUrl()
Saferpay: Base URL.String
getSaferpayCredentials()
Saferpay: Base64 encoded user name + password.String
getSaferpayCustomerId()
Saferpay: Customer ID.String
getSaferpayTerminalId()
Saferpay: Terminal Id.int
getSIXmlRequestTimeout()
Timeout in seconds for SIXml request.String
getTerminalId()
Terminal ID to be broadcasted in case of ConnectionMode Broadcast.int
getWakeupTimeout()
Returns the timeout for terminal wake-up operations.int
hashCode()
boolean
isAllowClosedCardInsert()
Allow card to be inserted before activation.Boolean
isAutoCommit()
After executing the Transaction- function the API commits the transaction automatically.boolean
isAutoShiftManagement()
Shift management is handled automatically.boolean
isAutoShutterManagement()
Shutter management is handled automatically.boolean
isAutoSysInfo()
Automatically retrieves system information during logging in.boolean
isConnectionListen()
EFT connects to ECR instead of ECR connecting to EFT, which is the default way to connect.boolean
isDcc()
Dcc shall be supported.boolean
isEnabledKeepAlive()
Enable Keep-Alive handling.boolean
isFastNtfMode()
Enable fast notification mode.boolean
isFetchBrands()
Automatically retrieves application information during logging in.boolean
isPartialApproval()
Partial approval shall be supported.Boolean
isPartialCommit()
Allow partial commit.boolean
isPersistentState()
Enable persistent state if supported.boolean
isTipAllowed()
Tip is allowed for purchase transactions.void
setAllowClosedCardInsert(boolean allowClosedCardInsert)
Set if it is allowed to insert the card before activation.void
setAutoCommit(Boolean autoCommit)
After executing the Transaction- function the API commits the transaction automatically.void
setAutoShiftManagement(boolean autoShiftManagement)
Set if shift management is handled automatically.void
setAutoShutterManagement(boolean autoShutterManagement)
Set if shutter management is handled automatically.void
setAutoSysInfo(boolean autoSysInfo)
Automatically retrieves system information during logging in.void
setBroadcastInterface(String broadcastInterface)
Set interface to use for broadcasting or empty string to broadcast on all available interfaces.void
setCardInsertionTimeout(int timeout)
Set timeout in seconds the terminal waits for a card to be inserted before canceling an open transaction request.void
setCardRemovalTimeout(int timeout)
Set timeout in seconds the terminal waits for a card to be removed before requesting attendant interaction.void
setCommitTimeout(int timeout)
Set timeout in seconds the terminal waits until the technical auto-reversal is processed, if no commit received.void
setConnectionIPPort(int connectionIPPort)
Set listening Port of the EFT terminal in case of ConnectionMode OnFixIP.void
setConnectionIPString(String connectionIPString)
Set IP address of the EFT terminal in case of ConnectionMode OnFixIP.void
setConnectionListen(boolean connectionListen)
EFT connects to ECR instead of ECR connecting to EFT, which is the default way to connect.void
setConnectionListenIPPort(int connectionListenIPPort)
Set listening Port of ECR if listening.void
setConnectionListenIPString(String connectionListenIPString)
Set IP address of the ECR if listening.void
setConnectionMode(ConnectionMode connectionMode)
Set broadcast (default) or OnFixIP.void
setDcc(boolean dcc)
Set if Dcc shall be supported.void
setEnableKeepAlive(boolean enableKeepAlive)
Set if Keep-Alive handling is enabled.void
setFastNtfMode(boolean fastNtfMode)
Set enable fast notification mode.void
setFetchBrands(boolean fetchBrands)
Automatically retrieves application information during logging in.void
setGuides(EnumSet<Guides> guides)
Set required guides.void
setIntegratorId(String integratorId)
Set integrator identifier.void
setLateCheckinTimeout(int lateCheckinTimeout)
This timeout indicates how long a terminal shall wait in seconds for an AmtAdjustment notification from the ECR in case of a late-checkin.void
setLogDir(String logDir)
Set where the Log File has to be generated.void
setLogFileCountPerArchive(int logFileCountPerArchive)
Set number of log files to keep before per archive file.void
setLogRetainArchiveCount(int logRetainArchiveCount)
Set number of log file archives to keep before deleting them.void
setLogRetainFileCount(int logRetainFileCount)
Set number of log files to keep before archiving them.void
setManufacturerFlags(int manufacturerFlags)
Set manufacturer flags.void
setOmnichannelAPIKey(String omnichannelAPIKey)
Omnichannel: Key for API access.void
setOmnichannelAPISecret(String omnichannelAPISecret)
Omnichannel: Secret key for API access.void
setOmnichannelHostTimeout(int omnichannelHostTimeout)
Omnichannel: Timeout of Omnichannel host communication (in seconds).void
setOmnichannelHostURL(String omnichannelHostURL)
Omnichannel: Host-URL (for example Ogone's Direct API URL).void
setPartialApproval(boolean partialApproval)
Partial approval shall be supported.void
setPartialCommit(Boolean partialCommit)
Allow partial commit.void
setPersistentState(boolean persistentState)
Set enable persistent state if supported.void
setPreferOmniChannel(EnumSet<TransactionType> preferOmniChannel)
Set Prefer OmniChannel for these functions.void
setProceedTimeout(int timeout)
Set timeout in seconds the terminal waits in WaitForProceed state for an additional function until an error is returned.void
setProtocolType(ProtocolType protocolType)
Set protocol type.void
setQRCTimeout(int qrcTimeout)
Timeout in seconds the terminal displays the loyalty QR code after a "StartCheckout" call before returning to its "Idle" screen.void
setRequestRepetition(int requestRepetition)
Set number of send request repetitions or 0 to disable.void
setSaferpayBaseUrl(String baseUrl)
Saferpay: Set base URL.void
setSaferpayCredentials(String credentials)
Saferpay: Set Base64 encoded user name + password.void
setSaferpayCustomerId(String customerId)
Saferpay: Set customer ID.void
setSaferpayTerminalId(String terminalId)
Saferpay: Set terminal Id.void
setSIXmlRequestTimeout(int timeout)
Set timeout in seconds for SIXml request.void
setTerminalId(String terminalId)
Set terminal ID to be broadcasted in case of ConnectionMode Broadcast.void
setTipAllowed(boolean tipAllowed)
Set if tip is allowed for purchase transactions.void
setWakeupTimeout(int timeout)
Sets the timeout for terminal wake-up operations.String
toString()
String representation for debugging purpose.
-
-
-
Field Detail
-
pathTimApiCfg
public static String pathTimApiCfg
Path to configuration file to load. Default value is "TimApi.cfg". Set this value before constructing a TerminalSettings instance.
-
-
Constructor Detail
-
TerminalSettings
public TerminalSettings()
Create terminal settings loading the configuration from the global section in the configuration file.
-
TerminalSettings
public TerminalSettings(String deviceId)
Create terminal settings loading the configuration from the device specific section in the configuration file. If not found the global section is loaded instead.
-
TerminalSettings
public TerminalSettings(InputStreamReader inputReader)
Create terminal settings loading the configuration from the global section in the configuration file.
-
TerminalSettings
public TerminalSettings(InputStreamReader inputReader, String deviceId)
Create terminal settings loading the configuration from the device specific section in the configuration file. If not found the global section is loaded instead.
-
TerminalSettings
public TerminalSettings(TerminalSettings settings)
Create copy of terminal settings.- Parameters:
settings
- Settings to copy
-
-
Method Detail
-
getLogDir
public String getLogDir()
Defines where the Log File has to be generated. Overrides the LogDir defined in GlobalSettings.
-
setLogDir
public void setLogDir(String logDir)
Set where the Log File has to be generated. Overrides the LogDir defined in GlobalSettings.
-
getLogRetainFileCount
public int getLogRetainFileCount()
Number of log files to keep before archiving them. 0 to disable using log files.
-
setLogRetainFileCount
public void setLogRetainFileCount(int logRetainFileCount)
Set number of log files to keep before archiving them. Use 0 to disable using log files.
-
getLogFileCountPerArchive
public int getLogFileCountPerArchive()
Number of log files to keep before per archive file.
-
setLogFileCountPerArchive
public void setLogFileCountPerArchive(int logFileCountPerArchive)
Set number of log files to keep before per archive file.
-
getLogRetainArchiveCount
public int getLogRetainArchiveCount()
Number of log file archives to keep before deleting them. 0 to disable using archive files.
-
setLogRetainArchiveCount
public void setLogRetainArchiveCount(int logRetainArchiveCount)
Set number of log file archives to keep before deleting them. Use 0 to disable using archive files.
-
getTerminalId
public String getTerminalId()
Terminal ID to be broadcasted in case of ConnectionMode Broadcast.
-
setTerminalId
public void setTerminalId(String terminalId)
Set terminal ID to be broadcasted in case of ConnectionMode Broadcast.
-
getConnectionMode
public ConnectionMode getConnectionMode()
Broadcast (default) or OnFixIP.
-
setConnectionMode
public void setConnectionMode(ConnectionMode connectionMode)
Set broadcast (default) or OnFixIP.
-
getConnectionIPString
public String getConnectionIPString()
IP address of the EFT terminal in case of ConnectionMode OnFixIP.
-
setConnectionIPString
public void setConnectionIPString(String connectionIPString)
Set IP address of the EFT terminal in case of ConnectionMode OnFixIP.
-
getConnectionIPPort
public int getConnectionIPPort()
Listening Port of the EFT terminal in case of ConnectionMode OnFixIP.
-
setConnectionIPPort
public void setConnectionIPPort(int connectionIPPort)
Set listening Port of the EFT terminal in case of ConnectionMode OnFixIP.
-
getConnectionListenIPString
public String getConnectionListenIPString()
IP address of the ECR if listening.
-
setConnectionListenIPString
public void setConnectionListenIPString(String connectionListenIPString)
Set IP address of the ECR if listening.
-
getConnectionListenIPPort
public int getConnectionListenIPPort()
Listening Port of ECR if listening.
-
setConnectionListenIPPort
public void setConnectionListenIPPort(int connectionListenIPPort)
Set listening Port of ECR if listening.
-
getBroadcastInterface
public String getBroadcastInterface()
Interface to use for broadcasting or empty string to broadcast on all available interfaces.
-
setBroadcastInterface
public void setBroadcastInterface(String broadcastInterface)
Set interface to use for broadcasting or empty string to broadcast on all available interfaces.
-
isConnectionListen
public boolean isConnectionListen()
EFT connects to ECR instead of ECR connecting to EFT, which is the default way to connect.
-
setConnectionListen
public void setConnectionListen(boolean connectionListen)
EFT connects to ECR instead of ECR connecting to EFT, which is the default way to connect.
-
getProtocolType
public ProtocolType getProtocolType()
Protocol type.
-
setProtocolType
public void setProtocolType(ProtocolType protocolType)
Set protocol type.
-
getIntegratorId
public String getIntegratorId()
Integrator identifier.
-
setIntegratorId
public void setIntegratorId(String integratorId)
Set integrator identifier. Can not be set using configuration file.
-
getGuides
public EnumSet<Guides> getGuides()
Required guides. Login succeeds only if the terminal is able to provide all requested guides.- Returns:
- Copy of guides save to be modified.
-
setGuides
public void setGuides(EnumSet<Guides> guides)
Set required guides. Login succeeds only if the terminal is able to provide all requested guides. Guides.RETAIL has to be always enabled. Can not be set using configuration file.- Parameters:
guides
- Guides to enable. Stores copy. It is safe to change the value of guides after this call.- Throws:
IllegalArgumentException
- guides does not containGuides.RETAIL
.
-
getManufacturerFlags
public int getManufacturerFlags()
Manufacturer flags.
-
setManufacturerFlags
public void setManufacturerFlags(int manufacturerFlags)
Set manufacturer flags. Can not be set using configuration file.
-
isFetchBrands
public boolean isFetchBrands()
Automatically retrieves application information during logging in.
-
setFetchBrands
public void setFetchBrands(boolean fetchBrands)
Automatically retrieves application information during logging in.
-
isAutoSysInfo
public boolean isAutoSysInfo()
Automatically retrieves system information during logging in.
-
setAutoSysInfo
public void setAutoSysInfo(boolean autoSysInfo)
Automatically retrieves system information during logging in.
-
isAutoCommit
public Boolean isAutoCommit()
After executing the Transaction- function the API commits the transaction automatically. If null uses true/false depending on the other settings, namely:- If Unattended Guide is enabled: false
- Otherwise: true
-
setAutoCommit
public void setAutoCommit(Boolean autoCommit)
After executing the Transaction- function the API commits the transaction automatically. If null uses true/false depending on the other settings, namely:- If Unattended Guide is enabled: false
- Otherwise: true
-
isAutoShiftManagement
public boolean isAutoShiftManagement()
Shift management is handled automatically. Required if device does not support Activate and Deactivate functions.
-
setAutoShiftManagement
public void setAutoShiftManagement(boolean autoShiftManagement)
Set if shift management is handled automatically. Required if device does not support Activate and Deactivate functions.
-
isAutoShutterManagement
public boolean isAutoShutterManagement()
Shutter management is handled automatically.
-
setAutoShutterManagement
public void setAutoShutterManagement(boolean autoShutterManagement)
Set if shutter management is handled automatically.
-
isPartialCommit
public Boolean isPartialCommit()
Allow partial commit.
-
setPartialCommit
public void setPartialCommit(Boolean partialCommit)
Allow partial commit.
-
getCardInsertionTimeout
public int getCardInsertionTimeout()
Timeout in seconds the terminal waits for a card to be inserted before canceling an open transaction request.
-
setCardInsertionTimeout
public void setCardInsertionTimeout(int timeout)
Set timeout in seconds the terminal waits for a card to be inserted before canceling an open transaction request.
-
getCardRemovalTimeout
public int getCardRemovalTimeout()
Timeout in seconds the terminal waits for a card to be removed before requesting attendant interaction.
-
setCardRemovalTimeout
public void setCardRemovalTimeout(int timeout)
Set timeout in seconds the terminal waits for a card to be removed before requesting attendant interaction.
-
getCommitTimeout
public int getCommitTimeout()
Timeout in seconds the terminal waits until the technical auto-reversal is processed, if no commit received. Timer starts with response and is reset in case client enters information in the terminal.
-
setCommitTimeout
public void setCommitTimeout(int timeout)
Set timeout in seconds the terminal waits until the technical auto-reversal is processed, if no commit received. Timer starts with response and is reset in case client enters information in the terminal.
-
isDcc
public boolean isDcc()
Dcc shall be supported.
-
setDcc
public void setDcc(boolean dcc)
Set if Dcc shall be supported.
-
isPartialApproval
public boolean isPartialApproval()
Partial approval shall be supported.
-
setPartialApproval
public void setPartialApproval(boolean partialApproval)
Partial approval shall be supported.
-
getProceedTimeout
public int getProceedTimeout()
Timeout in seconds the terminal waits in WaitForProceed state for an additional function until an error is returned.
-
setProceedTimeout
public void setProceedTimeout(int timeout)
Set timeout in seconds the terminal waits in WaitForProceed state for an additional function until an error is returned.
-
isAllowClosedCardInsert
public boolean isAllowClosedCardInsert()
Allow card to be inserted before activation.
-
setAllowClosedCardInsert
public void setAllowClosedCardInsert(boolean allowClosedCardInsert)
Set if it is allowed to insert the card before activation.
-
isTipAllowed
public boolean isTipAllowed()
Tip is allowed for purchase transactions. This parameter is only used ifGuides.GASTRO
is enabled.
-
setTipAllowed
public void setTipAllowed(boolean tipAllowed)
Set if tip is allowed for purchase transactions. This parameter is only used ifGuides.GASTRO
is enabled.
-
isFastNtfMode
public boolean isFastNtfMode()
Enable fast notification mode. This parameter is only used ifGuides.AUSTRIAN_USE_CASES
is enabled.
-
setFastNtfMode
public void setFastNtfMode(boolean fastNtfMode)
Set enable fast notification mode. This parameter is only used ifGuides.AUSTRIAN_USE_CASES
is enabled.
-
getLateCheckinTimeout
public int getLateCheckinTimeout()
This timeout indicates how long a terminal shall wait in seconds for an AmtAdjustment notification from the ECR in case of a late-checkin.
-
setLateCheckinTimeout
public void setLateCheckinTimeout(int lateCheckinTimeout)
This timeout indicates how long a terminal shall wait in seconds for an AmtAdjustment notification from the ECR in case of a late-checkin.
-
getQRCTimeout
public int getQRCTimeout()
Timeout in seconds the terminal displays the loyalty QR code after a "StartCheckout" call before returning to its "Idle" screen. Numeric number that specifies the QRCTimeout in seconds.
-
setQRCTimeout
public void setQRCTimeout(int qrcTimeout)
Timeout in seconds the terminal displays the loyalty QR code after a "StartCheckout" call before returning to its "Idle" screen. Numeric number that specifies the QRCTimeout in seconds.
-
getRequestRepetition
public int getRequestRepetition()
Number of send request repetitions or 0 to disable. Default is 0. Affects these functions: - Commit - Rollback
-
setRequestRepetition
public void setRequestRepetition(int requestRepetition)
Set number of send request repetitions or 0 to disable. Default is 0. Affects these functions: - Commit - Rollback- Throws:
IllegalArgumentException
- requestRepetition is less than 0.
-
isEnabledKeepAlive
public boolean isEnabledKeepAlive()
Enable Keep-Alive handling. Default is true.
-
setEnableKeepAlive
public void setEnableKeepAlive(boolean enableKeepAlive)
Set if Keep-Alive handling is enabled. Default is true.
-
isPersistentState
public boolean isPersistentState()
Enable persistent state if supported. Default is false.
-
setPersistentState
public void setPersistentState(boolean persistentState)
Set enable persistent state if supported. Default is false.
-
getWakeupTimeout
public int getWakeupTimeout()
Returns the timeout for terminal wake-up operations. Wake up is only possible on terminals that support wake-up via ECR interface. The wake-up process is transparent to the user and is triggered by calling a function that needs the terminal. Default timeout is 20s.
-
setWakeupTimeout
public void setWakeupTimeout(int timeout)
Sets the timeout for terminal wake-up operations. Wake up is only possible on terminals that support wake-up via ECR interface. The wake-up process is transparent to the user and is triggered by calling a function that needs the terminal. Default timeout is 20s.
-
getSaferpayTerminalId
public String getSaferpayTerminalId()
Saferpay: Terminal Id.
-
setSaferpayTerminalId
public void setSaferpayTerminalId(String terminalId)
Saferpay: Set terminal Id.
-
getSaferpayCredentials
public String getSaferpayCredentials()
Saferpay: Base64 encoded user name + password.
-
setSaferpayCredentials
public void setSaferpayCredentials(String credentials)
Saferpay: Set Base64 encoded user name + password.
-
getSaferpayCustomerId
public String getSaferpayCustomerId()
Saferpay: Customer ID.
-
setSaferpayCustomerId
public void setSaferpayCustomerId(String customerId)
Saferpay: Set customer ID.
-
getSaferpayBaseUrl
public String getSaferpayBaseUrl()
Saferpay: Base URL.
-
setSaferpayBaseUrl
public void setSaferpayBaseUrl(String baseUrl)
Saferpay: Set base URL.
-
getPreferOmniChannel
public EnumSet<TransactionType> getPreferOmniChannel()
Prefer OmniChannel for these functions.
-
setPreferOmniChannel
public void setPreferOmniChannel(EnumSet<TransactionType> preferOmniChannel)
Set Prefer OmniChannel for these functions.
-
getOmnichannelAPIKey
public String getOmnichannelAPIKey()
Omnichannel: Key for API access.
-
setOmnichannelAPIKey
public void setOmnichannelAPIKey(String omnichannelAPIKey)
Omnichannel: Key for API access.
-
getOmnichannelAPISecret
public String getOmnichannelAPISecret()
Omnichannel: Secret key for API access.
-
setOmnichannelAPISecret
public void setOmnichannelAPISecret(String omnichannelAPISecret)
Omnichannel: Secret key for API access.
-
getOmnichannelHostURL
public String getOmnichannelHostURL()
Omnichannel: Host-URL (for example Ogone's Direct API URL).
-
setOmnichannelHostURL
public void setOmnichannelHostURL(String omnichannelHostURL)
Omnichannel: Host-URL (for example Ogone's Direct API URL).
-
getOmnichannelHostTimeout
public int getOmnichannelHostTimeout()
Omnichannel: Timeout of Omnichannel host communication (in seconds).
-
setOmnichannelHostTimeout
public void setOmnichannelHostTimeout(int omnichannelHostTimeout)
Omnichannel: Timeout of Omnichannel host communication (in seconds).
-
getSIXmlRequestTimeout
public int getSIXmlRequestTimeout()
Timeout in seconds for SIXml request. By default 5min.
-
setSIXmlRequestTimeout
public void setSIXmlRequestTimeout(int timeout)
Set timeout in seconds for SIXml request. By default 5min.
-
toString
public String toString()
String representation for debugging purpose.
-
-