com.ibm.websphere.brb
Class RuleExporter
java.lang.Object
|
+--com.ibm.ws.brb.xml.BaseRuleImporterExporter
|
+--com.ibm.websphere.brb.RuleExporter
- public class RuleExporter
- extends com.ibm.ws.brb.xml.BaseRuleImporterExporter
A tool that exports rules into an XML document. The rules that are
exported are determined by an XML document which is provided to the tool.
The RuleExporter should normally be invoked using the ruleexporter.bat|sh that is provided.
Fields inherited from class com.ibm.ws.brb.xml.BaseRuleImporterExporter |
BRB_XML_RESOURCE_BUNDLE, parser |
Constructor Summary |
RuleExporter(javax.naming.InitialContext ic)
Creates a new RuleExporter. |
Method Summary |
void |
addErrorListener(com.ibm.ws.brb.xml.ParsingErrorListener listener)
Add a listener that listens for errors that occured during the
import. |
java.io.PrintWriter |
getOutputWriter()
Return the writer for the rules. |
static void |
main(java.lang.String[] args)
Export rules as specified by the given args. |
void |
setOutputWriter(java.io.PrintWriter writer)
Set the writer for the rules. |
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 |
RuleExporter
public RuleExporter(javax.naming.InitialContext ic)
throws BusinessRuleBeansException
- Creates a new RuleExporter.
- Parameters:
ic
- the initial context- Throws:
BusinessRuleBeansException
- if an error occurs creating the parser
addErrorListener
public void addErrorListener(com.ibm.ws.brb.xml.ParsingErrorListener listener)
- Add a listener that listens for errors that occured during the
import.
- Parameters:
listener
- the error listener
getOutputWriter
public java.io.PrintWriter getOutputWriter()
- Return the writer for the rules.
- Returns:
- the writer for the rules
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Export rules as specified by the given args. The following is the usage:
Usage: java com.ibm.websphere.brb.RuleExporter [options] files ...
Options:
-[?] Display this message
-[v]erbose Verbose output
-[o]utput {name} The name of the file for the output of the rules
-[h]ost {name} The host for the name server (default is localhost)
-[p]ort {number} The port for the name server (default is 900)
Example: to export the rules as described in file1 and file2 to output file outfile:
java com.ibm.websphere.brb.RuleExporter -h myserver.ibm.com -o outfile file1 file2
- Parameters:
args
- the command-line arguments to the RuleExporter
setOutputWriter
public void setOutputWriter(java.io.PrintWriter writer)
- Set the writer for the rules.
- Parameters:
writer
- the writer for the rules