01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/portal/tags/sakai_2-4-1/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/NavLoginGalleryHandler.java $
03: * $Id: NavLoginGalleryHandler.java 29143 2007-04-19 01:10:38Z ajpoland@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006, 2007 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.portal.charon.handlers;
21:
22: import java.io.IOException;
23:
24: import javax.servlet.http.HttpServletRequest;
25: import javax.servlet.http.HttpServletResponse;
26:
27: import org.sakaiproject.portal.api.PortalHandlerException;
28: import org.sakaiproject.portal.api.PortalRenderContext;
29: import org.sakaiproject.tool.api.Session;
30:
31: /**
32: *
33: * @author ieb
34: * @since Sakai 2.4
35: * @version $Rev: 29143 $
36: *
37: */
38: public class NavLoginGalleryHandler extends GalleryHandler {
39:
40: public NavLoginGalleryHandler() {
41: urlFragment = "nav_login_gallery";
42: }
43:
44: @Override
45: public int doGet(String[] parts, HttpServletRequest req,
46: HttpServletResponse res, Session session)
47: throws PortalHandlerException {
48: if ((parts.length == 3)
49: && (parts[1].equals("nav_login_gallery"))) {
50: try {
51: doNavLoginGallery(req, res, session, parts[2]);
52: return END;
53: } catch (Exception ex) {
54: throw new PortalHandlerException(ex);
55: }
56: } else {
57: return NEXT;
58: }
59: }
60:
61: public void doNavLoginGallery(HttpServletRequest req,
62: HttpServletResponse res, Session session, String siteId)
63: throws IOException {
64: // start the response
65:
66: PortalRenderContext rcontext = portal.startPageContext("",
67: "Login", null, req);
68:
69: includeGalleryLogin(rcontext, req, session, siteId);
70: // end the response
71: portal.sendResponse(rcontext, res, "gallery-login", null);
72: }
73:
74: }
|