edu.whoi.ursa.argoDatabase.web
Class FloatStatusPage._FloatStatus

java.lang.Object
  extended by edu.whoi.ursa.argoDatabase.servletUtil.page.BasePage
      extended by edu.whoi.ursa.argoDatabase.servletUtil.page.ProtectedPage
          extended by edu.whoi.ursa.argoDatabase.web.FloatStatusPage._FloatStatus
Enclosing class:
FloatStatusPage

private static class FloatStatusPage._FloatStatus
extends ProtectedPage

Default page for GET or POST requests to /float-status/float-status.html

For no paramters specified:
Select Status Flags Form - for select printing table (html) or generating report (text file) of status flags.
Status Flags Summary Table - summary of all flags set

For submit="View+Table":
Prints Flag html table for specified flags

For submit="Generate+Report"
Serves table as text file floatstatus_report.txt

Author:
Alexander K. Ekholm

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.whoi.ursa.argoDatabase.servletUtil.page.BasePage
BasePage.NavMenuItem, BasePage.OverviewItem, BasePage.Script
 
Field Summary
 
Fields inherited from class edu.whoi.ursa.argoDatabase.servletUtil.page.BasePage
_actualContent, _body, _content, _contentHeader, _contentHeaderWrapper, _contentPane, _contentWrapper, _footer, _footerWrapper, _head, _headerWrapper, _html, _loading, _logo, _logoWrapper, _navMenuWrapper, _search, _title, _userInfo, _userInfoWrapper, authorized, document, httpSession, pageTitle, parameterMap, request, requrl, response, scripts, styleLinks
 
Constructor Summary
FloatStatusPage._FloatStatus(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Page Constructor
 
Method Summary
protected  void generateProtectedContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
private  java.util.List<java.lang.Object[]> getFlagTableItems()
          Queries database to generate List of Object[]s from criteria specified in page request.
private  org.w3c.dom.Element printFlagSummaryTable(org.w3c.dom.Element element)
          Prints Float Status Flag Summary table.
 org.w3c.dom.Element printFlagTable(org.w3c.dom.Element element)
          Prints html table of flags from result of query executed by getFlagTableItems()
protected  void respondCustom(javax.servlet.http.HttpServletResponse response)
           
private  void serveFlagTable(java.io.OutputStream outputStream)
          Generates text table of flags from result of query executed by getFlagTableItems().
 
Methods inherited from class edu.whoi.ursa.argoDatabase.servletUtil.page.ProtectedPage
generateContent
 
Methods inherited from class edu.whoi.ursa.argoDatabase.servletUtil.page.BasePage
addOverviewDateItem, addOverviewItem, addOverviewItemNarrowLabel, addOverviewItemWideLabel, addOverviewItemWideLabel, addOverviewLinkItem, createContentPane, createContentPane, createNavigableContentPane, error, finalizeHtml, generateContentHeader, generateFooterContent, generateNavMenu, getAttribute, getHttpSession, getParameter, getParameterAsArray, getParameterAsArrayOfIntegers, getParameterAsCalendar, getParameterAsFloat, getParameterAsInteger, getParameterAsLong, getParameterMap, getUser, getUserId, initializeDocument, initializeHTML, initializePage, isSet, removeAttribute, respond, respondTextFile, setAttribute, setCustomResponse, setLinksAndStyles, setScripts, setStyleLinks, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FloatStatusPage._FloatStatus

public FloatStatusPage._FloatStatus(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
Page Constructor

Parameters:
HttpServletRequest - request
HttpServletRequest - response
Method Detail

generateProtectedContent

protected void generateProtectedContent(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response)
Specified by:
generateProtectedContent in class ProtectedPage

getFlagTableItems

private java.util.List<java.lang.Object[]> getFlagTableItems()
Queries database to generate List of Object[]s from criteria specified in page request. Query projections are specified by edu.whoi.ursa.argoDatabase.entity.FloatStatus.FlagSet.FlagSetTable.projectionList

Returns:
List of Object[]s returned from query. null if no criteria specified

printFlagSummaryTable

private org.w3c.dom.Element printFlagSummaryTable(org.w3c.dom.Element element)
Prints Float Status Flag Summary table.

Returns:
html div element of summary table

printFlagTable

public org.w3c.dom.Element printFlagTable(org.w3c.dom.Element element)
Prints html table of flags from result of query executed by getFlagTableItems()

Returns:
html div element

respondCustom

protected void respondCustom(javax.servlet.http.HttpServletResponse response)
Overrides:
respondCustom in class BasePage

serveFlagTable

private void serveFlagTable(java.io.OutputStream outputStream)
Generates text table of flags from result of query executed by getFlagTableItems(). Writes results to outputStream.

Parameters:
outputStream -