1 | package com.ether; |
---|
2 | |
---|
3 | import com.ether.annotation.ControllerMethod; |
---|
4 | import com.ether.annotation.Mandatory; |
---|
5 | import com.ether.annotation.ParamName; |
---|
6 | import net.sf.json.JSONObject; |
---|
7 | import org.apache.commons.logging.Log; |
---|
8 | import org.apache.commons.logging.LogFactory; |
---|
9 | import org.jetbrains.annotations.NotNull; |
---|
10 | import org.springframework.beans.factory.annotation.Required; |
---|
11 | |
---|
12 | import java.util.HashMap; |
---|
13 | import java.util.List; |
---|
14 | import java.util.Map; |
---|
15 | |
---|
16 | /** |
---|
17 | * @author vmipsl |
---|
18 | * @date 17 feb 2011 |
---|
19 | */ |
---|
20 | public class Controller |
---|
21 | extends ControllerEther |
---|
22 | { |
---|
23 | |
---|
24 | /** *********************************************************** **/ |
---|
25 | /** *********************** VIEWS ***************************** **/ |
---|
26 | /** |
---|
27 | * ********************************************************** * |
---|
28 | */ |
---|
29 | @ControllerMethod(view = VIEW_INIT) |
---|
30 | public Map<String, Object> home() |
---|
31 | throws WebException |
---|
32 | { |
---|
33 | return new HashMap<String, Object>(); |
---|
34 | } |
---|
35 | |
---|
36 | |
---|
37 | /** *********************************************************** **/ |
---|
38 | /** *********************** CALLS ***************************** **/ |
---|
39 | /** |
---|
40 | * ********************************************************** * |
---|
41 | */ |
---|
42 | |
---|
43 | @ControllerMethod(jsonResult = true) |
---|
44 | public JSONObject createUserRequest( @ParamName("input1") final String input1, @ParamName("input2") final String input2 ) |
---|
45 | throws ServiceException |
---|
46 | { |
---|
47 | |
---|
48 | //appel a createxml |
---|
49 | _tapasService.createXMLRequest(); |
---|
50 | |
---|
51 | |
---|
52 | final JSONObject result = new JSONObject(); |
---|
53 | result.put( "result","SUCCESS" ); |
---|
54 | return result; |
---|
55 | } |
---|
56 | |
---|
57 | |
---|
58 | @Required |
---|
59 | public void setTapasService( @NotNull final TapasService tapasService ) |
---|
60 | { |
---|
61 | _tapasService = tapasService; |
---|
62 | } |
---|
63 | |
---|
64 | private static final Log LOGGER = LogFactory.getLog( Controller.class ); |
---|
65 | |
---|
66 | private static final String VIEW_INIT = "init"; |
---|
67 | |
---|
68 | private TapasService _tapasService; |
---|
69 | } |
---|