1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.talika.tarsis.command;
24
25 import java.util.Map;
26 import org.talika.tarsis.security.User;
27
28 /**
29 * Interface that defines a client request in Tarsis MVC Framework.<br>
30 * <br>
31 * <code>Request</code> object transports all information of a request from
32 * controller servlet to the command action.<code>Request</code> is intended to
33 * decouple Tarsis commands layer from Servlet layer.<br>
34 *
35 * @author Jose M. Palomar
36 * @version $Revision: 108 $
37 */
38 public interface Request {
39
40 /**
41 * Returns the value of the specified parameter in request.
42 *
43 * @param name String name of parameter.
44 * @return Object value of parameter or <code>null</code> if not found.
45 */
46 Object getParameter(String name);
47
48 /**
49 * Returns a map with all parameters in request.
50 *
51 * @return Map map with all parameters in request.
52 */
53 Map getParameters();
54
55 /**
56 * Returns the value of the especified attribute in request.
57 *
58 * @param name String name of attribute.
59 * @return Object value of attribute or <code>null</code> if not found.
60 */
61 Object getAttribute(String name);
62
63 /**
64 * Returns a map with all attributes in request.
65 *
66 * @return Map map with all attributes in request.
67 */
68 Map getAttributes();
69
70 /**
71 * Returns the session associated with request.
72 *
73 * @return Session session associated with request.
74 */
75 Session getSession();
76
77 /**
78 * Returns de user who made the request.
79 *
80 * @return User user who made the request.
81 */
82 User getRemoteUser();
83
84 }