1
2
3
4
5
6 package com.hack23.cia.service.impl.common;
7
8 import com.hack23.cia.model.application.impl.common.ActionEvent;
9 import com.hack23.cia.model.application.impl.common.UserSession;
10
11 /***
12 * The Interface UserSessionService.
13 */
14 public interface UserSessionService {
15
16 /***
17 * Adds the action event.
18 *
19 * @param actionEvent the action event
20 * @param userSession the user session
21 * @return the user session
22 */
23 UserSession addActionEvent(ActionEvent actionEvent, UserSession userSession);
24
25 /***
26 * Creates the user session.
27 *
28 * @param sessionId the session id
29 * @param headerHost the header host
30 * @param serverHost the server host
31 * @param acceptLanguageKeys the accept language keys
32 * @param userAgent the user agent
33 * @return the user session
34 */
35 UserSession createUserSession(String sessionId, String headerHost,
36 String serverHost, String acceptLanguageKeys, String userAgent);
37
38 /***
39 * Load user session by id.
40 *
41 * @param userSessionId the user session id
42 * @return the user session
43 */
44 UserSession loadUserSessionById(Long userSessionId);
45
46 /***
47 * Login.
48 *
49 * @param name the name
50 * @param encodedPassword the encoded password
51 * @param userSession the user session
52 * @return the user session
53 */
54 UserSession login(String name, String encodedPassword,
55 UserSession userSession);
56
57 /***
58 * Logout.
59 *
60 * @param userSession the user session
61 * @return the user session
62 */
63 UserSession logout(UserSession userSession);
64 }