| |
|
| java.lang.Object simple.page.translate.Tracker
Tracker | class Tracker implements Reference(Code) | | The Tracker is used to keep track of files within
the project source directory. This allows the compiler to perform
background compilation, such that a translated and compiled JSP
file can be monitored for changes. Should a change occur the
JSP can be translated and compiled with any modifications. This
also performs its checks in a way that allows multiple contexts
to be used. This allows JSP files to be overridden by simply
changing the context it lives within.
As well as allowing the compiler to determine when modifications
are made to the source JSP, this will allow the generator to
determine the JSP source files included within the root file.
This allows, informative comments to be embedded.
author: Niall Gallagher |
Constructor Summary | |
public | Tracker(Workspace project) Constructor for the Tracker object. |
Method Summary | |
public void | addInclude(String path) This is used to include other JSP files or text files, which
can be translated and compiled into the resulting source. | public List | getIncludes() This provides the list of JSP files that be been used to compose
the resulting source. | public boolean | isDeleted() This is used to determine whether the source files have
been deleted. | public boolean | isModified() This checks if the source or its includes have expired. |
Tracker | public Tracker(Workspace project)(Code) | | Constructor for the Tracker object. This is used
to keep track of the JSP files and its includes. The project is
provided to allow this object to monitor modification times for
root JSP and the sources it includes.
Parameters: project - this is the workspace used to locate the files |
addInclude | public void addInclude(String path)(Code) | | This is used to include other JSP files or text files, which
can be translated and compiled into the resulting source. The
included file is monitored by the JSP engine so that if the
file changes it can be compiled back in to the source.
All included files must be absolute so that its details can
be retrieved using a Context object. This allows
the modification times for the source to be determined.
Parameters: path - an absolute path to the included JSP file |
getIncludes | public List getIncludes()(Code) | | This provides the list of JSP files that be been used to compose
the resulting source. The included files are identified using
a URI path that references a file from the Context
used. This allows a cascading context to search for the file,
such that the file can move and change context, allowing the
translator and compiler to initiate compilation again.
this returns a list of URI paths for JSP includes |
isDeleted | public boolean isDeleted()(Code) | | This is used to determine whether the source files have
been deleted. This is useful when a page should be purged
from the system. A deletion of the file will allow memory
to be freed from the VM and ensures it does not resolve.
true if any of the JSP files were deleted |
isModified | public boolean isModified()(Code) | | This checks if the source or its includes have expired. This
will check the JSP and its includes to determine if the
source has changed in any way. For background compilation
this method can be used to refresh the pages to ensure that
the most up to date code is active.
this returns true if any of the JSP files changed |
|
|
|