Coverage Report - org.mule.module.ibeans.spi.ErrorExpressionFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
ErrorExpressionFilter
0%
0/17
0%
0/8
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 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  
  * An implementation of a {@link org.ibeans.spi.ErrorFilter} that allows for error filter expressions to be configured on
 16  
  * an iBean
 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  
 }