hudson.plugins.dependencyanalyzer.persistence
Class BuildResultSerializer

java.lang.Object
  extended by hudson.plugins.dependencyanalyzer.persistence.BuildResultSerializer

public final class BuildResultSerializer
extends Object

Utility class to persist analysis result into the build root directory.

Author:
Vincent Sellier, Etienne Jouvin

Method Summary
 BuildResult deserialize(File directory)
          Deserialize the result for the passed directory.
static BuildResultSerializer getInstance()
           
 void serialize(File directory, BuildResult result)
          Serialize into an xml file the result into a given directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static BuildResultSerializer getInstance()
Returns:
Default instance.

deserialize

public BuildResult deserialize(File directory)
                        throws IOException
Deserialize the result for the passed directory.

Parameters:
directory - Folder where the file should exists.
Returns:
Dependency analyze result for the build.
Throws:
IOException - File reading exception.

serialize

public void serialize(File directory,
                      BuildResult result)
               throws IOException
Serialize into an xml file the result into a given directory.

Parameters:
directory - Folder where to store the file.
result - Dependency analyze result o serialize.
Throws:
IOException - File writing exception.


Copyright © 2004-2014. All Rights Reserved.