org.springframework.roo.addon.web.flow
Class XmlTemplate

java.lang.Object
  extended by org.springframework.roo.addon.web.flow.XmlTemplate

public class XmlTemplate
extends Object

Provides a method for making updates to an XML file. It relies on FileManager and XmlUtils to do update the XML and provides a convenient callback mechanism that provides access to the Document and the root Element.

Author:
Rossen Stoyanchev

Nested Class Summary
static interface XmlTemplate.DomElementCallback
           
 
Constructor Summary
XmlTemplate(org.springframework.roo.process.manager.FileManager fileManager)
           
 
Method Summary
 void update(String resolvedPathIdentifier, XmlTemplate.DomElementCallback rootElementCallback)
          Wraps common code for updating an XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlTemplate

public XmlTemplate(org.springframework.roo.process.manager.FileManager fileManager)
Method Detail

update

public void update(String resolvedPathIdentifier,
                   XmlTemplate.DomElementCallback rootElementCallback)
Wraps common code for updating an XML file. Callers provide a callback and focus on the actual changes without having to know the rest of the details.

Parameters:
resolvedPathIdentifier - the path to the XML file to update.
rootElementCallback - A callback with the logic that needs to be applied.


Copyright © 2009–2015. All rights reserved.