Package org.ocpsoft.rewrite.param

Examples of org.ocpsoft.rewrite.param.RegexConstraint


      MockEvaluationContext context = new MockEvaluationContext();
      ParameterUtils.initialize(context, requestParam);
      ParameterStore store = DefaultParameterStore.getInstance(context);

      ((ParameterConfiguration<?>) store.get("value")).constrainedBy(new RegexConstraint("(cab|xxx)"));
      Assert.assertFalse(requestParam.evaluate(rewrite, context));
   }
View Full Code Here


   }

   @Override
   public ConfigurationRuleParameterBuilder matches(final String pattern)
   {
      param.constrainedBy(new RegexConstraint(pattern));
      return this;
   }
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

TOP

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

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.