|
|||||||||
| Home >> All >> com >> jcorporate >> expresso >> services >> [ validation overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.jcorporate.expresso.services.validation
Class ValidationEntry

java.lang.Objectcom.jcorporate.expresso.services.validation.ValidationEntry
- All Implemented Interfaces:
- java.io.Serializable
- public class ValidationEntry
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
This class abstracts the storing of the data that goes along with any particular validation operation. This class also provides functions for a validation request to be created in the first place. In this first incarnation, this class stores all the data using DBObjects. If warranted at a later time, the ideal way to change the functionality by making this class abstract and then implementing DBValidationEntry and XMLValidationEntry or whatever. Most of the methods in this class are "protected", so that minor changes can be handled by simply extending this class and overridining the necessary methods.
- Since:
- Expresso 4.0
- Version:
- $Revision: 1.25 $ $Date: 2004/11/17 20:48:22 $
| Field Summary | |
static java.lang.String |
AVAILABLE
Status for available |
protected java.lang.String |
dataContext
default data context |
static java.lang.String |
EXPIRED
Status for Expired |
protected java.lang.String |
expiresAfter
Time it expires after |
protected java.lang.String |
jobClassName
The Job class name |
protected java.lang.String |
jobNumber
The Job Number |
protected com.jcorporate.expresso.services.dbobj.JobQueue |
jq
JobQueue |
protected com.jcorporate.expresso.services.dbobj.JobQueueParam |
jqp
JobQueue parameter data object |
private static org.apache.log4j.Logger |
log
The log4j logger |
static java.lang.String |
NEW
Status for new |
protected int |
paramNum
current parameter number |
static java.lang.String |
PRM_EXPIRES_AFTER
PArameter for 'Expires After' |
static java.lang.String |
PRM_VAL_CTX
Parameter for 'Validation webapp context' |
static java.lang.String |
PRM_VAL_DESC
Parameter for 'Validation Description' |
static java.lang.String |
PRM_VAL_PORT
Parameter for 'Validation Port' |
static java.lang.String |
PRM_VAL_SERVER
Parameter for 'Validation Server' |
static java.lang.String |
PRM_VAL_TITLE
Parameter for 'Validation Title' |
static java.lang.String |
PRM_VALIDATOR
Parameter for validator |
static java.lang.String |
SESSION_KEY
Session validation key |
protected java.lang.String |
valContextPath
The validation context path |
protected java.lang.String |
valDesc
The default description |
static java.lang.String |
VALIDATED
Status for Validated |
protected java.lang.String |
validationClassName
The validator class name |
protected java.lang.String |
valPort
The validation port |
protected java.lang.String |
valServer
The validation server |
protected java.lang.String |
valTitle
The validation job title |
protected java.lang.String |
valType
? |
protected com.jcorporate.expresso.services.dbobj.ValidationQueue |
vq
The validation queue |
static java.lang.String |
WAITING
Status for waiting |
| Constructor Summary | |
private |
ValidationEntry()
This default constructor should never be used, and is marked private and protected with an exception just for that reason. |
|
ValidationEntry(java.lang.String newDbName)
This constructor is used by classes that submit a validation request into the system. |
|
ValidationEntry(java.lang.String context,
java.util.List paramsVector,
com.jcorporate.expresso.services.dbobj.JobQueue jq)
This constructor is used by the validation job to create a validation entry from the job parameters. |
|
ValidationEntry(java.lang.String dbName,
java.lang.String id)
This constructor is used, after a validation request comes in, to resurrect a validation entry from the DB. |
| Method Summary | |
void |
addParam(java.lang.String name,
java.lang.String value)
Adds an application specific parameter into the validation entry Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
boolean |
codeMatches(java.lang.String code)
Function to match the code in the DB versus the code in the request. |
protected static java.lang.String |
createValidationCode()
Create a cryptographically sound validation code for use in the validation operation [Currently generates a 256-bit random number] Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee, strengthened by Mike Rimov |
void |
delete()
Deletes the validation entry and all the connected parameters |
void |
expiresAfter(int hr,
int min,
int sec)
Method to set the time delta from current time when the request will expire if unused Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
java.util.Date |
getExpiresAt()
Method to retrieve the absolute date/time when the request expires. |
java.util.Hashtable |
getParams()
Method to return all the application-specific parameters associated with this validation request Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
java.lang.String |
getStatus()
Returns the current status of the validation request Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
ValidationHandler |
instantiateHandler()
Utility function to instantiate the app-specific validation handler Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
static void |
notifyByEmail(java.lang.String dbName,
java.lang.String from,
java.util.Vector addresses,
java.lang.String subject,
java.lang.String content)
Insert the method's description here. |
void |
setContextPath(java.lang.String path)
|
void |
setDesc(java.lang.String desc)
Sets the description for the validation job Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
void |
setJobClassName(java.lang.String name)
Sets the name of the job class for validation requests. |
void |
setPort(java.lang.String port)
|
void |
setServer(java.lang.String server)
|
void |
setStatus(java.lang.String newStatus)
Sets the current status of the validation entry Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
void |
setTitle(java.lang.String title)
Set's the title of the validation entry job Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
void |
setValidationHandler(java.lang.Class clazz)
Method to set the app-specific validation handler associated with this validation request |
void |
setValidationHandler(java.lang.String className)
Method to set the app-specific validation handler associated with this validation request Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee |
void |
submit()
Insert the method's description here. |
java.lang.String |
validationURL()
Utility function to create a URL based on the webapp context, and setup values such as the http server/port etc. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
PRM_VALIDATOR
public static final java.lang.String PRM_VALIDATOR
- Parameter for validator
- See Also:
- Constant Field Values
PRM_EXPIRES_AFTER
public static final java.lang.String PRM_EXPIRES_AFTER
- PArameter for 'Expires After'
- See Also:
- Constant Field Values
PRM_VAL_TITLE
public static final java.lang.String PRM_VAL_TITLE
- Parameter for 'Validation Title'
- See Also:
- Constant Field Values
PRM_VAL_DESC
public static final java.lang.String PRM_VAL_DESC
- Parameter for 'Validation Description'
- See Also:
- Constant Field Values
PRM_VAL_SERVER
public static final java.lang.String PRM_VAL_SERVER
- Parameter for 'Validation Server'
- See Also:
- Constant Field Values
PRM_VAL_PORT
public static final java.lang.String PRM_VAL_PORT
- Parameter for 'Validation Port'
- See Also:
- Constant Field Values
PRM_VAL_CTX
public static final java.lang.String PRM_VAL_CTX
- Parameter for 'Validation webapp context'
- See Also:
- Constant Field Values
NEW
public static final java.lang.String NEW
- Status for new
- See Also:
- Constant Field Values
WAITING
public static final java.lang.String WAITING
- Status for waiting
- See Also:
- Constant Field Values
AVAILABLE
public static final java.lang.String AVAILABLE
- Status for available
- See Also:
- Constant Field Values
VALIDATED
public static final java.lang.String VALIDATED
- Status for Validated
- See Also:
- Constant Field Values
EXPIRED
public static final java.lang.String EXPIRED
- Status for Expired
- See Also:
- Constant Field Values
SESSION_KEY
public static final java.lang.String SESSION_KEY
- Session validation key
- See Also:
- Constant Field Values
log
private static org.apache.log4j.Logger log
- The log4j logger
jq
protected com.jcorporate.expresso.services.dbobj.JobQueue jq
- JobQueue
jqp
protected com.jcorporate.expresso.services.dbobj.JobQueueParam jqp
- JobQueue parameter data object
dataContext
protected java.lang.String dataContext
- default data context
expiresAfter
protected java.lang.String expiresAfter
- Time it expires after
jobClassName
protected java.lang.String jobClassName
- The Job class name
jobNumber
protected java.lang.String jobNumber
- The Job Number
valContextPath
protected java.lang.String valContextPath
- The validation context path
valDesc
protected java.lang.String valDesc
- The default description
valPort
protected java.lang.String valPort
- The validation port
valServer
protected java.lang.String valServer
- The validation server
valTitle
protected java.lang.String valTitle
- The validation job title
valType
protected java.lang.String valType
- ?
validationClassName
protected java.lang.String validationClassName
- The validator class name
vq
protected com.jcorporate.expresso.services.dbobj.ValidationQueue vq
- The validation queue
paramNum
protected int paramNum
- current parameter number
| Constructor Detail |
ValidationEntry
public ValidationEntry(java.lang.String newDbName) throws AuthValidationException
- This constructor is used by classes that submit a validation request
into the system. It creates a Job Queue Entry for the validation
request. Application specific parameters are added using the
addParam(...) method, and the request finally committed using the
submit(...) method. Creation date: (9/23/2001 9:41:06 PM) Author: Shash
Chatterjee
ValidationEntry
public ValidationEntry(java.lang.String dbName, java.lang.String id) throws AuthValidationException
- This constructor is used, after a validation request comes in, to
resurrect a validation entry from the DB. Creation date: (9/23/2001
9:41:06 PM) Author: Shash Chatterjee
ValidationEntry
public ValidationEntry(java.lang.String context, java.util.List paramsVector, com.jcorporate.expresso.services.dbobj.JobQueue jq) throws AuthValidationException
- This constructor is used by the validation job to create a validation
entry from the job parameters. Application classes should have no need
to use this class/ Creation date: (9/23/2001 9:41:06 PM) Author: Shash
Chatterjee
ValidationEntry
private ValidationEntry()
throws AuthValidationException
- This default constructor should never be used, and is marked private and
protected with an exception just for that reason. Creation date:
(9/23/2001 9:41:06 PM) Author: Shash Chatterjee
| Method Detail |
setContextPath
public void setContextPath(java.lang.String path)
setDesc
public void setDesc(java.lang.String desc)
- Sets the description for the validation job Creation date: (9/23/2001
9:41:06 PM) Author: Shash Chatterjee
getExpiresAt
public java.util.Date getExpiresAt() throws AuthValidationException
- Method to retrieve the absolute date/time when the request expires.
Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee
setJobClassName
public void setJobClassName(java.lang.String name) throws AuthValidationException
- Sets the name of the job class for validation requests. Currently the
only job that should be specified is ValidationJob Creation date:
(9/23/2001 9:41:06 PM) Author: Shash Chatterjee
getParams
public java.util.Hashtable getParams() throws AuthValidationException
- Method to return all the application-specific parameters associated with
this validation request Creation date: (9/23/2001 9:41:06 PM) Author:
Shash Chatterjee
setPort
public void setPort(java.lang.String port)
setServer
public void setServer(java.lang.String server)
setStatus
public void setStatus(java.lang.String newStatus) throws AuthValidationException
- Sets the current status of the validation entry Creation date:
(9/23/2001 9:41:06 PM) Author: Shash Chatterjee
getStatus
public java.lang.String getStatus() throws AuthValidationException
- Returns the current status of the validation request Creation date:
(9/23/2001 9:41:06 PM) Author: Shash Chatterjee
setTitle
public void setTitle(java.lang.String title)
- Set's the title of the validation entry job Creation date: (9/23/2001
9:41:06 PM) Author: Shash Chatterjee
setValidationHandler
public void setValidationHandler(java.lang.String className) throws AuthValidationException
- Method to set the app-specific validation handler associated with this
validation request Creation date: (9/23/2001 9:41:06 PM) Author: Shash
Chatterjee
setValidationHandler
public void setValidationHandler(java.lang.Class clazz) throws AuthValidationException
- Method to set the app-specific validation handler associated with this
validation request
addParam
public void addParam(java.lang.String name, java.lang.String value) throws AuthValidationException
- Adds an application specific parameter into the validation entry
Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee
codeMatches
public boolean codeMatches(java.lang.String code) throws AuthValidationException
- Function to match the code in the DB versus the code in the request.
Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee
delete
public void delete()
throws AuthValidationException
- Deletes the validation entry and all the connected parameters
expiresAfter
public void expiresAfter(int hr,
int min,
int sec)
- Method to set the time delta from current time when the request will
expire if unused Creation date: (9/23/2001 9:41:06 PM) Author: Shash
Chatterjee
instantiateHandler
public ValidationHandler instantiateHandler() throws AuthValidationException
- Utility function to instantiate the app-specific validation handler
Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee
notifyByEmail
public static void notifyByEmail(java.lang.String dbName, java.lang.String from, java.util.Vector addresses, java.lang.String subject, java.lang.String content) throws AuthValidationException
- Insert the method's description here. Creation date: (9/23/2001 9:41:06
PM) Author: Shash Chatterjee
submit
public void submit()
throws AuthValidationException
- Insert the method's description here. Creation date: (9/23/2001 9:41:06
PM) Author: Shash Chatterjee
validationURL
public java.lang.String validationURL() throws AuthValidationException
- Utility function to create a URL based on the webapp context, and setup
values such as the http server/port etc. It tags on the db context,
the validation entry id and the validation code as request parameters.
Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee
createValidationCode
protected static java.lang.String createValidationCode()
- Create a cryptographically sound validation code for use in the
validation operation [Currently generates a 256-bit random number]
Creation date: (9/23/2001 9:41:06 PM) Author: Shash Chatterjee,
strengthened by Mike Rimov
|
|||||||||
| Home >> All >> com >> jcorporate >> expresso >> services >> [ validation overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.jcorporate.expresso.services.validation.ValidationEntry