org.dspace.app.webui.servlet
Class AbstractBrowserServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.dspace.app.webui.servlet.DSpaceServlet
              extended by org.dspace.app.webui.servlet.AbstractBrowserServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
Direct Known Subclasses:
BrowserServlet, WithdrawnBrowserServlet

public abstract class AbstractBrowserServlet
extends DSpaceServlet

Servlet for browsing through indices, as they are defined in the configuration. This class can take a wide variety of inputs from the user interface: - type: the type of browse (index name) being performed - order: (ASC | DESC) the direction for result sorting - value: A specific value to find items around. For example the author name or subject - month: integer specification of the month of a date browse - year: integer specification of the year of a date browse - starts_with: string value at which to start browsing - vfocus: start browsing with a value of this string - focus: integer id of the item at which to start browsing - rpp: integer number of results per page to display - sort_by: integer specification of the field to search on - etal: integer number to limit multiple value items specified in config to

Version:
$Revision$
Author:
Richard Jones
See Also:
Serialized Form

Constructor Summary
AbstractBrowserServlet()
           
 
Method Summary
protected  BrowserScope getBrowserScopeForRequest(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Create a BrowserScope from the current request
protected  void processBrowse(Context context, BrowserScope scope, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Do the usual DSpace GET method.
protected abstract  void showError(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display the error page
protected abstract  void showFullPage(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected abstract  void showNoResultsPage(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display the No Results page
protected abstract  void showSinglePage(Context context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Display the single page.
 
Methods inherited from class org.dspace.app.webui.servlet.DSpaceServlet
doDSGet, doDSPost, doGet, doPost
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBrowserServlet

public AbstractBrowserServlet()
Method Detail

getBrowserScopeForRequest

protected BrowserScope getBrowserScopeForRequest(Context context,
                                                 javax.servlet.http.HttpServletRequest request,
                                                 javax.servlet.http.HttpServletResponse response)
                                          throws javax.servlet.ServletException,
                                                 IOException,
                                                 SQLException,
                                                 AuthorizeException
Create a BrowserScope from the current request

Parameters:
context - The database context
request - The servlet request
response - The servlet response
Returns:
A BrowserScope for the current parameters
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

processBrowse

protected void processBrowse(Context context,
                             BrowserScope scope,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
                      throws javax.servlet.ServletException,
                             IOException,
                             SQLException,
                             AuthorizeException
Do the usual DSpace GET method. You will notice that browse does not currently respond to POST requests.

Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showError

protected abstract void showError(Context context,
                                  javax.servlet.http.HttpServletRequest request,
                                  javax.servlet.http.HttpServletResponse response)
                           throws javax.servlet.ServletException,
                                  IOException,
                                  SQLException,
                                  AuthorizeException
Display the error page

Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showNoResultsPage

protected abstract void showNoResultsPage(Context context,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response)
                                   throws javax.servlet.ServletException,
                                          IOException,
                                          SQLException,
                                          AuthorizeException
Display the No Results page

Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showSinglePage

protected abstract void showSinglePage(Context context,
                                       javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response)
                                throws javax.servlet.ServletException,
                                       IOException,
                                       SQLException,
                                       AuthorizeException
Display the single page. This is the page which lists just the single values of a metadata browse, not individual items. Single values are links through to all the items that match that metadata value

Parameters:
context -
request -
response -
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException

showFullPage

protected abstract void showFullPage(Context context,
                                     javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response)
                              throws javax.servlet.ServletException,
                                     IOException,
                                     SQLException,
                                     AuthorizeException
Throws:
javax.servlet.ServletException
IOException
SQLException
AuthorizeException


Copyright © 2013 DuraSpace. All Rights Reserved.