View Javadoc

1   /*
2    * $Id: ErrorFilterIBean.java 19104 2010-08-18 19:07:53Z rossmason $
3    * -------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.module.ibeans.annotations;
11  
12  
13  import org.ibeans.annotation.Template;
14  import org.ibeans.annotation.filter.ExpressionErrorFilter;
15  import org.ibeans.annotation.filter.JsonErrorFilter;
16  import org.ibeans.annotation.filter.XmlErrorFilter;
17  import org.ibeans.annotation.param.Body;
18  import org.ibeans.annotation.param.HeaderParam;
19  import org.ibeans.api.CallException;
20  
21  /**
22   * TODO
23   */
24  @JsonErrorFilter(expr = "/message/errorMsg", errorCode = "/message/error")
25  @XmlErrorFilter(expr = "/message/errorMsg", errorCode = "/message/error")
26  @ExpressionErrorFilter(eval = "regex", expr = "errorMsg", mimeType = "text/plain")
27  public interface ErrorFilterIBean
28  {
29      @Template("")
30      public String jsonErrorFilter(@Body String testData, @HeaderParam("Content-Type") String contentType) throws CallException;
31  
32      @Template("")
33      public String xmlErrorFilter(@Body String testData, @HeaderParam("Content-Type") String contentType) throws CallException;
34  
35      @Template("")
36      public String regExErrorFilter(@Body String testData, @HeaderParam("Content-Type") String contentType) throws CallException;
37  }