1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.module.ibeans.spi; |
8 | |
|
9 | |
import org.mule.routing.filters.ExpressionFilter; |
10 | |
|
11 | |
import org.ibeans.api.IBeansException; |
12 | |
import org.ibeans.spi.ErrorFilter; |
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | 0 | public class ErrorExpressionFilter extends ExpressionFilter implements ErrorFilter<MuleResponseMessage> |
19 | |
{ |
20 | |
private String errorCodeExpression; |
21 | |
|
22 | |
public ErrorExpressionFilter(String evaluator, String customEvaluator, String expression, String errorCodeExpr) |
23 | |
{ |
24 | 0 | super(evaluator, customEvaluator, expression); |
25 | 0 | if (errorCodeExpr != null && errorCodeExpr.length() > 0) |
26 | |
{ |
27 | 0 | this.errorCodeExpression = errorCodeExpr; |
28 | |
} |
29 | 0 | } |
30 | |
|
31 | |
public ErrorExpressionFilter(String evaluator, String expression, String errorCodeExpr) |
32 | |
{ |
33 | 0 | super(evaluator, expression); |
34 | 0 | if (errorCodeExpr != null && errorCodeExpr.length() > 0) |
35 | |
{ |
36 | 0 | this.errorCodeExpression = errorCodeExpr; |
37 | |
} |
38 | 0 | } |
39 | |
|
40 | |
public ErrorExpressionFilter(String expression) |
41 | |
{ |
42 | 0 | super(expression); |
43 | 0 | } |
44 | |
|
45 | |
public ErrorExpressionFilter() |
46 | |
{ |
47 | 0 | super(); |
48 | 0 | } |
49 | |
|
50 | |
public String getErrorCodeExpression() |
51 | |
{ |
52 | 0 | return errorCodeExpression; |
53 | |
} |
54 | |
|
55 | |
public String getErrorExpression() |
56 | |
{ |
57 | 0 | return getExpression(); |
58 | |
} |
59 | |
|
60 | |
public String getType() |
61 | |
{ |
62 | 0 | return getEvaluator(); |
63 | |
} |
64 | |
|
65 | |
public boolean accept(MuleResponseMessage object) throws IBeansException |
66 | |
{ |
67 | 0 | return accept(object.getMessage()); |
68 | |
} |
69 | |
} |