1
2
3
4
5
6
7
8
9
10 package org.mule.module.ibeans.annotations;
11
12 import org.ibeans.api.InvocationContext;
13 import org.ibeans.api.ParamFactory;
14 import org.ibeans.api.channel.HTTP;
15
16 public class CheckHTTPPropertiesFactory implements ParamFactory
17 {
18 public String create(String paramName, boolean optional, InvocationContext invocationContext)
19 {
20 String method = (String) invocationContext.getIBeanConfig().getPropertyParams().get(HTTP.METHOD_KEY);
21 if (method == null)
22 {
23 throw new IllegalArgumentException("HTTP Method not set");
24 }
25 return method;
26 }
27 }