com.opensymphony.module.sitemesh.mapper
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Field Summary | |
|---|---|
private Config |
config
|
private File |
configFile
|
private String |
configFileName
|
private long |
configLastModified
|
private Map |
decorators
|
private PathMapper |
pathMapper
|
| Constructor Summary | |
|---|---|
ConfigLoader(File configFile)
Create new ConfigLoader using supplied File. |
|
ConfigLoader(String configFileName,
Config config)
Create new ConfigLoader using supplied filename and config. |
|
| Method Summary | |
|---|---|
private static String |
getAttribute(Element element,
String name)
Override default behavior of element.getAttribute (returns the empty string) to return null. |
private static String |
getContainedText(Node parent,
String childTagName)
With a given parent XML Element, find the text contents of the child element with supplied name. |
Decorator |
getDecoratorByName(String name)
Retrieve Decorator based on name specified in configuration file. |
String |
getMappedName(String path)
Get name of Decorator mapped to given path. |
private void |
loadConfig()
Load configuration from file. |
private void |
parseConfig(Document document)
Parse configuration from XML document. |
private void |
populatePathMapper(NodeList patternNodes,
String role,
String name)
Extracts each URL pattern and adds it to the pathMapper map. |
private void |
refresh()
Check if configuration file has been updated, and if so, reload. |
private void |
storeDecorator(Decorator d)
Store Decorator in Map |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Map decorators
private long configLastModified
private File configFile
private String configFileName
private PathMapper pathMapper
private Config config
| Constructor Detail |
|---|
public ConfigLoader(File configFile) throws ServletException
ServletExceptionpublic ConfigLoader(String configFileName, Config config) throws ServletException
ServletException| Method Detail |
|---|
public Decorator getDecoratorByName(String name) throws ServletException
ServletExceptionpublic String getMappedName(String path) throws ServletException
ServletException
private void loadConfig()
throws ServletException
ServletExceptionprivate void parseConfig(Document document)
private void populatePathMapper(NodeList patternNodes, String role, String name)
private static String getAttribute(Element element, String name)
private static String getContainedText(Node parent, String childTagName)
private void storeDecorator(Decorator d)
private void refresh()
throws ServletException
ServletException
|
www.opensymphony.com/sitemesh/ | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||