|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.clay.config.beans.ConfigDefinitionsWatchdogFilter
public class ConfigDefinitionsWatchdogFilter
This is the timing mechanism for looking for modified Clay templates and configuration files. This is a preprocess filter chains command that should only be used in the development environment.
Field Summary |
---|
Fields inherited from interface org.apache.commons.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
ConfigDefinitionsWatchdogFilter()
|
Method Summary | |
---|---|
protected void |
accept(Context context)
Trigger reloading of the Clay 's
xml configuration files if the
org.apache.shale.clay.AUTO_RELOAD_CONFIG_FILES init
parameter is set to true in the web.xml. |
boolean |
execute(Context context)
Perform the matching algorithm against the value returned by the value() method. |
String |
getIncludes()
|
protected boolean |
matches(String expr,
Pattern[] patterns,
boolean unrestricted)
Match the specified expression against the specified precompiled patterns. |
void |
setIncludes(String includes)
Set the comma-delimited regular expression patterns to include remote host names that match, if any; or null for no
restrictions. |
protected String |
value(Context context)
Return the servlet path (if any) concatenated with the path info (if any) for this request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigDefinitionsWatchdogFilter()
Method Detail |
---|
public String getIncludes()
null
.public void setIncludes(String includes)
Set the comma-delimited regular expression patterns to include
remote host names that match, if any; or null
for no
restrictions.
includes
- New include pattern(s)protected String value(Context context)
Return the servlet path (if any) concatenated with the path info (if any) for this request.
context
- Context
for the current request
public boolean execute(Context context) throws Exception
Perform the matching algorithm against the value
returned by the value()
method. If the
value matches()
the includes
pattern list, the Clay
configuration files are checked for changes and reloaded.
execute
in interface Command
context
- ShaleWebContext
for this request
true
if the chain is done
Exception
- thrown back to the calling commandprotected void accept(Context context) throws Exception
Trigger reloading of the Clay
's
xml configuration files if the
org.apache.shale.clay.AUTO_RELOAD_CONFIG_FILES
init
parameter is set to true
in the web.xml. The HTML templates
are re-cashed on-demand due to their atomicity. The XML configuration
files are shared by all Clay
view composition mechanisms so all files must be reloaded if a change
is made.
context
- Context
for the current request
Exception
- thrown back to the callerprotected boolean matches(String expr, Pattern[] patterns, boolean unrestricted)
Match the specified expression against the specified precompiled
patterns. If there are no patterns, return the specified unrestricted
return value; otherwise, return true
if the expression
matches one of the patterns, or false
otherwise.
expr
- Expression to be testedpatterns
- Array of Pattern
to be tested againstunrestricted
- Result to be returned if there are no matches
true
if a match is found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |