Class ReportDisplayer


  • public abstract class ReportDisplayer
    extends java.lang.Object
    Parent class for report displayers that appear on report pages. Subclasses must implement the display() method to place view information on the request. ReportDisplayers are constructed once and the display() method called many times so caching and one time setup can be performed in the displayer class.
    Author:
    Richard Smith
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void display​(javax.servlet.http.HttpServletRequest request, ReportObject reportObject)
      To be implemented in subclasses where any specific information to be displayed should be put on the request.
      void execute​(javax.servlet.http.HttpServletRequest request, ReportObject reportObject)
      Execute is called for each report page with the object to be displayed.
      java.lang.String getDisplayerName()
      Gimme my name
      java.lang.String getJspPage()
      The JSP page that will be called with the request to render output.
      java.lang.String getNicerDisplayerName()
      A JSP wants a nice name to display while the Displayer is loading
      java.util.Set<java.lang.String> getReplacedFieldExprs()
      Get a list of field names and paths that should be replaced by this displayer - i.e.
      java.lang.Boolean getShowImmediately()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReportDisplayer

        public ReportDisplayer​(ReportDisplayerConfig config,
                               InterMineAPI im)
        Construct with config information read from webconfig-model.xml and the API.
        Parameters:
        config - config information
        im - the InterMine API
    • Method Detail

      • execute

        public void execute​(javax.servlet.http.HttpServletRequest request,
                            ReportObject reportObject)
        Execute is called for each report page with the object to be displayed. This puts the ReportObject and the JSP name to use on the request then calls the specific subclass' display() method.
        Parameters:
        request - request for displaying a report page
        reportObject - the object being displayed
      • display

        public abstract void display​(javax.servlet.http.HttpServletRequest request,
                                     ReportObject reportObject)
                              throws org.intermine.web.displayer.ReportDisplayerNoResultsException
        To be implemented in subclasses where any specific information to be displayed should be put on the request.
        Parameters:
        request - request for displaying a report page
        reportObject - the object being displayed
        Throws:
        org.intermine.web.displayer.ReportDisplayerNoResultsException - if something goes wrong
      • getShowImmediately

        public java.lang.Boolean getShowImmediately()
        Returns:
        true if we should not wait for AJAX.
      • getJspPage

        public java.lang.String getJspPage()
        The JSP page that will be called with the request to render output.
        Returns:
        the JSP page name
      • getReplacedFieldExprs

        public java.util.Set<java.lang.String> getReplacedFieldExprs()
        Get a list of field names and paths that should be replaced by this displayer - i.e. this displayer should be shown instead of other fields. The field names can include paths, e.g. 'name' or 'department.name'.
        Returns:
        the field names to replace
      • getDisplayerName

        public java.lang.String getDisplayerName()
        Gimme my name
        Returns:
        a name
      • getNicerDisplayerName

        public java.lang.String getNicerDisplayerName()
        A JSP wants a nice name to display while the Displayer is loading
        Returns:
        camel case class simple name split