Package org.ocpsoft.rewrite.param

Examples of org.ocpsoft.rewrite.param.DefaultParameterStore


   private final List<Operation> preOperations = new ArrayList<Operation>();
   private final List<Operation> postOperations = new ArrayList<Operation>();

   public MockEvaluationContext()
   {
      put(ParameterStore.class, new DefaultParameterStore());
      put(ParameterValueStore.class, new DefaultParameterValueStore());
   }
View Full Code Here


      private final List<Operation> postOperations = new ArrayList<Operation>();
      private RewriteState state;

      public EvaluationContextImpl()
      {
         put(ParameterStore.class, new DefaultParameterStore());
      }
View Full Code Here

   protected Map<Object, Object> contextMap = new HashMap<Object, Object>();
   private Rule wrapped;

   private RuleBuilder()
   {
      store = new DefaultParameterStore();
   }
View Full Code Here

      store = new DefaultParameterStore();
   }

   private RuleBuilder(Rule rule)
   {
      store = new DefaultParameterStore();
      withId(rule.getId());

      if (rule instanceof Weighted)
         withPriority(((Weighted) rule).priority());
View Full Code Here

               .thenReturn("/context");

      rewrite = new HttpInboundRewriteImpl(request, null, null);
      context = new MockEvaluationContext();
      context.put(ParameterValueStore.class, new DefaultParameterValueStore());
      store = new DefaultParameterStore();
      context.put(ParameterStore.class, store);
   }
View Full Code Here

   @Test
   public void testMultipleParameterStoreInvocationsReturnSameParam()
   {
      Path path = Path.matches("/something/#{param}");
      ParameterStore store = new DefaultParameterStore();
      ParameterUtils.initialize(store, path);

      Parameter<?> p1 = store.get("param");
      Parameter<?> p2 = store.get("param");
      assertTrue(p1 == p2);
   }
View Full Code Here

               .thenReturn("/context");

      rewrite = new HttpInboundRewriteImpl(request, null, null);
      context = new MockEvaluationContext();
      context.put(ParameterValueStore.class, new DefaultParameterValueStore());
      store = new DefaultParameterStore();
      context.put(ParameterStore.class, store);
   }
View Full Code Here

   private final List<Operation> postOperations = new ArrayList<Operation>();
   private RewriteState state;

   public EvaluationContextImpl()
   {
      put(ParameterStore.class, new DefaultParameterStore());
   }
View Full Code Here

   @Test
   public void testCannotUseRegexes()
   {
      Header header = Header.matches(".*Accept-Charset", "blah");

      ParameterStore parameters = new DefaultParameterStore();
      ParameterUtils.initialize(parameters, header);

      Assert.assertFalse(header.evaluate(rewrite, new MockEvaluationContext()));
   }
View Full Code Here

   @Test
   public void testDoesNotMatchNonHttpRewrites()
   {
      Header header = Header.exists("Accept-Charset");

      ParameterStore parameters = new DefaultParameterStore();
      ParameterUtils.initialize(parameters, header);

      Assert.assertFalse(header.evaluate(new MockRewrite(), new MockEvaluationContext()));
   }
View Full Code Here

TOP

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

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.