uk.ac.ebi.intact.application.search2.struts.view
Class ViewBeanFactory

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.search2.struts.view.ViewBeanFactory

public class ViewBeanFactory
extends java.lang.Object


Method Summary
 AbstractViewBean getBinaryViewBean(java.util.Collection objects, java.lang.String link, java.lang.String contextPath)
          Returns the appropriate view bean for given Collection object.
 AbstractViewBean getChunkedSingleViewBean(AnnotatedObject object, java.lang.String link, java.lang.String contextPath, int maxChunk, int selectedChunk)
           
 AbstractViewBean getDetailsViewBean(java.util.Collection objects, java.lang.String link, java.lang.String contextPath)
          Returns the appropriate view bean for given Collection object.
static ViewBeanFactory getInstance()
          Returns the only instance of this class.
 AbstractViewBean getSingleViewBean(AnnotatedObject object, java.lang.String link, java.lang.String contextPath)
          Returns the appropriate view bean for given basic object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ViewBeanFactory getInstance()
Returns the only instance of this class.

Returns:
the only instance of this class; always non null value is returned.

getBinaryViewBean

public AbstractViewBean getBinaryViewBean(java.util.Collection objects,
                                          java.lang.String link,
                                          java.lang.String contextPath)
Returns the appropriate view bean for given Collection object.

Parameters:
objects - the Collection of objects to return the view for.
link - the link to help page.
Returns:
the appropriate view for object; null is returned if there is no mapping or an error in creating an instance of the view.

getDetailsViewBean

public AbstractViewBean getDetailsViewBean(java.util.Collection objects,
                                           java.lang.String link,
                                           java.lang.String contextPath)
Returns the appropriate view bean for given Collection object.

Parameters:
objects - the Collection of objects to return the view for.
link - the link to help page.
Returns:
the appropriate view for object; null is returned if there is no mapping or an error in creating an instance of the view.

getSingleViewBean

public AbstractViewBean getSingleViewBean(AnnotatedObject object,
                                          java.lang.String link,
                                          java.lang.String contextPath)
Returns the appropriate view bean for given basic object.

Parameters:
object - the AnnotatedObject to return the view for.
link - the link to help page.
Returns:
the appropriate view for object; null is returned if there is no mapping or an error in creating an instance of the view.

getChunkedSingleViewBean

public AbstractViewBean getChunkedSingleViewBean(AnnotatedObject object,
                                                 java.lang.String link,
                                                 java.lang.String contextPath,
                                                 int maxChunk,
                                                 int selectedChunk)
Parameters:
object -
link -
contextPath -
Returns:


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk