rewrite-impl-servlet 1.0.5.Final

org.ocpsoft.rewrite.servlet.config
Class Resource

java.lang.Object
  extended by org.ocpsoft.rewrite.config.DefaultConditionBuilder
      extended by org.ocpsoft.rewrite.servlet.config.HttpCondition
          extended by org.ocpsoft.rewrite.servlet.config.Resource
All Implemented Interfaces:
Condition, ConditionBuilder, ConfigurationElement, Parameterized<IResource,IResource.ResourceParameter,String>, IResource

public class Resource
extends HttpCondition
implements IResource

A Condition responsible for determining existence of resources within the web root of the servlet container.

Author:
Lincoln Baxter, III

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ocpsoft.rewrite.servlet.config.IResource
IResource.IResourceParameter, IResource.ResourceParameter
 
Method Summary
 boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
           
static Resource exists(String resource)
          Create a new Condition that returns true if the given resource exists relative to the web root of the current application.
 ParameterizedPattern getResourceExpression()
           
 IResource.ResourceParameter where(String param)
           
 IResource.ResourceParameter where(String param, Binding binding)
           
 
Methods inherited from class org.ocpsoft.rewrite.servlet.config.HttpCondition
evaluate
 
Methods inherited from class org.ocpsoft.rewrite.config.DefaultConditionBuilder
and, andNot, create, or, orNot, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ocpsoft.rewrite.config.ConditionBuilder
and, andNot, or, orNot
 
Methods inherited from interface org.ocpsoft.rewrite.config.Condition
evaluate
 

Method Detail

evaluateHttp

public boolean evaluateHttp(HttpServletRewrite event,
                            EvaluationContext context)
Specified by:
evaluateHttp in class HttpCondition

exists

public static Resource exists(String resource)
Create a new Condition that returns true if the given resource exists relative to the web root of the current application.


where

public IResource.ResourceParameter where(String param)
Specified by:
where in interface Parameterized<IResource,IResource.ResourceParameter,String>

where

public IResource.ResourceParameter where(String param,
                                         Binding binding)
Specified by:
where in interface Parameterized<IResource,IResource.ResourceParameter,String>

getResourceExpression

public ParameterizedPattern getResourceExpression()
Specified by:
getResourceExpression in interface IResource

rewrite-impl-servlet 1.0.5.Final

Copyright © 2012 OCPsoft. All Rights Reserved.