public final class ContextName extends Object
Constructor and Description |
---|
ContextName(String name,
boolean stripFileExtension)
Creates an instance from a context name, display name, base name,
directory name, WAR name or context.xml name.
|
ContextName(String path,
String version)
Construct an instance from a path and version.
|
Modifier and Type | Method and Description |
---|---|
static ContextName |
extractFromPath(String path)
Extract the final component of the given path which is assumed to be a
base name and generate a
ContextName from that base name. |
String |
getBaseName() |
String |
getDisplayName() |
String |
getName() |
String |
getPath() |
String |
getVersion() |
String |
toString() |
public static final String ROOT_NAME
public ContextName(String name, boolean stripFileExtension)
name
- The name to use as the basis for this objectstripFileExtension
- If a .war or .xml file extension is present
at the end of the provided name should it be
removed?public String getBaseName()
public String getPath()
public String getVersion()
public String getName()
public String getDisplayName()
public static ContextName extractFromPath(String path)
ContextName
from that base name.path
- The path that ends in a base nameContextName
generated from the given base nameCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.