edu.indiana.dlib.metsnav.controller
Class NavigationController

java.lang.Object
  extended by edu.indiana.dlib.metsnav.controller.NavigationController

public class NavigationController
extends Object

A controller class that encapsulates all navigation operations

Author:
David Jiao

Constructor Summary
NavigationController(ServletContext context, String prefix)
          Creates a new MetsNavigator instance
 
Method Summary
 NavigationBean createNavigationBean(String oid, String pageNum, ParameterMap properties, String contextPath)
          Returns a NavigationBean object which encapsulates all navigation data that will be displayed in the web interface
 ServletContext getContext()
           
 int getCurrentPageNum()
           
 PageItem getFirstPageItem()
          Returns the first page
 PageItem getLastPageItem()
          Returns the last page
 NavigationObject getNavigateObject()
          Returns the navigateObject
 PageItem getNextPageItem(int pageNumber)
           
 PageItem getNextPageItem(String pid)
          Returns next pageitem of pid
 PageItem getPageItem(int pageNumber)
          Returns the pageitem of pagenumber
 PageItem getPageItem(String pid)
          Returns the page with pid
 int getPageNumber(String pid)
          Returns the pagenumber given an pageid
 String getPrefix()
           
 PageItem getPreviousPageItem(int pageNumber)
           
 PageItem getPreviousPageItem(String pid)
           
 ParameterMap getProperties()
           
 int getTotalNumberOfPages()
           
 NavigationBean populateScreenBean()
           
 void setContext(ServletContext context)
           
 void setCurrentPageNum(int currentPageNum)
           
 void setNavigateObject(NavigationObject navigateObject)
          Sets the navigateObject
 void setPrefix(String prefix)
           
 void setProperties(ParameterMap properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NavigationController

public NavigationController(ServletContext context,
                            String prefix)
                     throws ConfigurationException,
                            DAOException
Creates a new MetsNavigator instance

Parameters:
context -
collection -
Throws:
ConfigurationException
DAOException
Method Detail

createNavigationBean

public NavigationBean createNavigationBean(String oid,
                                           String pageNum,
                                           ParameterMap properties,
                                           String contextPath)
                                    throws DAOException
Returns a NavigationBean object which encapsulates all navigation data that will be displayed in the web interface

Parameters:
oid -
pageNum -
properties -
Returns:
Throws:
DAOException

getContext

public ServletContext getContext()
Returns:
Returns the context.

getCurrentPageNum

public int getCurrentPageNum()
Returns:
Returns the currentPageNum.

getFirstPageItem

public PageItem getFirstPageItem()
Returns the first page

Returns:
the first page

getLastPageItem

public PageItem getLastPageItem()
Returns the last page

Returns:
the last page

getNavigateObject

public NavigationObject getNavigateObject()
Returns the navigateObject

Returns:
Returns the navigateObject.

getNextPageItem

public PageItem getNextPageItem(int pageNumber)
                         throws DAOException
Throws:
DAOException

getNextPageItem

public PageItem getNextPageItem(String pid)
                         throws DAOException
Returns next pageitem of pid

Parameters:
pid - page id
Returns:
next page of the page with pid
Throws:
DAOException

getPageItem

public PageItem getPageItem(int pageNumber)
                     throws DAOException
Returns the pageitem of pagenumber

Parameters:
pageNumber -
Returns:
a pageitem
Throws:
DAOException

getPageItem

public PageItem getPageItem(String pid)
                     throws DAOException
Returns the page with pid

Parameters:
pid - page id
Returns:
the page with pid
Throws:
DAOException

getPageNumber

public int getPageNumber(String pid)
Returns the pagenumber given an pageid

Parameters:
pid -
Returns:

getPrefix

public String getPrefix()
Returns:
Returns the prefix.

getPreviousPageItem

public PageItem getPreviousPageItem(int pageNumber)
                             throws DAOException
Parameters:
pageNumber -
Returns:
Throws:
DAOException

getPreviousPageItem

public PageItem getPreviousPageItem(String pid)
                             throws DAOException
Parameters:
pid -
Returns:
Throws:
DAOException

getProperties

public ParameterMap getProperties()
Returns:
Returns the properties.

getTotalNumberOfPages

public int getTotalNumberOfPages()
Returns:

populateScreenBean

public NavigationBean populateScreenBean()
Returns:

setContext

public void setContext(ServletContext context)
Parameters:
context - The context to set.

setCurrentPageNum

public void setCurrentPageNum(int currentPageNum)
Parameters:
currentPageNum - The currentPageNum to set.

setNavigateObject

public void setNavigateObject(NavigationObject navigateObject)
Sets the navigateObject

Parameters:
navigateObject - The navigateObject to set.

setPrefix

public void setPrefix(String prefix)
Parameters:
prefix - The prefix to set.

setProperties

public void setProperties(ParameterMap properties)
Parameters:
properties - The properties to set.


Copyright © 2005 Trustees of Indiana University. All Rights Reserved.