net.trajano.twiff.internal.servlet
Class ViewPageLookup

java.lang.Object
  extended by net.trajano.twiff.internal.servlet.ViewPageLookup
All Implemented Interfaces:
PageLookup
Direct Known Subclasses:
AttachmentActionPageLookup

public class ViewPageLookup
extends Object
implements PageLookup

This is a simple page lookup implementation. It does not perform any caching.

Author:
Archimedes Trajano

Constructor Summary
ViewPageLookup(ViewServletConfiguration configuration)
           
 
Method Summary
 Class<? extends Serializable> getPageBeanClass(HttpServletRequest request)
          This extracts the page bean class from the URL requested in the servlet request.
 String getPageBeanClassName(HttpServletRequest request)
          This extracts the page bean class name from the URL requested in the servlet request.
 String getPageName(HttpServletRequest request)
          This extracts the page name from the URL requested in the servlet request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViewPageLookup

public ViewPageLookup(ViewServletConfiguration configuration)
Parameters:
configuration -
Method Detail

getPageName

public String getPageName(HttpServletRequest request)
Description copied from interface: PageLookup
This extracts the page name from the URL requested in the servlet request.

Specified by:
getPageName in interface PageLookup
Parameters:
request - the servlet request.
Returns:
the page name.
See Also:
PageLookup.getPageName(javax.servlet.http.HttpServletRequest)

getPageBeanClassName

public String getPageBeanClassName(HttpServletRequest request)
Description copied from interface: PageLookup
This extracts the page bean class name from the URL requested in the servlet request.

Specified by:
getPageBeanClassName in interface PageLookup
Parameters:
request - the servlet request.
Returns:
the page bean class name.
See Also:
PageLookup.getPageBeanClassName(javax.servlet.http.HttpServletRequest)

getPageBeanClass

public Class<? extends Serializable> getPageBeanClass(HttpServletRequest request)
                                               throws ClassNotFoundException
Description copied from interface: PageLookup
This extracts the page bean class from the URL requested in the servlet request. The returned class must implement Serializable to ensure that the bean can be persisted if necessary.

Specified by:
getPageBeanClass in interface PageLookup
Parameters:
request - the servlet request.
Returns:
the page bean class.
Throws:
ClassNotFoundException - class is not found.
See Also:
PageLookup.getPageBeanClass(javax.servlet.http.HttpServletRequest)


Copyright © 2004-2005 trajano.net. All Rights Reserved.