BEA Systems, Inc.

com.beasys.commerce.axiom.reasoning.rules.util
Class LoaderDriver

java.lang.Object
  |
  +--com.beasys.commerce.axiom.reasoning.rules.util.LoaderDriver

public class LoaderDriver
extends java.lang.Object

This class implements a ruleset bulk loader driver


Field Summary
static java.lang.String ATTRIBUTE_NAME_BINDING_CLASS
          The name of the attribute used to indicate the java-class-name portion of a binding
static java.lang.String ATTRIBUTE_NAME_TAG_NAME
          The name of the attribute used to indicate the xml-tag-name portion of a binding
static java.lang.String ATTRIBUTE_NAME_VALUE
          The name of the attribute used generically to indicate a value
static java.lang.String CLASS_NAME_XML_DEFAULT
          The class used to create default xml elements
static int COMMANDLINE_ARG_INDEX_BINDINGSFILE
          The index of the bindings file name command line argument
static int COMMANDLINE_ARG_INDEX_PROPERTIESFILE
          The index of the test properties file name command line argument
static int COMMANDLINE_ARG_INDEX_RESULTSFILE
          The index of the test results file name command line argument
static int COMMANDLINE_ARGS_NUM_EXPECTED
          The number of expected command-line arguments
static java.lang.String MESSAGE_USAGE
          The message displayed if the user does not supply the correct command-line arguments
static java.lang.String TAG_NAME_BINDING
          The name of the xml-tag used to indicate a xml-tag to java-class-name binding
static java.lang.String TAG_NAME_ITEMS_FAILED
          The name of the xml-tag used to indicate the total number of items that failed to load
static java.lang.String TAG_NAME_ITEMS_LOADED
          The name of the xml-tag used to indicate the total number of items that were loaded
static java.lang.String TAG_NAME_LOADERS
          The name of the xml-tag used to indicate the list of loaders
static java.lang.String TAG_NAME_RESULTS
          The name of the xml-tag used to indicate the list of results
static java.lang.String TAG_NAME_TOTAL_TIME
          The name of the xml-tag used to indicate the total time
static java.lang.String TAG_NAME_WILDCARD
          The wildcard xml-tag which is mapped to a default class for the xml element factory
 
Constructor Summary
LoaderDriver()
           
 
Method Summary
 void drive(java.lang.String bindingsFileName, java.lang.String propertiesFileName, java.lang.String resultsFileName)
          Drives the loaders
static void main(java.lang.String[] args)
          Entry point for driver
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_NAME_BINDING_CLASS

public static final java.lang.String ATTRIBUTE_NAME_BINDING_CLASS
The name of the attribute used to indicate the java-class-name portion of a binding

ATTRIBUTE_NAME_TAG_NAME

public static final java.lang.String ATTRIBUTE_NAME_TAG_NAME
The name of the attribute used to indicate the xml-tag-name portion of a binding

ATTRIBUTE_NAME_VALUE

public static final java.lang.String ATTRIBUTE_NAME_VALUE
The name of the attribute used generically to indicate a value

CLASS_NAME_XML_DEFAULT

public static final java.lang.String CLASS_NAME_XML_DEFAULT
The class used to create default xml elements

COMMANDLINE_ARG_INDEX_BINDINGSFILE

public static final int COMMANDLINE_ARG_INDEX_BINDINGSFILE
The index of the bindings file name command line argument

COMMANDLINE_ARG_INDEX_PROPERTIESFILE

public static final int COMMANDLINE_ARG_INDEX_PROPERTIESFILE
The index of the test properties file name command line argument

COMMANDLINE_ARG_INDEX_RESULTSFILE

public static final int COMMANDLINE_ARG_INDEX_RESULTSFILE
The index of the test results file name command line argument

COMMANDLINE_ARGS_NUM_EXPECTED

public static final int COMMANDLINE_ARGS_NUM_EXPECTED
The number of expected command-line arguments

MESSAGE_USAGE

public static final java.lang.String MESSAGE_USAGE
The message displayed if the user does not supply the correct command-line arguments

TAG_NAME_BINDING

public static final java.lang.String TAG_NAME_BINDING
The name of the xml-tag used to indicate a xml-tag to java-class-name binding

TAG_NAME_ITEMS_FAILED

public static final java.lang.String TAG_NAME_ITEMS_FAILED
The name of the xml-tag used to indicate the total number of items that failed to load

TAG_NAME_ITEMS_LOADED

public static final java.lang.String TAG_NAME_ITEMS_LOADED
The name of the xml-tag used to indicate the total number of items that were loaded

TAG_NAME_LOADERS

public static final java.lang.String TAG_NAME_LOADERS
The name of the xml-tag used to indicate the list of loaders

TAG_NAME_RESULTS

public static final java.lang.String TAG_NAME_RESULTS
The name of the xml-tag used to indicate the list of results

TAG_NAME_TOTAL_TIME

public static final java.lang.String TAG_NAME_TOTAL_TIME
The name of the xml-tag used to indicate the total time

TAG_NAME_WILDCARD

public static final java.lang.String TAG_NAME_WILDCARD
The wildcard xml-tag which is mapped to a default class for the xml element factory
Constructor Detail

LoaderDriver

public LoaderDriver()
Method Detail

drive

public void drive(java.lang.String bindingsFileName,
                  java.lang.String propertiesFileName,
                  java.lang.String resultsFileName)
           throws java.lang.IllegalArgumentException,
                  java.lang.Exception
Drives the loaders
Parameters:
bindingsFileName - The name of the file which contains the xml-tags to java-class-name mappings
propertiesFileName - The name of the file which contains the loader properties
resultsFileName - Name of file to which results should be written
Throws:
java.lang.IllegalArgumentException - Thrown if any of the args are null or zero-length
java.lang.Exception - Thrown if any problems whatsoever occur while loading

main

public static void main(java.lang.String[] args)
Entry point for driver
Parameters:
args - The command line arguments which are the names of the files which contain the xml-tag vs. java-class bindings, the load properties and the name of the load results file.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved