com.ibm.websphere.brb
Class RuleImporter

java.lang.Object
  extended bycom.ibm.ws.brb.xml.BaseRuleImporterExporter
      extended bycom.ibm.websphere.brb.RuleImporter

Deprecated. IBM Internal Use Only. There is no planned replacement for this functionality.

public class RuleImporter
extends com.ibm.ws.brb.xml.BaseRuleImporterExporter

A tool that imports rules from one or more XML documents. The RuleImporter should normally be invoked using the ruleimporter.bat|sh file that is provided.


Field Summary
 
Fields inherited from class com.ibm.ws.brb.xml.BaseRuleImporterExporter
BRB_XML_RESOURCE_BUNDLE, parser
 
Constructor Summary
RuleImporter(javax.naming.InitialContext ic)
          Deprecated. Creates a new RuleImporter.
 
Method Summary
 void addErrorListener(com.ibm.ws.brb.xml.ParsingErrorListener listener)
          Deprecated. Add a listener that listens for errors that occured during the import.
 java.io.PrintWriter getErrorWriter()
          Deprecated. Return the error writer for the importer, if any.
 boolean isTestOnly()
          Deprecated. Indicates whether the importer is in "test-only" mode, which means that, none of the rules that are specified in the XML documents will be created, but the documents will still be parsed.
 boolean isUpdateDuplicates()
          Deprecated. Returns whether to update a rule if a rule found in the database has the same primary key as a rule in the input document.
static void main(java.lang.String[] args)
          Deprecated. Import rules as specified by the given args.
 void setErrorWriter(java.io.PrintWriter writer)
          Deprecated. Set the error writer for the importer.
 void setTestOnly(boolean option)
          Deprecated. Sets whether the importer is in "test-only" mode, which means that, none of the rules that are specified in the XML documents will be created, but the documents will still be parsed.
 void setUpdateDuplicates(boolean option)
          Deprecated. Sets whether to update a rule if a rule found in the database has the same primary key as a rule in the input document.
 
Methods inherited from class com.ibm.ws.brb.xml.BaseRuleImporterExporter
getCurrentFileName, getInitialContext, getMessage, getRootRuleFolder, getVerboseWriter, isCommitEach, isVerbose, parse, setCommitEach, setVerboseWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleImporter

public RuleImporter(javax.naming.InitialContext ic)
             throws BusinessRuleBeansException
Deprecated. 
Creates a new RuleImporter.

Parameters:
ic - the initial context to use to connect to the name server
Throws:
BusinessRuleBeansException - if an error occurs creating the parser
Method Detail

addErrorListener

public void addErrorListener(com.ibm.ws.brb.xml.ParsingErrorListener listener)
Deprecated. 
Add a listener that listens for errors that occured during the import.

Parameters:
listener - the error listener

getErrorWriter

public java.io.PrintWriter getErrorWriter()
Deprecated. 
Return the error writer for the importer, if any. This is the PrintWriter to which information about errors will be written by the importer. Note: error information is always sent to the verbose writer, if there is one. It is also sent to the error writer if one is specified.

Returns:
The error writer for the importer or null if there isn't one.

isTestOnly

public boolean isTestOnly()
Deprecated. 
Indicates whether the importer is in "test-only" mode, which means that, none of the rules that are specified in the XML documents will be created, but the documents will still be parsed.

Returns:
true if in "test-only" mode, false otherwise

isUpdateDuplicates

public boolean isUpdateDuplicates()
Deprecated. 
Returns whether to update a rule if a rule found in the database has the same primary key as a rule in the input document.

Returns:
true if duplicate rules should be updated, false if an error should be generated

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Deprecated. 
Import rules as specified by the given args. The following is the usage:
 Usage: java com.ibm.websphere.brb.RuleImporter [options] files ...
 Options:
 	-[?]              Display this message
 	-[v]erbose        Verbose output
 	-[t]est           Only parse the input files, do not create rules
 	-[u]pdate         Update duplicate rules
 	-[c]ommiteach     Perform a commit after each bean
 	-[h]ost {name}    The host where the name server is located (default is localhost)
 	-[p]ort {number}  The port where the name server is located (default is 2809)
 
 Example: to import rules from two files, committing rule individually:
 	java com.ibm.websphere.brb.RuleImporter -c -h myserver.ibm.com file1 file2
 

Parameters:
args - the command-line arguments to the RuleImporter
Throws:
java.lang.Exception

setTestOnly

public void setTestOnly(boolean option)
Deprecated. 
Sets whether the importer is in "test-only" mode, which means that, none of the rules that are specified in the XML documents will be created, but the documents will still be parsed.


setUpdateDuplicates

public void setUpdateDuplicates(boolean option)
Deprecated. 
Sets whether to update a rule if a rule found in the database has the same primary key as a rule in the input document.

Parameters:
option - true if duplicate rules should be updated, false if an error should be generated

setErrorWriter

public void setErrorWriter(java.io.PrintWriter writer)
Deprecated. 
Set the error writer for the importer. This is the PrintWriter to which information about any errors is sent. Note: error information is always sent to the verbose writer, if there is one. It is also sent to the error writer if one is specified.

Parameters:
writer - the error writer for the importer