org.enhydra.xml.xmlc.taskdef
Class DefaultXmlcUtilsImpl
java.lang.Object
|
+--org.enhydra.xml.xmlc.taskdef.XmlcUtils
|
+--org.enhydra.xml.xmlc.taskdef.DefaultXmlcUtilsImpl
- public class DefaultXmlcUtilsImpl
- extends XmlcUtils
Default implementation of the XmlcUtils class
- Version:
- 1.0
- Author:
- Robert Leftwich
Constructor Summary |
protected |
DefaultXmlcUtilsImpl()
Construct default DefaultXmlcUtilsImpl (protected to force the use
of XmlcUtils.create() factory method). |
Method Summary |
String |
buildClassName(String theFullBaseFileName,
String theModifier)
Build a Java class name out of the specified components. |
String |
buildFullBaseFileName(String thePackageName,
String thePackageDir,
String theBaseFileName)
Build a full base file name (i.e. |
String[] |
getOptionFiles(File theDirectory)
Get a list of options files for the specified directory. |
String[] |
getOptionFiles(File[] theDirectories,
String theOptionsFileName)
Get a list of options files for the specified directories,
having the specified name. |
String[] |
getOptionFiles(File[] theDirectories,
String[] theOptionsFileNames)
Get a list of options files for the specified directories,
having the specified names. |
String[] |
getOptionFiles(File theDirectory,
String theOptionsFileName)
Get a list of options files for the specified directory,
having the specified name. |
String[] |
getOptionFiles(File theDirectory,
String[] theOptionsFileNames)
Get a list of options files for the specified directory,
having the specified names. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultXmlcUtilsImpl
protected DefaultXmlcUtilsImpl()
- Construct default DefaultXmlcUtilsImpl (protected to force the use
of XmlcUtils.create() factory method).
getOptionFiles
public String[] getOptionFiles(File theDirectory)
- Get a list of options files for the specified directory.
This method will search for the default options file name
(options.xmlc) in the specified directory and the user.dir
directory as well. It will return them in that order.
- Overrides:
getOptionFiles
in class XmlcUtils
- Parameters:
theDirectory
- The directory to look in for the options file.- Returns:
- An array of options files with absolute paths.
An empty array if none found.
getOptionFiles
public String[] getOptionFiles(File theDirectory,
String theOptionsFileName)
- Get a list of options files for the specified directory,
having the specified name. This method will search for the
specified options file name and the default options file name
(options.xmlc) in the specified directory and the user.dir
directory as well. It will return them in that order.
- Overrides:
getOptionFiles
in class XmlcUtils
- Parameters:
theDirectory
- The directory to look in for the options file.theOptionsFileName
- The name of the options file to look for.- Returns:
- An array of options files with absolute paths.
An empty array if none found.
getOptionFiles
public String[] getOptionFiles(File theDirectory,
String[] theOptionsFileNames)
- Get a list of options files for the specified directory,
having the specified names. This method will search for the
specified options file names and the default options file name
(options.xmlc) in the specified directory and the user.dir
directory as well. It will return them in that order.
- Overrides:
getOptionFiles
in class XmlcUtils
- Parameters:
theDirectory
- The directory to look in for the options file.theOptionsFileNames
- The list of names of the options file to look for.- Returns:
- An array of options files with absolute paths.
An empty array if none found.
getOptionFiles
public String[] getOptionFiles(File[] theDirectories,
String theOptionsFileName)
- Get a list of options files for the specified directories,
having the specified name. This method will search for the
specified options file name and the default options file name
(options.xmlc) in the specified directories and the user.dir
directory as well. It will return them in that order.
- Overrides:
getOptionFiles
in class XmlcUtils
- Parameters:
theDirectories
- The list of directories to look in for the options files.theOptionsFileName
- The name of the options file to look for.- Returns:
- An array of options files with absolute paths.
An empty array if none found.
getOptionFiles
public String[] getOptionFiles(File[] theDirectories,
String[] theOptionsFileNames)
- Get a list of options files for the specified directories,
having the specified names. This method will search for the
specified options file names and the default options file name
(options.xmlc) in the specified directories and the user.dir
directory as well. It will return them in that order.
- Overrides:
getOptionFiles
in class XmlcUtils
- Parameters:
theDirectories
- The list of directories to look in for the options files.theOptionsFileNames
- The list of names of the options file to look for.- Returns:
- An array of options files with absolute paths.
An empty array if none found.
buildFullBaseFileName
public String buildFullBaseFileName(String thePackageName,
String thePackageDir,
String theBaseFileName)
- Build a full base file name (i.e. with no file type) out of
the specified components.
Note that any directory prefix on the theBaseFileName file is stripped before
thePackageDir is applied. So that the following call :
buildFullBaseFileName("a.b.c", "foo/resources", "config/test.html");
will return a string of "a/b/c/foo/resources/test"
and this call :
buildFullBaseFileName("a.b.c", "", "config/test.html");
will return a string of "a/b/c/config/test"
- Overrides:
buildFullBaseFileName
in class XmlcUtils
- Parameters:
thePackageName
- The name of the package to prepend to the file name.
This should be specified using the Java naming convention
i.e. org.enhydra.xmlcthePackageDir
- The name of the directory to prepend to the file name.
This is a directory path that can be specified using either '/' or '\'
i.e. foo/resourcestheBaseFileName
- The base file name that the preceding strings are prepended to.- Returns:
- A string representing the full path resulting from the specified components
with all separators set to '/'
buildClassName
public String buildClassName(String theFullBaseFileName,
String theModifier)
- Build a Java class name out of the specified components.
- Overrides:
buildClassName
in class XmlcUtils
- Parameters:
theFullBaseFileName
- The full base file name (specified with '/' separators)
and no file type. e.g. "org.enhydra.test"theModifier
- The file modifier to append to the class name
e.g. HTML- Returns:
- A Java class name string
Copyright © 1999-2002 David Li, enhydra.org. All Rights reserved.