|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.kew.xml.RuleTemplateXmlParser
public class RuleTemplateXmlParser
Parses RuleTemplate
s from XML.
RuleTemplate
Field Summary | |
---|---|
private static boolean |
DEFAULT_ATTRIBUTE_ACTIVE
|
private static boolean |
DEFAULT_ATTRIBUTE_REQUIRED
By default make attributes defined without a <required> element |
private static String |
DUMMY_DOCUMENT_TYPE
A dummy document type used in the default rule |
private static org.apache.log4j.Logger |
LOG
|
private int |
templateAttributeCounter
Used to set the display order of attributes encountered in parsing runs during the lifetime of this object |
Constructor Summary | |
---|---|
RuleTemplateXmlParser()
|
Method Summary | |
---|---|
Timestamp |
formatDate(String dateLabel,
String dateString)
|
private RuleTemplate |
parseRuleTemplate(org.jdom.Element element,
List<RuleTemplate> ruleTemplates)
|
private RuleTemplateAttribute |
parseRuleTemplateAttribute(org.jdom.Element element,
RuleTemplate ruleTemplate)
Parses a rule template attribute |
private List<RuleTemplateAttribute> |
parseRuleTemplateAttributes(org.jdom.Element attributesElement,
RuleTemplate ruleTemplate)
Parses the RuleTemplateAttributes defined on the rule template element |
List<RuleTemplate> |
parseRuleTemplates(org.jdom.Element element)
|
List<RuleTemplate> |
parseRuleTemplates(InputStream input)
|
protected void |
updateDelegationTemplate(org.jdom.Element ruleTemplateElement,
RuleTemplate updatedRuleTemplate,
List<RuleTemplate> parsedRuleTemplates)
Updates the rule template delegation template with the one specified in the XML (if any) |
protected void |
updateOrDeleteRuleTemplateOption(RuleTemplate updatedRuleTemplate,
String key,
Object value)
Updates or deletes a specified rule template option on the rule template |
protected boolean |
updateRuleDefaults(org.jdom.Element defaultsElement,
RuleTemplate updatedRuleTemplate)
Updates the default/template rule options with those in the defaults element |
protected void |
updateRuleTemplateAttributes(org.jdom.Element ruleTemplateElement,
RuleTemplate updatedRuleTemplate)
Updates the attributes set on the RuleTemplate |
protected void |
updateRuleTemplateDefaultOptions(org.jdom.Element ruleTemplateElement,
RuleTemplate updatedRuleTemplate)
Updates the rule template default options. |
protected void |
updateRuleTemplateOptions(org.jdom.Element defaultsElement,
RuleTemplate updatedRuleTemplate,
boolean isDelegation)
Updates the rule template defaults options with those in the defaults element |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger LOG
private static final boolean DEFAULT_ATTRIBUTE_REQUIRED
private static final boolean DEFAULT_ATTRIBUTE_ACTIVE
private static final String DUMMY_DOCUMENT_TYPE
private int templateAttributeCounter
Constructor Detail |
---|
public RuleTemplateXmlParser()
Method Detail |
---|
public List<RuleTemplate> parseRuleTemplates(InputStream input) throws IOException, InvalidXmlException
IOException
InvalidXmlException
public List<RuleTemplate> parseRuleTemplates(org.jdom.Element element) throws InvalidXmlException
InvalidXmlException
private RuleTemplate parseRuleTemplate(org.jdom.Element element, List<RuleTemplate> ruleTemplates) throws InvalidXmlException
InvalidXmlException
protected void updateRuleTemplateDefaultOptions(org.jdom.Element ruleTemplateElement, RuleTemplate updatedRuleTemplate) throws InvalidXmlException
ruleTemplateElement
- the rule template XML elementupdatedRuleTemplate
- the RuleTemplate being updated
InvalidXmlException
protected void updateRuleTemplateOptions(org.jdom.Element defaultsElement, RuleTemplate updatedRuleTemplate, boolean isDelegation) throws InvalidXmlException
defaultsElement
- the ruleDefaults elementupdatedRuleTemplate
- the Rule Template being updated
InvalidXmlException
protected boolean updateRuleDefaults(org.jdom.Element defaultsElement, RuleTemplate updatedRuleTemplate) throws InvalidXmlException
defaultsElement
- the ruleDefaults elementupdatedRuleTemplate
- the Rule Template being updated
InvalidXmlException
protected void updateOrDeleteRuleTemplateOption(RuleTemplate updatedRuleTemplate, String key, Object value)
updatedRuleTemplate
- the RuleTemplate being updatedkey
- the option keyvalue
- the option valueprotected void updateDelegationTemplate(org.jdom.Element ruleTemplateElement, RuleTemplate updatedRuleTemplate, List<RuleTemplate> parsedRuleTemplates) throws InvalidXmlException
ruleTemplateElement
- the XML ruleTemplate elementupdatedRuleTemplate
- the rule template to updateparsedRuleTemplates
- the rule templates parsed in this parsing run
InvalidXmlException
- if a delegation template was specified but could not be foundprotected void updateRuleTemplateAttributes(org.jdom.Element ruleTemplateElement, RuleTemplate updatedRuleTemplate) throws InvalidXmlException
ruleTemplateElement
- the XML ruleTemplate elementupdatedRuleTemplate
- the RuleTemplate being updated
InvalidXmlException
- if there was a problem parsing the rule template attributesprivate List<RuleTemplateAttribute> parseRuleTemplateAttributes(org.jdom.Element attributesElement, RuleTemplate ruleTemplate) throws InvalidXmlException
attributesElement
- the jdom Element object for the Rule Template attributesruleTemplate
- the RuleTemplate object
InvalidXmlException
private RuleTemplateAttribute parseRuleTemplateAttribute(org.jdom.Element element, RuleTemplate ruleTemplate) throws InvalidXmlException
element
- the attribute XML elementruleTemplate
- the ruleTemplate to update
InvalidXmlException
- if the attribute does not existpublic Timestamp formatDate(String dateLabel, String dateString) throws InvalidXmlException
InvalidXmlException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |