public class RuleTemplateXmlParser extends Object
RuleTemplateBo
s from XML.RuleTemplateBo
Constructor and Description |
---|
RuleTemplateXmlParser() |
Modifier and Type | Method and Description |
---|---|
Timestamp |
formatDate(String dateLabel,
String dateString) |
List<RuleTemplateBo> |
parseRuleTemplates(org.jdom.Element element) |
List<RuleTemplateBo> |
parseRuleTemplates(InputStream input) |
protected void |
updateDelegationTemplate(org.jdom.Element ruleTemplateElement,
RuleTemplateBo updatedRuleTemplate,
List<RuleTemplateBo> parsedRuleTemplates)
Updates the rule template delegation template with the one specified in the XML (if any)
|
protected void |
updateOrDeleteRuleTemplateOption(RuleTemplateBo updatedRuleTemplate,
String key,
Object value)
Updates or deletes a specified rule template option on the rule template
|
protected boolean |
updateRuleDefaults(org.jdom.Element defaultsElement,
RuleTemplateBo updatedRuleTemplate)
Updates the default/template rule options with those in the defaults element
|
protected void |
updateRuleTemplateAttributes(org.jdom.Element ruleTemplateElement,
RuleTemplateBo updatedRuleTemplate)
Updates the attributes set on the RuleTemplate
|
protected void |
updateRuleTemplateDefaultOptions(org.jdom.Element ruleTemplateElement,
RuleTemplateBo updatedRuleTemplate)
Updates the rule template default options.
|
protected void |
updateRuleTemplateOptions(org.jdom.Element defaultsElement,
RuleTemplateBo updatedRuleTemplate,
boolean isDelegation)
Updates the rule template defaults options with those in the defaults element
|
public RuleTemplateXmlParser()
public List<RuleTemplateBo> parseRuleTemplates(InputStream input) throws IOException, XmlException
IOException
XmlException
public List<RuleTemplateBo> parseRuleTemplates(org.jdom.Element element) throws XmlException
XmlException
protected void updateRuleTemplateDefaultOptions(org.jdom.Element ruleTemplateElement, RuleTemplateBo updatedRuleTemplate) throws XmlException
ruleTemplateElement
- the rule template XML elementupdatedRuleTemplate
- the RuleTemplate being updatedXmlException
protected void updateRuleTemplateOptions(org.jdom.Element defaultsElement, RuleTemplateBo updatedRuleTemplate, boolean isDelegation) throws XmlException
defaultsElement
- the ruleDefaults elementupdatedRuleTemplate
- the Rule Template being updatedXmlException
protected boolean updateRuleDefaults(org.jdom.Element defaultsElement, RuleTemplateBo updatedRuleTemplate) throws XmlException
defaultsElement
- the ruleDefaults elementupdatedRuleTemplate
- the Rule Template being updatedXmlException
protected void updateOrDeleteRuleTemplateOption(RuleTemplateBo updatedRuleTemplate, String key, Object value)
updatedRuleTemplate
- the RuleTemplate being updatedkey
- the option keyvalue
- the option valueprotected void updateDelegationTemplate(org.jdom.Element ruleTemplateElement, RuleTemplateBo updatedRuleTemplate, List<RuleTemplateBo> parsedRuleTemplates) throws XmlException
ruleTemplateElement
- the XML ruleTemplate elementupdatedRuleTemplate
- the rule template to updateparsedRuleTemplates
- the rule templates parsed in this parsing runXmlException
- if a delegation template was specified but could not be foundprotected void updateRuleTemplateAttributes(org.jdom.Element ruleTemplateElement, RuleTemplateBo updatedRuleTemplate) throws XmlException
ruleTemplateElement
- the XML ruleTemplate elementupdatedRuleTemplate
- the RuleTemplate being updatedXmlException
- if there was a problem parsing the rule template attributespublic Timestamp formatDate(String dateLabel, String dateString) throws XmlException
XmlException
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.