1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package olr.presentation;
18
19 import olr.om.RdfUser;
20
21 import com.lutris.appserver.server.httpPresentation.ClientPageRedirectException;
22 import com.lutris.appserver.server.httpPresentation.HttpPresentationException;
23
24 /***
25 * @version $Id: Welcome1.java,v 1.7 2004/08/03 08:33:53 roku Exp $
26 */
27 public class Welcome1 extends ExtendedHttpPresentation {
28
29 /***
30 * @see olr.presentation.ExtendedHttpPresentation#loggedInUserRequired()
31 */
32 public boolean loggedInUserRequired() {
33 return true;
34 }
35
36 /***
37 * @see olr.presentation.ExtendedHttpPresentation#handleDefault()
38 */
39 public String handleDefault() throws HttpPresentationException {
40 if (getSessionData().isStarted())
41 throw new ClientPageRedirectException("ContentFrame.po");
42 else
43 return showPage();
44 }
45
46 public String handleRestart() throws HttpPresentationException {
47 try {
48 getSessionData().clearLock();
49 RdfUser user = getUser();
50 clearSession();
51 setUser(user);
52 return showPage();
53 } catch (Exception e) {
54 throw new HttpPresentationException(e);
55 }
56 }
57
58 public String showPage() {
59 RdfUser user = getUser();
60 if (!user.isContributor()) {
61 throw new ClientPageRedirectException("Welcome2.po?event=Reader");
62 } else {
63 Welcome1HTML page = new Welcome1HTML();
64 page.setTextName(String.valueOf(String.valueOf((new StringBuffer(String.valueOf(String
65 .valueOf(user.getFirstName())))).append(" ").append(user.getLastName()))));
66 return page.toDocument();
67 }
68 }
69 }