Examples of IRewriteCondition


Examples of net.sourceforge.urlrewriter4j.core.conditions.IRewriteCondition

    RewriteProcessing oProcessing = null;
    for (int i = 0; i < oRewriteRules.size(); i++) {
      // If the rule is conditional, ensure the conditions are met.
      Object oRule = oRewriteRules.get(i);
      if (oRule instanceof IRewriteCondition) {
        IRewriteCondition oCondition = (IRewriteCondition) oRule;
        if (!oCondition.isMatch(pContext)) continue;
      }
      // Execute the action.
      IRewriteAction oAction = (IRewriteAction) oRewriteRules.get(i);
      oProcessing = oAction.execute(pContext);
   
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.conditions.IRewriteCondition

  protected void parseConditions(Node pNode, List<IRewriteCondition> pConditions, boolean pNegative, RewriterConfiguration pConfig) throws ConfigurationException {
    if (pConfig == null) return;
   
    // Parse attribute-based conditions.
    for (IRewriteConditionParser oParser : pConfig.getConditionParserPipeline()) {
      IRewriteCondition oCondition = oParser.parse(pNode);
      if (oCondition != null) {
        pConditions.add(oCondition);
      }
    }
   
View Full Code Here

Examples of net.sourceforge.urlrewriter4j.core.conditions.IRewriteCondition

  public RewriteProcessing execute(RewriteContext pContext) throws RewriteException {
    RewriteProcessing oResult = RewriteProcessing.ContinueProcessing;
    for (int i = 0; i < mActions.size() && oResult == RewriteProcessing.ContinueProcessing; i++) {
      Object oItem = mActions.get(i);
      if (oItem instanceof IRewriteCondition) {
        IRewriteCondition oCondition = (IRewriteCondition) oItem;
        if (!oCondition.isMatch(pContext)) continue;
     
      IRewriteAction oAction = (IRewriteAction) mActions.get(i);
      oResult = oAction.execute(pContext);   
    }
    return oResult;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.