public class BaseHome extends Object
${jetty.home}
, ${jetty.base}
, directories.
By default, both ${jetty.home}
and ${jetty.base}
are the same directory, but they can point at different directories.
The ${jetty.home}
directory is where the main Jetty binaries and default configuration is housed.
The ${jetty.base}
directory is where the execution specific configuration and webapps are obtained from.
Constructor and Description |
---|
BaseHome() |
BaseHome(File homeDir,
File baseDir) |
Modifier and Type | Method and Description |
---|---|
String |
getBase() |
File |
getBaseDir() |
File |
getBaseFile(String path)
Create a file reference to some content in
"${jetty.base}" |
File |
getFile(String path)
Get a specific file reference.
|
String |
getHome() |
File |
getHomeDir() |
void |
initialize(StartArgs args) |
boolean |
isBaseDifferent() |
List<File> |
listFiles(String relPathToDirectory)
Get all of the files that are in a specific relative directory.
|
List<File> |
listFiles(String relPathToDirectory,
FileFilter filter)
Get all of the files that are in a specific relative directory, with applied
FileFilter |
List<File> |
listFilesRegex(String regex)
Get all of the files that are in a specific relative directory, with applied regex.
|
List<File> |
rawListFiles(String relPathToDirectory,
FileFilter filter)
Collect the list of files in both
${jetty.base} and ${jetty.home} , even if the same file shows up in both places. |
void |
setBaseDir(File dir) |
void |
setHomeDir(File dir) |
String |
toShortForm(File path)
Convenience method for
toShortForm(file.getCanonicalPath()) |
String |
toShortForm(String path)
Replace/Shorten arbitrary path with property strings
"${jetty.home}" or "${jetty.base}" where appropriate. |
public String getBase()
public File getBaseDir()
public File getBaseFile(String path)
"${jetty.base}"
path
- the path to referencepublic File getFile(String path)
File references go through 3 possibly scenarios.
${jetty.base}
, return that reference${jetty.home}
, return that referencepath
- the path to get.public String getHome()
public File getHomeDir()
public void initialize(StartArgs args)
public boolean isBaseDifferent()
public List<File> listFiles(String relPathToDirectory)
If the same found path exists in both ${jetty.base}
and ${jetty.home}
, then the one in ${jetty.base}
is returned
(it overrides the one in ${jetty.home})
relPathToDirectory
- the relative path to the directorypublic List<File> listFiles(String relPathToDirectory, FileFilter filter)
FileFilter
If the same found path exists in both ${jetty.base}
and ${jetty.home}
, then the one in ${jetty.base}
is returned
(it overrides the one in ${jetty.home})
relPathToDirectory
- the relative path to the directoryfilter
- the filter to usepublic List<File> listFilesRegex(String regex)
If the same found path exists in both ${jetty.base}
and ${jetty.home}
, then the one in ${jetty.base}
is returned
(it overrides the one in ${jetty.home})
All regex paths are assumed to be in unix notation (use of "/"
to separate paths, as "\"
is used to escape in regex)
regex
- the regex to use to match against the found files.public List<File> rawListFiles(String relPathToDirectory, FileFilter filter)
${jetty.base}
and ${jetty.home}
, even if the same file shows up in both places.public void setBaseDir(File dir)
public void setHomeDir(File dir)
public String toShortForm(File path)
toShortForm(file.getCanonicalPath())
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.