Package org.ocpsoft.rewrite.config

Examples of org.ocpsoft.rewrite.config.Condition


   }

   @Override
   public void process(ClassContext context, ShiroRoleRequired annotation, HandlerChain chain)
   {
      Condition roleCondition = new ShiroRoleCondition(annotation.value());
      Condition conjunction = context.getRuleBuilder().getConditionBuilder().and(roleCondition);
      context.getRuleBuilder().when(conjunction);
      chain.proceed();
   }
View Full Code Here


      /*
      * Add the query parameter condition to the condition tree that will capture a
      * corresponding query parameter. We must make sure that
      * the condition is evaluated even if the existing part of the tree evaluates to true.
      */
      Condition requestParameter = RequestParameter.matches(param, "{" + param + "}");
      ConditionBuilder composite = context.getRuleBuilder().getConditionBuilder().and(
               Or.any(requestParameter, new True()));
      context.getRuleBuilder().when(composite);

      // builder for this parameter
View Full Code Here

   public Configuration getConfiguration(final ServletContext context)
   {
      return ConfigurationBuilder
               .begin()
               .addRule()
               .when(Path.matches("/cdi/inject").and(new Condition() {
                  @Override
                  public boolean evaluate(final Rewrite event, final EvaluationContext context)
                  {
                     return bean != null;
                  }
View Full Code Here

TOP

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

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.