com.bankframe.services.devices
Class MCADeviceProperties

java.lang.Object
  extended bycom.bankframe.services.devices.MCADeviceProperties

public class MCADeviceProperties
extends java.lang.Object

This class provides access to the BankframeDevices.properties file.


Constructor Summary
MCADeviceProperties()
          Default Constructor
 
Method Summary
static int getInt(java.lang.String prefix, java.lang.String key)
          Get a specific resource setting value.
static int getSerialPortValue(java.lang.String prefix, java.lang.String key)
          Converts a String value in the BankframeDevices.properties resource file into a javax.comm.SerialPort defined value using the serialPortValueData static hashtable of SerialPort values.
static java.lang.String getString(java.lang.String prefix, java.lang.String key)
          Get a specific resource setting's value
static java.util.Hashtable getSubSet(java.lang.String prefix)
          Get a sub set of the keys in Devices properties, identified by the specified prefix.
static boolean isCommunicationAPIConfigured()
          Method isCommunicationAPIConfigured.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MCADeviceProperties

public MCADeviceProperties()
Default Constructor

Method Detail

getSubSet

public static java.util.Hashtable getSubSet(java.lang.String prefix)
                                     throws DeviceException
Get a sub set of the keys in Devices properties, identified by the specified prefix. The prefix will be stripped from the returned key names e.g. MCADeviceProperties.getSubSet("MyDeviceName") will return a hashtable containing the all the keys in MCADevice Properties beginning with 'MyDeviceName'

Parameters:
prefix - Prefix that identifies the subset of keys to retrieve
Throws:
DeviceException - if BankframeDevices.properties cannot be found

getString

public static java.lang.String getString(java.lang.String prefix,
                                         java.lang.String key)
                                  throws DeviceException
Get a specific resource setting's value

Parameters:
prefix - to strip from properties file entry
key - The setting to retrieve
Returns:
String containing the value of the specified setting
Throws:
DeviceException - if BankframeDevices.properties cannot be found

getInt

public static int getInt(java.lang.String prefix,
                         java.lang.String key)
                  throws DeviceException
Get a specific resource setting value.

Parameters:
prefix - To strip from properties file entry.
key - The setting to retrieve
Returns:
int Containing the value of the specified setting.
Throws:
DeviceException - if BankframeDevices.properties cannot be found, or the value cannot be parsed into an integer

getSerialPortValue

public static int getSerialPortValue(java.lang.String prefix,
                                     java.lang.String key)
                              throws DeviceException
Converts a String value in the BankframeDevices.properties resource file into a javax.comm.SerialPort defined value using the serialPortValueData static hashtable of SerialPort values.

Note: value of a property is the bitwise logic OR of the comma delimited strings in the properties file.

Parameters:
prefix - To strip from properties file entry
key - The setting to retrieve
Returns:
int Containing the javax.comm.SerialPort defined value of the specified entry in the BankframeDevices.properties resource file.
Throws:
DeviceException - if BankframeDevices.properties cannot be found

isCommunicationAPIConfigured

public static boolean isCommunicationAPIConfigured()
Method isCommunicationAPIConfigured.



Copyright © 2005, 2007, Oracle. All rights reserved.