Package org.ocpsoft.rewrite.config

Examples of org.ocpsoft.rewrite.config.Configuration


{

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

               .addRule()
               .when(JAASRoles.required("admin").and(Direction.isInbound())
                        .and(Path.matches("/admin/{tail}")))
View Full Code Here


   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()
               .addRule().when(Path.matches("{*}.txt"))
               .perform(SendStatus.code(200));

      return config;
   }
View Full Code Here

    * If URL matches path convert the URL to the form specified by resource.
    */
   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder
               .begin()

               /*
                * Set up our rule (This does the work.)
                */
 
View Full Code Here

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

               /*
                * Test Request Binding
                */
               .addRule(Join.path("/rb/{p1}").to("/rb.xhtml"))
View Full Code Here

   }

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

               .addRule().when(Path.matches("/abort")).perform(Lifecycle.abort())
               .addRule().when(Path.matches("/abort{path}"))
               .perform(SendStatus.code(400))
               .where("path").matches(".*")
 
View Full Code Here

   }

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

               /*
                * Valid case: Outbound URL is rewritten because it matches the
                * constraints on Join parameters
View Full Code Here

   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder
               .begin()
               .addRule()
               .when(Path.matches("/requestBinding/{1}/{2}"))
               .perform(new HttpOperation() {
View Full Code Here

   }

   @Override
   public Configuration getConfiguration(final ServletContext context)
   {
      Configuration config = ConfigurationBuilder.begin()
               .addRule(Join.path("/bind/{id}").to("/bind.html"))
               .where("id").bindsTo(RequestBinding.parameter("join-id"))

               .addRule()
               .when(Path.matches("/bind.html").and(RequestParameter.exists("join-id")))
View Full Code Here

   }

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

               /*
                * Handle a request with Path parameter binding
                */
               .addRule()
View Full Code Here

   }

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

               .addRule()
               .when(Direction.isOutbound().and(Path.matches("/outbound/{3}")))
               .perform(Substitute.with("/outbound/{3}"))
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.