org.codehaus.mojo.jsimport
Class FileDependencyPersistanceUtil

java.lang.Object
  extended by org.codehaus.mojo.jsimport.FileDependencyPersistanceUtil

public final class FileDependencyPersistanceUtil
extends Object

Responsible for providing various utilities against the persistance of a file dependency graph.

Author:
huntc

Method Summary
static long readFileDependencyGraph(File workFolder, Map<String,LinkedHashSet<String>> fileDependencies, Map<String,String> fileAssignedGlobals)
          Read in an existing dependency graph and return its modification time.
static void writeFileDependencyGraph(File workFolder, Map<String,LinkedHashSet<String>> fileDependencies, Map<String,String> fileAssignedGlobals)
          Write out the file dependency graph for processing by other phases.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

readFileDependencyGraph

public static long readFileDependencyGraph(File workFolder,
                                           Map<String,LinkedHashSet<String>> fileDependencies,
                                           Map<String,String> fileAssignedGlobals)
                                    throws org.apache.maven.plugin.MojoExecutionException
Read in an existing dependency graph and return its modification time. We can then check whether a specific dependency needs to be processed again.

Parameters:
workFolder - the folder to look for the dependency file in.
fileDependencies - the dependency graph to read.
fileAssignedGlobals - the assigned globals map to read.
Returns:
the modification time of the file or 0 if no file exists.
Throws:
org.apache.maven.plugin.MojoExecutionException - if we have a problem reading the graph.

writeFileDependencyGraph

public static void writeFileDependencyGraph(File workFolder,
                                            Map<String,LinkedHashSet<String>> fileDependencies,
                                            Map<String,String> fileAssignedGlobals)
                                     throws org.apache.maven.plugin.MojoExecutionException
Write out the file dependency graph for processing by other phases.

Parameters:
workFolder - the folder to write to.
fileDependencies - the dependency graph to write.
fileAssignedGlobals - the assigned globals map to write.
Throws:
org.apache.maven.plugin.MojoExecutionException - if we have a problem persisting the graph.


Copyright © 2010-2012 Codehaus. All Rights Reserved.