org.openmms.util
Class Validator

java.lang.Object
  |
  +--org.openmms.util.Validator

public class Validator
extends java.lang.Object

Title: Validator

Description: Validates an MM

Copyright: Copyright (c) 2003 OpenMMS.org


Constructor Summary
Validator()
          Constructor which initiates a new MM_Validator
 
Method Summary
 boolean MM_Delivery_time(MM_Data mm)
          Checks to see if the earliest delivery time has been reached
 boolean MM_Expiry(MM_Data mm)
          Checks the expiry time for the message
 void set_date_m_send_req(MM_Data mm)
          Checks for the existence of a value for the date header, and generates and inserts the date if not present
 boolean validate_m_send_req(MM_Data mm)
          Checks that the mandatory headers for an MM1_m_send_req, MM_data object, are present.
 boolean ValidateID(java.lang.String ID)
          Checks that the ID is in the correct format
 boolean validateRetrievalRequest(javax.servlet.http.HttpServletRequest req)
          Checks that the retrieval request has the correct parameter name and a valid ID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator()
Constructor which initiates a new MM_Validator

Method Detail

validate_m_send_req

public boolean validate_m_send_req(MM_Data mm)
Checks that the mandatory headers for an MM1_m_send_req, MM_data object, are present.

Parameters:
mm -
Returns:
true if ok, false if not.

set_date_m_send_req

public void set_date_m_send_req(MM_Data mm)
Checks for the existence of a value for the date header, and generates and inserts the date if not present

Parameters:
mm -

validateRetrievalRequest

public boolean validateRetrievalRequest(javax.servlet.http.HttpServletRequest req)
Checks that the retrieval request has the correct parameter name and a valid ID

Parameters:
req -
Returns:
true if ok, otherwise false

ValidateID

public boolean ValidateID(java.lang.String ID)
Checks that the ID is in the correct format

Parameters:
ID -
Returns:
true if ok, otherwise false

MM_Delivery_time

public boolean MM_Delivery_time(MM_Data mm)
Checks to see if the earliest delivery time has been reached

Parameters:
mm -
Returns:
true if yes, otherwise false

MM_Expiry

public boolean MM_Expiry(MM_Data mm)
Checks the expiry time for the message

Parameters:
mm -
Returns:
true if MM HAS expired, otherwise false