ZetaGrid v1.9

zeta.handler.approve
Class ApproveBase

java.lang.Object
  |
  +--zeta.handler.approve.ApproveBase
Direct Known Subclasses:
ApproveMessages, ApproveProperties, ApproveTeamName

public abstract class ApproveBase
extends java.lang.Object

Interface to approve a change request.


Field Summary
protected  java.lang.String eMail
           
protected  ZetaServlet servlet
           
protected  java.lang.String user
           
protected  int userId
           
 
Constructor Summary
ApproveBase(ZetaServlet servlet, int userId, java.lang.String user, java.lang.String eMail)
           
 
Method Summary
abstract  java.lang.String approve(java.sql.Statement stmt, java.lang.String value, long timeMillis)
          Returns a row name which will be need as an additional information in the approve process.
 java.lang.String generateAddressToApprove(byte[] data)
          Generates a link to approve the specified data.
abstract  java.lang.String getKey()
          Returns the key name of the change request.
static java.lang.Integer getServerId(java.lang.String text)
           
static long getTimeMillis(java.lang.String text)
           
static java.lang.Integer getUserId(java.lang.String text)
           
 java.lang.String getValue(java.lang.String text)
          Returns the value(s) of the change request.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servlet

protected ZetaServlet servlet

userId

protected int userId

user

protected java.lang.String user

eMail

protected java.lang.String eMail
Constructor Detail

ApproveBase

public ApproveBase(ZetaServlet servlet,
                   int userId,
                   java.lang.String user,
                   java.lang.String eMail)
Parameters:
servlet - servlet which owns the approve handler.
userId - id of the user where the data will be changed.
user - name of the user.
eMail - e-mail address of the user.
Method Detail

getKey

public abstract java.lang.String getKey()
Returns the key name of the change request. A key name should contains only alpha characters.

Returns:
the key name of the change request.

getValue

public java.lang.String getValue(java.lang.String text)
Returns the value(s) of the change request.

Returns:
null if the specified text is not defined for the key.

approve

public abstract java.lang.String approve(java.sql.Statement stmt,
                                         java.lang.String value,
                                         long timeMillis)
                                  throws java.sql.SQLException,
                                         javax.servlet.ServletException
Returns a row name which will be need as an additional information in the approve process.

Parameters:
stmt - statement object's database
value - which will be changed.
timeMillis - timestamp of the request.
Returns:
HTML text as information of the change.
java.sql.SQLException
javax.servlet.ServletException

generateAddressToApprove

public java.lang.String generateAddressToApprove(byte[] data)
                                          throws java.sql.SQLException,
                                                 java.io.IOException,
                                                 javax.servlet.ServletException
Generates a link to approve the specified data.

Parameters:
data - data to encrypt
Returns:
a link to approve the specified data
Throws:
java.sql.SQLException - if a database access error occurs.
java.io.IOException - if an I/O error occurs.
javax.servlet.ServletException

getServerId

public static java.lang.Integer getServerId(java.lang.String text)

getUserId

public static java.lang.Integer getUserId(java.lang.String text)

getTimeMillis

public static long getTimeMillis(java.lang.String text)

main

public static void main(java.lang.String[] args)

ZetaGrid v1.9

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