com.ibm.commerce.payments.configurator
Class CassetteConfiguratorAdapter

java.lang.Object
  |
  +--com.ibm.commerce.payments.configurator.CassetteConfiguratorAdapter
All Implemented Interfaces:
com.ibm.commerce.payments.configurator.ICassetteConfigurator
Direct Known Subclasses:
GenericCassetteConfigurator

public abstract class CassetteConfiguratorAdapter
extends java.lang.Object
implements com.ibm.commerce.payments.configurator.ICassetteConfigurator

The CassetteConfiguratorAdapter abstract class. Supports the configuration of cassettes into a specific WCPayments instance.

This abstract class adds some of the basic cassette information into the ETCassetteCFG table, it also add the cassette jar, pspl and some other files into the WCPayments Enterprise Application Archive (ear). Cassette velelopers can extend this class to help them add and configure their cassette into the WCPayment instance.

Cassette developers can extend this class if they choose to, they will only need to implements the following methods:


Fields inherited from interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
CASSETTE_CLASSPATH, CASSETTE_CONFIG_CLASS, CASSETTE_NAME, CASSETTE_VENDOR, CASSETTE_VERSION, MIN_FRAMEWORK_VERSION
 
Constructor Summary
CassetteConfiguratorAdapter()
          Default constructor
CassetteConfiguratorAdapter(com.ibm.commerce.payments.configurator.cassette.CassetteGenerator cassettegen)
          Constructor that includes a Cassette Generator as a parameter
 
Method Summary
 void copyCassetteToEAR()
          Copies cassette to an EAR file.
 java.util.List getArchiveName()
          Returns the archive name(s) for the cassette.
 java.lang.String getConfigClass()
          Returns the config class for the cassette.
 java.lang.String getCreateScript()
          Returns the name of the create script.
 java.util.Hashtable getDatabaseScripts()
          Returns the hashtable of database scripts.
 java.lang.String getDatabaseType()
          Returns the database type.
 java.lang.String getDeleteScript()
          Returns the name of the delete script.
 long getLastCopiedTime()
          Gets the timestamp of the last time the cassette directory was copied
 java.lang.String getMigrateScript()
          Returns the name of the migrate script.
 java.lang.String getMinFrameworkVersion()
          Returns the minimal framework version for the cassette.
 java.lang.String getName()
          Returns the cassette name.
 java.util.List getPspl()
          Returns the pspl(s) for the cassette.
 java.util.List getRequiredParameters()
          Returns the list of required parameters.
 java.lang.String getVendor()
          Returns the name of the cassette vendor.
 java.lang.String getVersion()
          Returns the version number of the cassette.
 void init(com.ibm.commerce.payments.configurator.cassette.CassetteGenerator cassettegen)
          Initializes the Configuator Adapter's variables using the properties in the cassette generator.
 java.lang.String toString()
          Returns a String representation of the CassetteConfiguratorAdapter class.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
addToInstance, getSystemProperties, migrate, removeFromInstance
 

Constructor Detail

CassetteConfiguratorAdapter

public CassetteConfiguratorAdapter()
Default constructor

CassetteConfiguratorAdapter

public CassetteConfiguratorAdapter(com.ibm.commerce.payments.configurator.cassette.CassetteGenerator cassettegen)
                            throws CassetteNotInstalledException
Constructor that includes a Cassette Generator as a parameter
Parameters:
cassettegen - The cassette generator object that has already been populated with cassette data
Throws:
CassetteNotInstalledException - Thrown when the cassete has not been installed
Method Detail

toString

public java.lang.String toString()
Returns a String representation of the CassetteConfiguratorAdapter class.
Specified by:
toString in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Overrides:
toString in class java.lang.Object
Returns:
The name, vendor, version, classpath and library path.

init

public void init(com.ibm.commerce.payments.configurator.cassette.CassetteGenerator cassettegen)
          throws CassetteNotInstalledException
Initializes the Configuator Adapter's variables using the properties in the cassette generator. If the cassette content needs to be copied to the EAR it is done.
Parameters:
cassettegen - The cassette generator object that has already been populated with cassette data
Throws:
CassetteNotInstalledException - Thrown when the cassette has not been installed

getName

public java.lang.String getName()
Returns the cassette name.
Specified by:
getName in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
Cassette name.

getVendor

public java.lang.String getVendor()
Returns the name of the cassette vendor.
Specified by:
getVendor in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
Cassette vendor name.

getVersion

public java.lang.String getVersion()
Returns the version number of the cassette.
Specified by:
getVersion in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The version number of the cassette.

getMinFrameworkVersion

public java.lang.String getMinFrameworkVersion()
Returns the minimal framework version for the cassette.
Specified by:
getMinFrameworkVersion in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The minimal framework version of the cassette.

getConfigClass

public java.lang.String getConfigClass()
Returns the config class for the cassette.
Specified by:
getConfigClass in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The config class of the cassette.

getArchiveName

public java.util.List getArchiveName()
Returns the archive name(s) for the cassette.
Specified by:
getArchiveName in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The cassette archive name(s).

getPspl

public java.util.List getPspl()
Returns the pspl(s) for the cassette.
Specified by:
getPspl in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The cassette pspl(s).

getDatabaseType

public java.lang.String getDatabaseType()
Returns the database type.
Specified by:
getDatabaseType in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The database type.

getDatabaseScripts

public java.util.Hashtable getDatabaseScripts()
Returns the hashtable of database scripts.
Specified by:
getDatabaseScripts in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The database scripts hashtable.

getCreateScript

public java.lang.String getCreateScript()
Returns the name of the create script.
Specified by:
getCreateScript in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The name of the create script.

getDeleteScript

public java.lang.String getDeleteScript()
Returns the name of the delete script.
Specified by:
getDeleteScript in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The name of the delete script.

getMigrateScript

public java.lang.String getMigrateScript()
Returns the name of the migrate script.
Specified by:
getMigrateScript in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The name of the migrate script.

getRequiredParameters

public java.util.List getRequiredParameters()
Returns the list of required parameters.
Specified by:
getRequiredParameters in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
The required parameters list.

copyCassetteToEAR

public void copyCassetteToEAR()
                       throws CassetteNotInstalledException
Copies cassette to an EAR file.
Throws:
CassetteNotInstalledException - if the cassette is not installed in the Payments instance.

getLastCopiedTime

public long getLastCopiedTime()
Gets the timestamp of the last time the cassette directory was copied
Specified by:
getLastCopiedTime in interface com.ibm.commerce.payments.configurator.ICassetteConfigurator
Returns:
time as a long