org.apache.synapse.mediators.transform.url
Class RewriteRule

java.lang.Object
  extended by org.apache.synapse.mediators.transform.url.RewriteRule

public class RewriteRule
extends Object

Represents a URL rewrite rule. A rule can consist of an optional condition and one or more rewrite actions. If the condition is present, actions will be executed only when the condition evaluates to true. If the condition is not present, all the provided actions will be executed. If an error occurs while evaluating the condition, the condition is treated as evaluated to false. Condition evaluation is handled by Synapse evaluator framework. When executing multiple rewrite actions, they are executed in the specified order.


Constructor Summary
RewriteRule()
           
 
Method Summary
 void addRewriteAction(RewriteAction action)
           
 List<RewriteAction> getActions()
           
 Evaluator getCondition()
           
 void rewrite(URIFragments fragments, MessageContext messageContext)
           
 void setCondition(Evaluator condition)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RewriteRule

public RewriteRule()
Method Detail

rewrite

public void rewrite(URIFragments fragments,
                    MessageContext messageContext)
             throws URISyntaxException
Throws:
URISyntaxException

getCondition

public Evaluator getCondition()

setCondition

public void setCondition(Evaluator condition)

addRewriteAction

public void addRewriteAction(RewriteAction action)

getActions

public List<RewriteAction> getActions()


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.