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