org.alfresco.maven.plugin.amp.util
Class AmpStructureSerializer

java.lang.Object
  extended by org.alfresco.maven.plugin.amp.util.AmpStructureSerializer

public class AmpStructureSerializer
extends Object

Serializes AmpStructure back and forth.

Author:
Stephane Nicoll

Constructor Summary
AmpStructureSerializer()
          Creates a new instance of the serializer.
 
Method Summary
 AmpStructure fromXml(File file)
          Reads the AmpStructure from the specified file.
 void toXml(AmpStructure webappStructure, File targetFile)
          Saves the AmpStructure to the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmpStructureSerializer

public AmpStructureSerializer()
Creates a new instance of the serializer.

Method Detail

fromXml

public AmpStructure fromXml(File file)
                     throws IOException
Reads the AmpStructure from the specified file.

Parameters:
file - the file containing the webapp structure
Returns:
the webapp structure
Throws:
IOException - if an error occured while reading the structure

toXml

public void toXml(AmpStructure webappStructure,
                  File targetFile)
           throws IOException
Saves the AmpStructure to the specified file.

Parameters:
webappStructure - the structure to save
targetFile - the file to use to save the structure
Throws:
IOException - if an error occured while saving the webapp structure


Copyright © 2009 Alfresco. All Rights Reserved.