Package org.intermine.web.displayer
Class ReportDisplayer
- java.lang.Object
-
- org.intermine.web.displayer.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
-
-
Field Summary
Fields Modifier and Type Field Description protected ReportDisplayerConfig
config
protected InterMineAPI
im
-
Constructor Summary
Constructors Constructor Description ReportDisplayer(ReportDisplayerConfig config, InterMineAPI im)
Construct with config information read from webconfig-model.xml and the API.
-
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 namejava.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 loadingjava.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()
-
-
-
Field Detail
-
config
protected ReportDisplayerConfig config
-
im
protected InterMineAPI im
-
-
Constructor Detail
-
ReportDisplayer
public ReportDisplayer(ReportDisplayerConfig config, InterMineAPI im)
Construct with config information read from webconfig-model.xml and the API.- Parameters:
config
- config informationim
- 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 pagereportObject
- 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 pagereportObject
- 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
-
-