Class RewriteRule
- java.lang.Object
-
- 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
Constructors Constructor Description RewriteRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRewriteAction(RewriteAction action)
List<RewriteAction>
getActions()
org.apache.synapse.commons.evaluators.Evaluator
getCondition()
void
rewrite(URIFragments fragments, MessageContext messageContext)
void
setCondition(org.apache.synapse.commons.evaluators.Evaluator condition)
-
-
-
Method Detail
-
rewrite
public void rewrite(URIFragments fragments, MessageContext messageContext) throws URISyntaxException
- Throws:
URISyntaxException
-
getCondition
public org.apache.synapse.commons.evaluators.Evaluator getCondition()
-
setCondition
public void setCondition(org.apache.synapse.commons.evaluators.Evaluator condition)
-
addRewriteAction
public void addRewriteAction(RewriteAction action)
-
getActions
public List<RewriteAction> getActions()
-
-