org.mod4j.common.generator.admin
Class Mod4jTracker

java.lang.Object
  extended by org.mod4j.common.generator.admin.Mod4jTracker

public class Mod4jTracker
extends java.lang.Object


Method Summary
 void addProjectTrack(ProjectTrack projectTrack)
          Add the project track to the list of managed projects.
 void clear()
           
static java.lang.String extend(java.lang.String moduleName, java.lang.String filename)
          Static, because this is used in Xpand templates.
static java.lang.String extend(java.lang.String moduleName, java.lang.String subFolderPath, java.lang.String fileName)
          Static, because this is used in Xpand templates.
 void finishResource(java.lang.String resource, java.lang.String applicationPath, java.lang.String projectPath)
          Notify the ExtensionPointtracker that 'resource'is finished
static java.lang.String fullExtendPath(java.lang.String moduleName, java.lang.String filename)
          Static, because this is used in Xpand templates.
static java.lang.String fullExtendPath(java.lang.String moduleName, java.lang.String subFolderPath, java.lang.String filename)
          Static, because this is used in Xpand templates.
static java.lang.String fullGeneratePath(java.lang.String moduleName, java.lang.String filename)
          Static, because this is used in Xpand templates.
static java.lang.String fullGenerateResourcePath(java.lang.String moduleName, java.lang.String filename)
          Static, because this is used in Xpand templates.
static java.lang.String generate(java.lang.String moduleName, java.lang.String filename)
          The file 'filename' is to be generated within 'moduleName'.
 ProjectTrack getCurrentProject()
           
 FileTrack getCurrentTrack()
           
static java.lang.String getDefaultModuleManFilePath(java.lang.String moduleName, java.lang.String fileName)
          Determine the default file-path for manual maintained sources or resources, based on the given fileName and moduleName.
static java.lang.String getFilePath(java.lang.String moduleName, java.lang.String subFolderPath, java.lang.String fileName)
          Returns the file-path, based on the given moduleName, subFolderPath and fileName.
static Mod4jTracker getFileTracker()
           
 java.util.Collection<ProjectTrack> getProjects()
           
 void initResource(java.lang.String resource)
          Notify the ExtensionPointtracker that 'resource'is started This used by the Maven plugin
 void initResource(java.lang.String resource, java.lang.String applicationPath, java.lang.String projectPath)
          Notify the ExtensionPointtracker that code will be generated for 'resource' This is used by the Eclipse Mod4j Builder and set the current project such that the Xpand templates will refer to the correct template.
static java.lang.String retain(java.lang.String moduleName, java.lang.String filename)
          Static, because this is used in Xpand templates.
static java.lang.String retain(java.lang.String moduleName, java.lang.String subFolderPath, java.lang.String filename)
          Static, because this is used in Xpand templates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCurrentProject

public ProjectTrack getCurrentProject()
Returns:
the currentProject

getProjects

public java.util.Collection<ProjectTrack> getProjects()
Returns:
The collection of all Project Tracks

clear

public void clear()

getCurrentTrack

public FileTrack getCurrentTrack()
Returns:
the currentTrack

getFileTracker

public static Mod4jTracker getFileTracker()
Returns:
Return the singleton instance of this class

initResource

public void initResource(java.lang.String resource)
Notify the ExtensionPointtracker that 'resource'is started This used by the Maven plugin

Parameters:
resource -

initResource

public void initResource(java.lang.String resource,
                         java.lang.String applicationPath,
                         java.lang.String projectPath)
Notify the ExtensionPointtracker that code will be generated for 'resource' This is used by the Eclipse Mod4j Builder and set the current project such that the Xpand templates will refer to the correct template.

Parameters:
resource -

finishResource

public void finishResource(java.lang.String resource,
                           java.lang.String applicationPath,
                           java.lang.String projectPath)
Notify the ExtensionPointtracker that 'resource'is finished

Parameters:
resource -

addProjectTrack

public void addProjectTrack(ProjectTrack projectTrack)
Add the project track to the list of managed projects. Overwrite any project with the same path that is already in the managed collection

Parameters:
projectTrack - The new projectTrack to add

generate

public static java.lang.String generate(java.lang.String moduleName,
                                        java.lang.String filename)
The file 'filename' is to be generated within 'moduleName'. the name of the resulting file will be returned and stored in the file tracker. Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

extend

public static java.lang.String extend(java.lang.String moduleName,
                                      java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

extend

public static java.lang.String extend(java.lang.String moduleName,
                                      java.lang.String subFolderPath,
                                      java.lang.String fileName)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
subFolderPath -
fileName -
Returns:

retain

public static java.lang.String retain(java.lang.String moduleName,
                                      java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

retain

public static java.lang.String retain(java.lang.String moduleName,
                                      java.lang.String subFolderPath,
                                      java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
subFolderPath -
filename -
Returns:

fullExtendPath

public static java.lang.String fullExtendPath(java.lang.String moduleName,
                                              java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

fullExtendPath

public static java.lang.String fullExtendPath(java.lang.String moduleName,
                                              java.lang.String subFolderPath,
                                              java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

fullGeneratePath

public static java.lang.String fullGeneratePath(java.lang.String moduleName,
                                                java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

fullGenerateResourcePath

public static java.lang.String fullGenerateResourcePath(java.lang.String moduleName,
                                                        java.lang.String filename)
Static, because this is used in Xpand templates.

Parameters:
moduleName -
filename -
Returns:

getDefaultModuleManFilePath

public static java.lang.String getDefaultModuleManFilePath(java.lang.String moduleName,
                                                           java.lang.String fileName)
Determine the default file-path for manual maintained sources or resources, based on the given fileName and moduleName. E.g.
MyApp-domain/src/main/resources/filenname.xml. Or
MyApp-domain/src/main/java/filename.java

Parameters:
moduleName -
fileName -
Returns:
The path to the given fileName.

getFilePath

public static java.lang.String getFilePath(java.lang.String moduleName,
                                           java.lang.String subFolderPath,
                                           java.lang.String fileName)
Returns the file-path, based on the given moduleName, subFolderPath and fileName. E.g.
MyApp-domain/src/main/webapp/WEB-INF/applicationContext.xml.

Parameters:
moduleName -
subFolderPath -
fileName -
Returns:
The path to the given fileName.


Copyright © 2010 Mod4j. All Rights Reserved.