Package org.ocpsoft.rewrite.param

Examples of org.ocpsoft.rewrite.param.DefaultParameter


   }

   @Test
   public void testQueryStringMatchesPattern()
   {
      store.get("x", new DefaultParameter("x").constrainedBy(new RegexConstraint(".*&one=1.*")));
      Query query = Query.matches("{x}");
      query.setParameterStore(store);
      Assert.assertTrue(query.evaluate(rewrite, context));
   }
View Full Code Here


   }

   @Test
   public void testQueryStringBindsToEntireValue()
   {
      store.get("x", new DefaultParameter("x").constrainedBy(new RegexConstraint(".*&one=1.*")));
      Query query = Query.matches("{x}");
      query.setParameterStore(store);
      Assert.assertTrue(query.evaluate(rewrite, context));

      Assert.assertTrue(query.evaluate(rewrite, context));
View Full Code Here

   @Override
   public Set<Parameter<?>> getParameters()
   {
      Set<Parameter<?>> result = new LinkedHashSet<Parameter<?>>();
      result.add(new ImmutableParameter(new DefaultParameter("*").constrainedBy(new RegexConstraint(".*"))));
      return result;
   }
View Full Code Here

                        Set<String> names = parameterized.getRequiredParameterNames();
                        ParameterStore store = ((ParameterizedRule) rule).getParameterStore();

                        if (names != null)
                           for (String name : names) {
                              Parameter<?> parameter = store.get(name, new DefaultParameter(name));
                              if (parameter instanceof ConfigurableParameter<?>)
                                 ((ConfigurableParameter<?>) parameter).bindsTo(Evaluation.property(name));
                           }

                        parameterized.setParameterStore(store);
View Full Code Here

TOP

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

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.