public class Resource extends HttpCondition implements Parameterized
Condition responsible for determining existence of resources within the
ServletContext.getResourcePaths(String) of the servlet container.| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluateHttp(HttpServletRewrite event,
EvaluationContext context) |
static Resource |
exists(String resource)
Create a
Condition that returns true if the given resource exists in the
ServletContext.getResourcePaths(String) of the current application. |
ParameterizedPatternParser |
getExpression()
Get the
ParameterizedPattern of this Resource. |
Set<String> |
getRequiredParameterNames() |
void |
setParameterStore(ParameterStore store) |
evaluateand, andNot, or, orNotpublic boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
evaluateHttp in class HttpConditionpublic static Resource exists(String resource)
Condition that returns true if the given resource exists in the
ServletContext.getResourcePaths(String) of the current application.
The given resource path may be parameterized:
/example/{param}.html
/css/{value}.css
...
location - ParameterizedPattern specifying the Address of the internal resource.ConfigurationRuleParameterBuilder#where(String)}public ParameterizedPatternParser getExpression()
ParameterizedPattern of this Resource.public Set<String> getRequiredParameterNames()
getRequiredParameterNames in interface Parameterizedpublic void setParameterStore(ParameterStore store)
setParameterStore in interface ParameterizedCopyright © 2013 OCPsoft. All Rights Reserved.