com.ibm.commerce.payments.configurator
Interface ICassetteConfigurator

All Known Implementing Classes:
CassetteConfiguratorAdapter

public interface ICassetteConfigurator

It defines the cassette configuration interface. It must be implemented by cassettes so they can be configured by the Configurator.


Field Summary
static java.lang.String CASSETTE_CLASSPATH
          The property name for the classpath containing all the classes required for the configuration of the target cassette implementation and the classes required in run-time to support the cassette execution; example: 'eTillVisaNetCassetteClasses.jar'
static java.lang.String CASSETTE_CONFIG_CLASS
          The property name for the fully qualified class name that implements this class (ICassetteConfigurator) for the target cassette implementation; example: 'com.ibm.etill.visanetcassette.configurator.VisaNetCassetteConfigurator'
static java.lang.String CASSETTE_NAME
          The property name for the name of the payment system supported by the target cassette implementation; example: 'VisaNet'
static java.lang.String CASSETTE_VENDOR
          The vendor name for the version of the target cassette implementation; example: 'IBM'
static java.lang.String CASSETTE_VERSION
          The property name for the version of the target cassette implementation; example: '5.5.0.0'
static java.lang.String MIN_FRAMEWORK_VERSION
          the property name for the minimal framework version of the target cassette implementation; example: '3.1'
 
Method Summary
 void addToInstance(IDatabase database, java.util.Properties properties)
          Adds the cassette into the target Commerce Payments instance.
 java.util.List getArchiveName()
          Gets the name(s) of the cassette implementation.
 java.lang.String getConfigClass()
          Gets the config class of the cassette.
 java.lang.String getCreateScript()
          Gets the name of the create script for the cassette.
 java.util.Hashtable getDatabaseScripts()
          Gets the hashtable of the database scripts for the cassette.
 java.lang.String getDatabaseType()
          Gets the database type.
 java.lang.String getDeleteScript()
          Gets the name of the delete script for the cassette.
 long getLastCopiedTime()
          Gets the last time the cassette was added to the ear.
 java.lang.String getMigrateScript()
          Gets the name of the migrate script for the cassette.
 java.lang.String getMinFrameworkVersion()
          Gets the minimal framework version of the cassette.
 java.lang.String getName()
          Gets the name of the cassette implementation.
 java.util.List getPspl()
          Gets the pspl(s) of the cassette implementation.
 java.util.List getRequiredParameters()
          Gets the list of required parameters.
 java.util.Map getSystemProperties()
          Gets the system properties.
 java.lang.String getVendor()
          Gets the vendor implementing the cassette.
 java.lang.String getVersion()
          Gets the version of the cassette implementation.
 void migrate(IDatabase database, java.lang.String currentVersion)
          Upgrades the cassette to the current version in the target Commerce Payments instance.
 void removeFromInstance(IDatabase database)
          Removes the cassette from target Commerce Payments instance.
 java.lang.String toString()
          Generates an String dump of the properties of the cassette implementation.
 

Field Detail

CASSETTE_NAME

public static final java.lang.String CASSETTE_NAME
The property name for the name of the payment system supported by the target cassette implementation; example: 'VisaNet'

CASSETTE_CONFIG_CLASS

public static final java.lang.String CASSETTE_CONFIG_CLASS
The property name for the fully qualified class name that implements this class (ICassetteConfigurator) for the target cassette implementation; example: 'com.ibm.etill.visanetcassette.configurator.VisaNetCassetteConfigurator'

CASSETTE_CLASSPATH

public static final java.lang.String CASSETTE_CLASSPATH
The property name for the classpath containing all the classes required for the configuration of the target cassette implementation and the classes required in run-time to support the cassette execution; example: 'eTillVisaNetCassetteClasses.jar'

CASSETTE_VERSION

public static final java.lang.String CASSETTE_VERSION
The property name for the version of the target cassette implementation; example: '5.5.0.0'

CASSETTE_VENDOR

public static final java.lang.String CASSETTE_VENDOR
The vendor name for the version of the target cassette implementation; example: 'IBM'

MIN_FRAMEWORK_VERSION

public static final java.lang.String MIN_FRAMEWORK_VERSION
the property name for the minimal framework version of the target cassette implementation; example: '3.1'
Method Detail

getName

public java.lang.String getName()
Gets the name of the cassette implementation.
Returns:
The name of the cassette

getVendor

public java.lang.String getVendor()
Gets the vendor implementing the cassette.
Returns:
The name of the vendor implementing the cassette

getVersion

public java.lang.String getVersion()
Gets the version of the cassette implementation.
Returns:
The version of the cassette implementation

getConfigClass

public java.lang.String getConfigClass()
Gets the config class of the cassette.
Returns:
The config class of the cassette

getArchiveName

public java.util.List getArchiveName()
Gets the name(s) of the cassette implementation.
Returns:
The name(s) of the cassette

getMinFrameworkVersion

public java.lang.String getMinFrameworkVersion()
Gets the minimal framework version of the cassette.
Returns:
the minimal framework version of the cassette

getPspl

public java.util.List getPspl()
Gets the pspl(s) of the cassette implementation.
Returns:
the pspl(s) of the cassette

getDatabaseType

public java.lang.String getDatabaseType()
Gets the database type.
Returns:
The database type.

getDatabaseScripts

public java.util.Hashtable getDatabaseScripts()
Gets the hashtable of the database scripts for the cassette.
Returns:
The hashtable of the database scripts.

getCreateScript

public java.lang.String getCreateScript()
Gets the name of the create script for the cassette.
Returns:
The name of the create script.

getDeleteScript

public java.lang.String getDeleteScript()
Gets the name of the delete script for the cassette.
Returns:
The name of the delete script.

getMigrateScript

public java.lang.String getMigrateScript()
Gets the name of the migrate script for the cassette.
Returns:
The name of the migrate script.

getRequiredParameters

public java.util.List getRequiredParameters()
Gets the list of required parameters.
Returns:
The required parameters list.

getSystemProperties

public java.util.Map getSystemProperties()
Gets the system properties.
Returns:
The system properties.

addToInstance

public void addToInstance(IDatabase database,
                          java.util.Properties properties)
                   throws CassetteAlreadyExistsException,
                          CassetteCannotBeAddedException,
                          DatabaseOperationFailedException
Adds the cassette into the target Commerce Payments instance.
Parameters:
database - Represents the Payments instance database
properties - Optional parameter with specific cassette properties
Throws:
CassetteAlreadyExistsException - If the cassette already exists in the target Payments instance
CassetteCannotBeAddedException - If the cassette does not exist in the target Payments instance but cannot be added to that instance; this can be used to signalize a temporary problem, e.g., specific cassette properties are missing
DatabaseOperationFailedException - If a database operation failed preventing the addition of the cassette in the target Payments instance

removeFromInstance

public void removeFromInstance(IDatabase database)
                        throws CassetteDoesNotExistException,
                               CassetteCannotBeRemovedException,
                               DatabaseOperationFailedException
Removes the cassette from target Commerce Payments instance.
Parameters:
database - Represents the Payments instance database
Throws:
CassetteDoesNotExistException - If the cassette does not exist in the target Payments instance
CassetteCannotBeRemovedException - If the cassette exists in the target Payments instance but cannot be removed from the instance; this can be used to signalize a temporary problem, e.g., pending requests need to be processed, or the cassette must be inactivated first
DatabaseOperationFailedException - If a database operation failed preventing the remotion of the cassette from the target Payments instance

migrate

public void migrate(IDatabase database,
                    java.lang.String currentVersion)
             throws CassetteDoesNotExistException,
                    com.ibm.commerce.payments.configurator.InvalidMigrationException,
                    MigrationErrorException,
                    DatabaseOperationFailedException
Upgrades the cassette to the current version in the target Commerce Payments instance. The cassette has to figurate out its current version and assess the validity of the migration.
Parameters:
database - Represents the Payments instance database
targetVersion - New cassette version as a String value
Throws:
CassetteDoesNotExistException - If the cassette does not exist in the target PM instance
com.ibm.commerce.payments.configurator.InvalidMigrationException - If the migration is not supported for the current and target versions of the cassette
MigrationErrorException - If the cassette cannot be migrated to the target version of the cassette; this can be used to signalize a temporary problem, e.g., pending requests need to be processed, or the cassette must be inactivated first
DatabaseOperationFailedException - If a database operation failed preventing the migration of the cassette in target PM instance

getLastCopiedTime

public long getLastCopiedTime()
Gets the last time the cassette was added to the ear.
Parameters:
properties - the new properties to be set

toString

public java.lang.String toString()
Generates an String dump of the properties of the cassette implementation.
Overrides:
toString in class java.lang.Object
Returns:
an string with the cassette properties