Package org.ocpsoft.rewrite.config

Examples of org.ocpsoft.rewrite.config.Configuration


   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()

               .addRule(Join.path("/{p}").to("/{p}.txt"))
               .when(Not.any(ServletMapping.includes("/{p}")
                        .or(Filesystem.fileExists(new File("/{p}")))
                        .or(Resource.exists("/{p}"))))
View Full Code Here


   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()
               .addRule(Join.path("/user/home").to("/user/home.html"));

      return config;
   }
View Full Code Here

   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()

               .addRule(Join.path("/metadata").to("/internalMetadata"))

               .addRule()
               .perform(Log.message(Level.INFO, "Just loggin somethin'."))
View Full Code Here

   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()
               .addRule()
               .when(Direction.isInbound().and(Path.matches("/path")))
               .perform(SendStatus.code(201))

               .addRule()
View Full Code Here

    * form specified by pattern.
    */
   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()

               /*
                * Set up our rule (This does the work.)
                */
               .addRule(Join.path("/p/{project}").to("/viewProject.xhtml"))
View Full Code Here

   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()
               .addRule()
               .when(Direction.isInbound().and(Path.matches("/param")).and(new HttpCondition() {
                  @Override
                  public boolean evaluateHttp(HttpServletRewrite event, EvaluationContext context)
                  {
View Full Code Here

   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()

               .addRule()
               .when(Direction.isInbound().and(Path.matches("/{path}")))
               .perform(Forward.to("/{path}/{path}"))
View Full Code Here

  }
  @Override
  public Configuration getConfiguration(final ServletContext context)
  {
     Configuration config = ConfigurationBuilder
              .begin()

              .addRule()
              .when(Direction.isInbound().and(Path.matches("/foo/{id}")))
              .perform(SendStatus.code(200))
View Full Code Here

            if (loader == null)
               loader = ConfigurationLoader.create(servletContext);
         }
      }

      Configuration compiledConfiguration = loader.loadConfiguration(servletContext);
      List<Rule> rules = compiledConfiguration.getRules();

      final EvaluationContextImpl context = new EvaluationContextImpl();

      Object cacheKey = null;
      for (int i = 0; i < ruleCacheProviders.size(); i++)
View Full Code Here

            if (loader == null)
               loader = ConfigurationLoader.create(servletContext);
         }
      }

      Configuration compiledConfiguration = loader.loadConfiguration(servletContext);
      List<Rule> rules = compiledConfiguration.getRules();

      final EvaluationContextImpl context = new EvaluationContextImpl();

      Object cacheKey = null;
      for (int i = ruleCacheProviders.size() - 1; i >= 0; i--)
View Full Code Here

TOP

Related Classes of org.ocpsoft.rewrite.config.Configuration

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.