source: tapas/web/src/com/ether/Controller.java @ 389

Last change on this file since 389 was 389, checked in by rboipsl, 12 years ago
File size: 1.8 KB
Line 
1package com.ether;
2
3import com.ether.annotation.ControllerMethod;
4import com.ether.annotation.Mandatory;
5import com.ether.annotation.ParamName;
6import net.sf.json.JSONObject;
7import org.apache.commons.logging.Log;
8import org.apache.commons.logging.LogFactory;
9import org.jetbrains.annotations.NotNull;
10import org.springframework.beans.factory.annotation.Required;
11
12import java.util.HashMap;
13import java.util.List;
14import java.util.Map;
15
16/**
17 * @author vmipsl
18 * @date 17 feb 2011
19 */
20public 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}
Note: See TracBrowser for help on using the repository browser.