View Javadoc
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.annotations;
8   
9   
10  import org.ibeans.annotation.Template;
11  import org.ibeans.annotation.filter.ExpressionErrorFilter;
12  import org.ibeans.annotation.filter.JsonErrorFilter;
13  import org.ibeans.annotation.filter.XmlErrorFilter;
14  import org.ibeans.annotation.param.Body;
15  import org.ibeans.annotation.param.HeaderParam;
16  import org.ibeans.api.CallException;
17  
18  /**
19   * TODO
20   */
21  @JsonErrorFilter(expr = "/message/errorMsg", errorCode = "/message/error")
22  @XmlErrorFilter(expr = "/message/errorMsg", errorCode = "/message/error")
23  @ExpressionErrorFilter(eval = "regex", expr = "errorMsg", mimeType = "text/plain")
24  public interface ErrorFilterIBean
25  {
26      @Template("")
27      public String jsonErrorFilter(@Body String testData, @HeaderParam("Content-Type") String contentType) throws CallException;
28  
29      @Template("")
30      public String xmlErrorFilter(@Body String testData, @HeaderParam("Content-Type") String contentType) throws CallException;
31  
32      @Template("")
33      public String regExErrorFilter(@Body String testData, @HeaderParam("Content-Type") String contentType) throws CallException;
34  }