1
2
3
4
5
6
7
8
9
10 package org.mule.module.ibeans.annotations;
11
12 import org.mule.api.MuleMessage;
13
14 import org.ibeans.annotation.State;
15 import org.ibeans.annotation.Template;
16 import org.ibeans.annotation.param.HeaderParam;
17 import org.ibeans.annotation.param.Order;
18 import org.ibeans.annotation.param.PropertyParam;
19 import org.ibeans.annotation.param.UriParam;
20 import org.ibeans.api.CallException;
21 import org.ibeans.api.ExceptionListenerAware;
22 import org.ibeans.api.ParamFactory;
23 import org.ibeans.api.Response;
24
25 public interface TestParamsFactoryIBean extends ExceptionListenerAware
26 {
27 @UriParam("param1")
28 @Order(1)
29 public static final FirstParamFactory FIRST_URI_FACTORY = new FirstParamFactory();
30
31 @UriParam("param2")
32 @Order(2)
33 public static final SecondParamFactory SECOND_URI_FACTORY = new SecondParamFactory();
34
35 @HeaderParam("header1")
36 @Order(3)
37 public static final FirstParamFactory FIRST_HEADER_FACTORY = new FirstParamFactory();
38
39 @HeaderParam("header2")
40 @Order(4)
41 public static final SecondParamFactory SECOND_HEADER_FACTORY = new SecondParamFactory();
42
43 @State
44 void init(@PropertyParam("key") byte[] key);
45
46 @Template("The key is {param1} for {foo}. Param2 is: '{param2}'")
47 public String doUriParams(@UriParam("foo") String foo) throws CallException;
48
49 @Template("The key is {paramX} for {foo}. Param2 is: '{param2}'")
50 public String doMethodUriParam(@UriParam("foo") String foo, @UriParam("paramX") ParamFactory factory) throws CallException;
51
52 @Template("Value is: {foo}")
53 public MuleMessage doHeaderParam(@UriParam("foo") String foo) throws CallException;
54
55 @Template("Value is: {foo}")
56 public MuleMessage doMethodHeaderParam(@UriParam("foo") String foo, @HeaderParam("echoHeader") EchoParamFactory factory) throws CallException;
57
58 @Template("Value is: {foo}")
59 public MuleMessage doMethodPropertyParam(@UriParam("foo") String foo, @PropertyParam("customProperty") String prop, @HeaderParam("propHeader") ReversePropertyParamFactory factory) throws CallException;
60
61 @Template("Foo")
62 public MuleMessage doTestHeadersWithNoParams() throws CallException;
63
64 @Template("Foo")
65 public Response doTestHeadersWithNoParamsAndResponse() throws CallException;
66
67 @Template("Value is: {foo}")
68 public Response doHeaderParamAndResponse(@UriParam("foo") String foo) throws CallException;
69
70 @Template("Value is: {foo}")
71 public Response doMethodHeaderParamAndResponse(@UriParam("foo") String foo, @HeaderParam("echoHeader") EchoParamFactory factory) throws CallException;
72
73 @Template("Value is: {foo}")
74 public Response doMethodPropertyParamAndResponse(@UriParam("foo") String foo, @PropertyParam("customProperty") String prop, @HeaderParam("propHeader") ReversePropertyParamFactory factory) throws CallException;
75
76
77
78 }