Source Code Cross Referenced for WithdrawnBrowserServlet.java in  » Content-Management-System » dspace » org » dspace » app » webui » servlet » admin » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » dspace » org.dspace.app.webui.servlet.admin 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * BrowserServlet.java
003:         *
004:         * Version: $Revision:  $
005:         *
006:         * Date: $Date:  $
007:         *
008:         * Copyright (c) 2002-2007, Hewlett-Packard Company and Massachusetts
009:         * Institute of Technology.  All rights reserved.
010:         *
011:         * Redistribution and use in source and binary forms, with or without
012:         * modification, are permitted provided that the following conditions are
013:         * met:
014:         *
015:         * - Redistributions of source code must retain the above copyright
016:         * notice, this list of conditions and the following disclaimer.
017:         *
018:         * - Redistributions in binary form must reproduce the above copyright
019:         * notice, this list of conditions and the following disclaimer in the
020:         * documentation and/or other materials provided with the distribution.
021:         *
022:         * - Neither the name of the Hewlett-Packard Company nor the name of the
023:         * Massachusetts Institute of Technology nor the names of their
024:         * contributors may be used to endorse or promote products derived from
025:         * this software without specific prior written permission.
026:         *
027:         * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
028:         * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
029:         * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
030:         * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
031:         * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
032:         * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
033:         * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
034:         * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
035:         * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
036:         * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
037:         * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
038:         * DAMAGE.
039:         */
040:        package org.dspace.app.webui.servlet.admin;
041:
042:        import java.io.IOException;
043:        import java.sql.SQLException;
044:        import java.util.Map;
045:        import java.util.Set;
046:
047:        import javax.servlet.ServletException;
048:        import javax.servlet.http.HttpServletRequest;
049:        import javax.servlet.http.HttpServletResponse;
050:
051:        import org.apache.log4j.Logger;
052:        import org.dspace.authorize.AuthorizeException;
053:        import org.dspace.browse.BrowseException;
054:        import org.dspace.browse.BrowseIndex;
055:        import org.dspace.browse.BrowserScope;
056:        import org.dspace.core.Context;
057:
058:        import org.dspace.app.webui.servlet.AbstractBrowserServlet;
059:        import org.dspace.app.webui.util.JSPManager;
060:
061:        /**
062:         * Servlet for browsing through withdrawn items:
063:         * 
064:         * @author Graham Triggs
065:         * @version $Revision:  $
066:         */
067:        public class WithdrawnBrowserServlet extends AbstractBrowserServlet {
068:            /** log4j category */
069:            private static Logger log = Logger
070:                    .getLogger(WithdrawnBrowserServlet.class);
071:
072:            /**
073:             * Do the usual DSpace GET method.  You will notice that browse does not currently
074:             * respond to POST requests.
075:             */
076:            protected void doDSGet(Context context, HttpServletRequest request,
077:                    HttpServletResponse response) throws ServletException,
078:                    IOException, SQLException, AuthorizeException {
079:                try {
080:                    // all browse requests currently come to GET.
081:                    BrowserScope scope = getBrowserScopeForRequest(context,
082:                            request, response);
083:
084:                    // Check that we are doing an item browse
085:                    if (scope.getBrowseIndex() == null
086:                            || scope.getBrowseIndex().isItemIndex()) {
087:                        // And override the index in the scope with the withdrawn items
088:                        scope.setBrowseIndex(BrowseIndex
089:                                .getWithdrawnBrowseIndex());
090:                    } else {
091:                        showError(context, request, response);
092:                    }
093:
094:                    // execute browse request
095:                    processBrowse(context, scope, request, response);
096:                } catch (BrowseException be) {
097:                    log.error("caught exception: ", be);
098:                    throw new ServletException(be);
099:                }
100:            }
101:
102:            /**
103:             * Display the error page
104:             * 
105:             * @param context
106:             * @param request
107:             * @param response
108:             * @throws ServletException
109:             * @throws IOException
110:             * @throws SQLException
111:             * @throws AuthorizeException
112:             */
113:            protected void showError(Context context,
114:                    HttpServletRequest request, HttpServletResponse response)
115:                    throws ServletException, IOException, SQLException,
116:                    AuthorizeException {
117:                request.setAttribute("useAdminLayout", "yes");
118:
119:                JSPManager.showJSP(request, response, "/browse/error.jsp");
120:            }
121:
122:            /**
123:             * Display the No Results page
124:             * 
125:             * @param context
126:             * @param request
127:             * @param response
128:             * @throws ServletException
129:             * @throws IOException
130:             * @throws SQLException
131:             * @throws AuthorizeException
132:             */
133:            protected void showNoResultsPage(Context context,
134:                    HttpServletRequest request, HttpServletResponse response)
135:                    throws ServletException, IOException, SQLException,
136:                    AuthorizeException {
137:                request.setAttribute("browseWithdrawn", "yes");
138:
139:                JSPManager.showJSP(request, response, "/browse/no-results.jsp");
140:            }
141:
142:            /**
143:             * Display the single page.  This is the page which lists just the single values of a 
144:             * metadata browse, not individual items.  Single values are links through to all the items
145:             * that match that metadata value
146:             * 
147:             * @param context
148:             * @param request
149:             * @param response
150:             * @throws ServletException
151:             * @throws IOException
152:             * @throws SQLException
153:             * @throws AuthorizeException
154:             */
155:            protected void showSinglePage(Context context,
156:                    HttpServletRequest request, HttpServletResponse response)
157:                    throws ServletException, IOException, SQLException,
158:                    AuthorizeException {
159:                // Show an error as this currently isn't supported
160:                showError(context, request, response);
161:            }
162:
163:            /**
164:             * Display a full item listing.
165:             * 
166:             * @param context
167:             * @param request
168:             * @param response
169:             * @throws ServletException
170:             * @throws IOException
171:             * @throws SQLException
172:             * @throws AuthorizeException
173:             */
174:            protected void showFullPage(Context context,
175:                    HttpServletRequest request, HttpServletResponse response)
176:                    throws ServletException, IOException, SQLException,
177:                    AuthorizeException {
178:                request.setAttribute("browseWithdrawn", "yes");
179:
180:                JSPManager.showJSP(request, response, "/browse/full.jsp");
181:            }
182:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.