Class RulebaseElement
java.lang.Object
COM.TIBCO.hawk.config.rbengine.rulebase.RulebaseElement
- All Implemented Interfaces:
Cloneable
This class is a super class of the major rulebase elements:
Rulebase, Rule, Test, and Action.
It provides methods to set and retrieve the element name
and schedule.
All subclasses, except Rulebase, provide a default name.
All subclass can accept a schedule name which should match
one of the available schedules defined in the Schedules
configuration file used by the RuleBaseEngine.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionabstract Objectclone()Returns a copy of this objectbooleanCompares two RulebaseElements for equality.protected voidfromXML(COM.TIBCO.hawk.util.xml.XmlElementNode node) Read XML representation of the action from the XML node.protected voidRestore the config object using from Reader.protected voidRestore the configuration object from a string containing XML object that was generated by toXML().getName()Returns the name for this rulebase element.Returns the schedule name for this rulebase element.protected voidloadFromFile(String xmlFileName, boolean throwExp) Restore the config object using from XML that was generated by toXML().protected voidsaveToFile(String fileName) Save the configuration object to the specific file.voidSets the name of this rulebase element.voidsetSchedule(String schedule) Set the schedule name of this rulebase element.protected StringtoXML()Return an XML string that may be used to restore the configuration object using fromXML.protected voidtoXML(COM.TIBCO.hawk.util.xml.XmlWriter out) Write XML representation of this object to the XML writer.protected voidWrite the object to writer in XML.
-
Field Details
-
CNAME
-
-
Method Details
-
setName
Sets the name of this rulebase element. -
getName
Returns the name for this rulebase element. -
setSchedule
Set the schedule name of this rulebase element. -
getSchedule
Returns the schedule name for this rulebase element. -
equals
Compares two RulebaseElements for equality. -
clone
Returns a copy of this object -
fromXML
Restore the configuration object from a string containing XML object that was generated by toXML().- Parameters:
xmlBuffer-- Throws:
RulebaseException
-
fromXML
Restore the config object using from Reader. Reader input contain the XML represnetation of the configuration object.- Throws:
RulebaseException
-
fromXML
Read XML representation of the action from the XML node.- Parameters:
node- the XML node containing the action.- Throws:
RulebaseException
-
toXML
Return an XML string that may be used to restore the configuration object using fromXML.- See Also:
-
toXML
Write the object to writer in XML.- Throws:
RulebaseException
-
toXML
Write XML representation of this object to the XML writer.- Parameters:
out- the XML writer where the output will be written.- Throws:
IOExceptionRulebaseException
-
loadFromFile
Restore the config object using from XML that was generated by toXML().- Parameters:
fileName- fileName of the file that contain the configuration objectthrowExp- if false, suppress throwing the exception while reading the object.- Throws:
RulebaseException
-
saveToFile
Save the configuration object to the specific file.- Parameters:
fileName- fileName of the file that the configuration object will be written to.- Throws:
RulebaseException
-