Package org.ocpsoft.rewrite.param

Examples of org.ocpsoft.rewrite.param.ParameterizedPatternBuilder


   @Override
   public boolean evaluate(final Rewrite event, final EvaluationContext context)
   {
      if (resource != null)
      {
         ParameterizedPatternBuilder builder = resource.getBuilder();
         if (builder.isParameterComplete(event, context))
         {
            String filePath = builder.build(event, context);
            File file = new File(filePath);
            return filter.accept(file);
         }
      }
      return false;
View Full Code Here


         String target = location.getBuilder().build(event, context, Transpositions.encodePath());
         ((HttpInboundServletRewrite) event).forward(target);
      }
      else if (event instanceof HttpOutboundServletRewrite)
      {
         ParameterizedPatternBuilder builder = location.getBuilder();

         String target = builder.build(event, context, Transpositions.encodePath());
         if (((HttpOutboundServletRewrite) event).getOutboundAddress().getPath().startsWith(event.getContextPath())
                  && target.startsWith("/")
                  && !target.startsWith("//")
                  && !target.startsWith(event.getContextPath()))
         {
View Full Code Here

   @Override
   public boolean evaluateHttp(final HttpServletRewrite event, final EvaluationContext context)
   {
      if (resource != null)
      {
         ParameterizedPatternBuilder builder = resource.getBuilder();
         if (builder.isParameterComplete(event, context))
         {
            String file = builder.build(event, context, Transpositions.encodePath());
            try
            {
               return (event.getServletContext().getResource(file) != null);
            }
            catch (MalformedURLException e)
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.param.ParameterizedPatternBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.