ZetaGrid v1.9

zeta.handler.statistic
Class TopProducersHandler

java.lang.Object
  |
  +--zeta.handler.statistic.AbstractHandler
        |
        +--zeta.handler.statistic.TopProducersHandler
All Implemented Interfaces:
GetHandler

public class TopProducersHandler
extends AbstractHandler

Handles a GET request for the statistic 'top producers'.


Nested Class Summary
 
Nested classes inherited from class zeta.handler.statistic.AbstractHandler
AbstractHandler.InnerPageBuffer
 
Field Summary
private  long daysOfLowerUserNameListOrderByZerosDayBeforeYesterday
          DAYS of top producer list of the day before yesterday.
private  long daysOfLowerUserNameListOrderByZerosYesterday
          DAYS of top producer list of yesterday.
private  java.util.List lowerUserNameListOrderByZerosDayBeforeYesterday
          top producer list of the day before yesterday.
private  java.util.List lowerUserNameListOrderByZerosYesterday
          top producer list of yesterday.
private  Table topProducersTable
          Contains the complete top producers statistic.
 
Fields inherited from class zeta.handler.statistic.AbstractHandler
imgHeight, imgWidth, servlet
 
Constructor Summary
TopProducersHandler(ZetaServlet servlet)
           
 
Method Summary
private  void changeProperties(java.sql.Connection con, int userId, java.lang.String workunit, java.lang.StringBuffer buffer)
           
 java.lang.String createPage(java.sql.Connection con)
          Creates HTML page with the content of the statistic 'top producers' where the user is not defined.
protected  java.lang.String createPage(javax.servlet.http.HttpServletRequest req, java.sql.Connection con)
          Creates HTML page with the content of the statistic 'top producers' where the user is defined.
(package private)  Table getTopProducersTable()
          Returns the complete top producers statistic.
private static java.lang.String[] getUserData(java.lang.String line)
           
private  void inputUser(java.lang.String user, java.lang.String email, java.lang.String workunit, boolean viewAllWorkstations, java.lang.StringBuffer buffer)
          Generates an HTTP form to get the user name.
private  int isLoginNeeded(java.lang.String user, java.lang.String email, java.lang.String workunit)
          Returns the user id (>0) if the user is defined.
private  void requestApprovalToChangeProperties(java.sql.Connection con, java.lang.String key, java.lang.String keyLength, javax.servlet.http.HttpServletRequest req, java.lang.StringBuffer buffer)
           
 
Methods inherited from class zeta.handler.statistic.AbstractHandler
createImage, doGet, getBufferedPage, getImageHeight, getImageWidth, getInnerPageBuffer, getInnerPageExpiredDiffTime, getPageExpiredDiffTime, imageUpdateCompleted, isImageExpired, isInnerPageExpired, isPageExpired, pageUpdateCompleted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topProducersTable

private Table topProducersTable
Contains the complete top producers statistic.


daysOfLowerUserNameListOrderByZerosYesterday

private long daysOfLowerUserNameListOrderByZerosYesterday
DAYS of top producer list of yesterday.


daysOfLowerUserNameListOrderByZerosDayBeforeYesterday

private long daysOfLowerUserNameListOrderByZerosDayBeforeYesterday
DAYS of top producer list of the day before yesterday.


lowerUserNameListOrderByZerosYesterday

private java.util.List lowerUserNameListOrderByZerosYesterday
top producer list of yesterday.


lowerUserNameListOrderByZerosDayBeforeYesterday

private java.util.List lowerUserNameListOrderByZerosDayBeforeYesterday
top producer list of the day before yesterday.

Constructor Detail

TopProducersHandler

public TopProducersHandler(ZetaServlet servlet)
Parameters:
servlet - servlet which owns this handler.
Method Detail

getTopProducersTable

Table getTopProducersTable()
Returns the complete top producers statistic.


createPage

public java.lang.String createPage(java.sql.Connection con)
                            throws java.sql.SQLException,
                                   javax.servlet.ServletException
Creates HTML page with the content of the statistic 'top producers' where the user is not defined.

Specified by:
createPage in class AbstractHandler
Parameters:
con - connection to the back-end database
Returns:
HTML page with the content of the statistic 'top producers'.
java.sql.SQLException
javax.servlet.ServletException

createPage

protected java.lang.String createPage(javax.servlet.http.HttpServletRequest req,
                                      java.sql.Connection con)
                               throws java.sql.SQLException,
                                      javax.servlet.ServletException
Creates HTML page with the content of the statistic 'top producers' where the user is defined.

Overrides:
createPage in class AbstractHandler
Parameters:
req - GET request
con - connection to the back-end database
Returns:
HTML page with the content of the statistic 'top producers'.
java.sql.SQLException
javax.servlet.ServletException

getUserData

private static java.lang.String[] getUserData(java.lang.String line)

inputUser

private void inputUser(java.lang.String user,
                       java.lang.String email,
                       java.lang.String workunit,
                       boolean viewAllWorkstations,
                       java.lang.StringBuffer buffer)
Generates an HTTP form to get the user name.

Parameters:
user - user name as default value
email - email of the user as default value
viewAllWorkstations - options how to view the list of the workstations
buffer - buffer for HTTP page

isLoginNeeded

private int isLoginNeeded(java.lang.String user,
                          java.lang.String email,
                          java.lang.String workunit)
Returns the user id (>0) if the user is defined. Otherwise 0 will be returned.

Returns:
the user id (>0) if the user is defined. Otherwise 0 will be returned.

changeProperties

private void changeProperties(java.sql.Connection con,
                              int userId,
                              java.lang.String workunit,
                              java.lang.StringBuffer buffer)
                       throws javax.servlet.ServletException
javax.servlet.ServletException

requestApprovalToChangeProperties

private void requestApprovalToChangeProperties(java.sql.Connection con,
                                               java.lang.String key,
                                               java.lang.String keyLength,
                                               javax.servlet.http.HttpServletRequest req,
                                               java.lang.StringBuffer buffer)
                                        throws java.sql.SQLException,
                                               javax.servlet.ServletException
java.sql.SQLException
javax.servlet.ServletException

ZetaGrid v1.9

For further technical papers, see ZetaGrid Technical Documentation.
 
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.