|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.engine.IlrRulesetArchiveParser
public class IlrRulesetArchiveParser
This class is a parser of ruleset archives. The archive is given as a stream. The parsing provides:
IlrRulesetArchiveBuilder
,
IlrRulesetArchive
Constructor Summary | |
---|---|
IlrRulesetArchiveParser()
Parses a ruleset archive to provide an executable ruleset. |
Method Summary | |
---|---|
IlrRulesetFactory |
checkArchive(IlrRulesetArchive archive)
Checks the ruleset archive and builds a ruleset factory on this archive. |
IlrRulesetFactory |
checkArchive(IlrRulesetArchiveLoader loader)
Checks the ruleset archive and builds a ruleset factory on this archive. |
IlrRulesetFactory |
checkArchive(JarInputStream stream)
Checks the ruleset archive and builds a ruleset factory on this archive. |
void |
displayMessages(boolean error)
Displays the parsing error or warning messages. |
IlrRulesetArchive |
getArchive()
Deprecated. no replacement. |
IlrReflect |
getBusinessReflect()
Returns the business reflect. |
String[] |
getErrors()
Returns the errors found during the IRL parsing. |
IlrReflect |
getExecutionReflect()
Returns the execution reflect. |
IlrRuleset |
getRuleset()
Returns a ruleset issued from a ruleset archive parsing. |
String[] |
getWarnings()
Returns the warnings found during the IRL parsing. |
boolean |
parseArchive(IlrRulesetArchive archive)
Parses the ruleset archive. |
boolean |
parseArchive(IlrRulesetArchiveLoader loader)
Parses the ruleset archive. |
boolean |
parseArchiveFactory()
Parses the ruleset factory built by the checkArchive method in order to build a ruleset. |
void |
setBusinessReflect(IlrReflect reflect)
Sets the business reflect. |
void |
setExecutionReflect(IlrReflect reflect)
Sets the execution reflect. |
void |
setMessageWriter(PrintWriter writer)
Sets the error message writer of the ruleset archive parser. |
void |
setRuleset(IlrRuleset ruleset)
Sets the ruleset to be filled with the archive contents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IlrRulesetArchiveParser()
Method Detail |
---|
public void setBusinessReflect(IlrReflect reflect)
reflect
- The reflect used as a business reflect; it will load the business model.setExecutionReflect(ilog.rules.factory.IlrReflect)
public IlrReflect getBusinessReflect()
getExecutionReflect()
public void setExecutionReflect(IlrReflect reflect)
reflect
- The reflect used as the execution reflect; it will load the execution model.setBusinessReflect(ilog.rules.factory.IlrReflect)
public IlrReflect getExecutionReflect()
getBusinessReflect()
public IlrRuleset getRuleset()
public void setRuleset(IlrRuleset ruleset)
ruleset
- The ruleset to be filled.setExecutionReflect(ilog.rules.factory.IlrReflect)
public IlrRulesetArchive getArchive()
parseArchive(IlrRulesetArchiveLoader)
,
IlrRulesetArchive.extractArchive(IlrRulesetArchiveLoader)
public String[] getErrors()
public String[] getWarnings()
public void setMessageWriter(PrintWriter writer)
Sets the error message writer of the ruleset archive parser.
writer
- The new writer to which error messages are printed.public void displayMessages(boolean error)
error
- Set to true
to display the error messages; set to false
to display the
warning messages.public IlrRulesetFactory checkArchive(JarInputStream stream)
null
. The archive in the given stream conforms to the Jar format. The extracted archive is
persisted in memory. If the archive is a business archive, the returned ruleset is also business; the translations
have not been applied.
stream
- The stream in Jar format that contains the archive.
IlrRulesetFactory
when the archive is correct, or else it returns null
.public IlrRulesetFactory checkArchive(IlrRulesetArchiveLoader loader)
null
. The archive is extracted through the archive loader. The extracted archive is
persisted in memory. If the archive is a business archive, the returned ruleset is also business; the translations
have not been applied.
loader
- The loader used to extract the archive.
IlrRulesetFactory
when the archive is correct, or else it returns null
.public IlrRulesetFactory checkArchive(IlrRulesetArchive archive)
null
. If the archive is a business archive, the returned ruleset is also business; the
translations have not been applied.
archive
- The ruleset archive.
IlrRulesetFactory
when the archive is correct, or else it returns null
.public boolean parseArchiveFactory()
checkArchive
method in order to build a ruleset. It returns a
boolean indicating whether the parsing has succeeded or not. In case of errors during the parsing, the ruleset (as
IlrRuleset
) is null
, and error messages are available. If the checkArchive
method returned null
, the ruleset factory is null
and the parsing returns
false
.
true
if the parsing occurred without error. Otherwise, it returns false
.getRuleset()
,
displayMessages(boolean error)
,
getExecutionReflect()
,
getBusinessReflect()
,
checkArchive(ilog.rules.archive.IlrRulesetArchive)
,
checkArchive(java.util.jar.JarInputStream)
public boolean parseArchive(IlrRulesetArchiveLoader loader)
null
, and error messages are available. In the case of a business ruleset
archive, two reflects take part in the parsing. If the ruleset archive is not business, only one reflect is needed.
Both can be obtained after the parsing.
loader
- The loader in charge of archive loading.
true
if the parsing occurred without error. Otherwise, it returns false
.getRuleset()
,
displayMessages(boolean error)
,
getExecutionReflect()
,
getBusinessReflect()
public boolean parseArchive(IlrRulesetArchive archive)
null
, and error messages are available. In the case of a business ruleset
archive, two reflects take part in the parsing. If the ruleset archive is not business, only one reflect is needed.
Both can be obtained after the parsing.
archive
- The archive to be parsed.
true
if the parsing occurred without error. Otherwise, it returns false
.getRuleset()
,
displayMessages(boolean error)
,
getExecutionReflect()
,
getBusinessReflect()
|
Rule Execution Server API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |