public class RuleFlowMigrator extends Object
| Constructor and Description |
|---|
RuleFlowMigrator() |
| Modifier and Type | Method and Description |
|---|---|
static String |
convertReaderToString(Reader reader)
Converts the contents of the given Reader into a string.
|
static void |
main(String[] args)
Test application that reads a given source
file containing a drools 4 .rf and writes it to another given file
location as a drools 5 .rf file.
|
static boolean |
needToMigrateRF(String xml)
Returns true if the given .rf (graphical) ruleflow xml is a version
4 ruleflow that needs to be migrated to version 5, and returns
false otherwise.
|
static boolean |
needToMigrateRFM(String xml)
Returns true if the given .rfm ruleflow xml is a version
4 ruleflow that needs to be migrated to version 5, and returns
false otherwise.
|
static String |
portRFMToCurrentVersion(String xml)
Returns a drools 5 version of a given drools 4 .rfm ruleflow
in string format.
|
static String |
portRFToCurrentVersion(String xml)
Returns a drools 5 version of a given drools 4 .rf (Graphical) ruleflow
in string format.
|
public static String portRFToCurrentVersion(String xml) throws Exception
xml - Drools 4 ruleflow (.rf) in xml formatExceptionpublic static String portRFMToCurrentVersion(String xml) throws Exception
xml - Drools 4 ruleflow (.rfm) in xml formatExceptionpublic static boolean needToMigrateRF(String xml) throws Exception
xml - a .rf ruleflow in xml formatExceptionpublic static boolean needToMigrateRFM(String xml) throws Exception
xml - a .rfm ruleflow in xml formatExceptionpublic static String convertReaderToString(Reader reader) throws IOException
reader - IOExceptionpublic static final void main(String[] args)
args - an array whose first element is the source filename and
the second element is the the destination filename to which the
transformed ruleflow is writtenCopyright © 2001–2020 JBoss by Red Hat. All rights reserved.