org.openmms.util
Class MM_Data

java.lang.Object
  |
  +--org.openmms.util.MM_Data
All Implemented Interfaces:
java.io.Serializable

public class MM_Data
extends java.lang.Object
implements java.io.Serializable

Title: MM DataObject

Description: MM Data object used by all classes

Copyright: Copyright (c) 2003 OpenMMS.org

See Also:
Serialized Form

Constructor Summary
MM_Data()
          Constructor which creates HashMap for MM
 
Method Summary
 boolean compareValue(java.lang.String key, java.lang.String value)
          Compares a given value with that which is present in m_dataMap
 void copy(java.lang.Object other)
          Creates a copy of a given MM_Data object
 java.lang.String getBcc()
          Retrieves MM header with Bcc info
 java.lang.String getCc()
          Retrieves MM header with CC info
 java.lang.String getContent_Type()
          Retrieves MM header with content information
 java.lang.String getContent()
          Retrieves MM header with content
 java.lang.String getDate()
          Retrieves MM header with date information
 java.lang.String getFrom()
          Retrieves MM header with sender information
 java.lang.Object[] getKeys()
          Returns all the key in HashMap to a String array.
 java.lang.String getMessage_ID()
          Retrieves MM header with uniqe message identification
 int getSize()
          Returns the dataMap's size.
 java.lang.String getSubject()
          Retrieves the MM subject header
 java.lang.String getTo()
          Retrieves MM header with receiver info
 java.lang.Object[] getValues()
          Returns all values in HashMap into a Object array
 java.lang.String getX_Mms_Content_Location()
          Retrieves MM header with the URL where the MM can be downloaded
 java.lang.String getX_Mms_Delivery_Report()
          Retrieves MM header with delivery report info
 java.lang.String getX_Mms_Delivery_Time()
          Retrieves MM header with time the MM was submitted
 java.lang.String getX_Mms_Expiry()
          Retrieves MM expiry time
 java.lang.String getX_Mms_Message_Class()
          Retrieves MM header with ??
 java.lang.String getX_Mms_Message_Size()
          Retrieves MM header with the information of the size of the MMS
 java.lang.String getX_Mms_Message_Type()
          Retrieves MM header with message type
 java.lang.String getX_Mms_MMS_Version()
          Retrieves MM header with MM version
 java.lang.String getX_Mms_Previously_Sent_By()
          Retrieves the MM header containing information about the messages previous sender
 java.lang.String getX_Mms_Previously_Sent_Date()
          Retrieves the MM header containing date when the message was last sent
 java.lang.String getX_Mms_Priority()
          Retrieves MM header with priority level
 java.lang.String getX_Mms_Read_Report()
          Retrieves the MM header telling if the message has been read or not
 java.lang.String getX_Mms_Read_Status()
          Retrieves MM header with info on status for MMS
 java.lang.String getX_Mms_Reply_Charging_Deadline()
          Retrieves the MM header containing the deadline reply charging
 java.lang.String getX_Mms_Reply_Charging_ID()
          Retrieves the MM header containing the reply charging ID
 java.lang.String getX_Mms_Reply_Charging_Size()
          Retrieves the MM header containing the message size for reply charging
 java.lang.String getX_Mms_Reply_Charging()
          Retrieves the MM header containing information about reply charging
 java.lang.String getX_Mms_Report_Allowed()
          Retrieves MM header with the report field setting
 java.lang.String getX_Mms_Response_Status()
          Retrieves MM header with information about response to UA status
 java.lang.String getX_Mms_Response_Text()
          Retrieves the MM response text
 java.lang.String getX_Mms_Retrieve_Status()
          Retrieves the MM retrieval status
 java.lang.String getX_Mms_Retrieve_Text()
          Retrieves MM header with response content
 java.lang.String getX_Mms_Sender_Visibility()
          Retrieves MM header with the setting from sender
 java.lang.String getX_Mms_Status()
          Retrieves the status of the MM
 java.lang.String getX_Mms_Transaction_ID()
          Retrieves MM header with uniqe transaction id
 boolean insertElement(java.lang.Object messageType, java.lang.Object content)
          Inserts a new element into the HashMap
Returns false if messagetype already exists.
 boolean keyCheck(java.lang.Object key)
          Checks to see if m_dataMap contains a given key
 boolean keyExists(java.lang.String key)
          Returns true if a given key is present in m_dataMap
 boolean removeElement(java.lang.Object key)
          Removes an element in HashMap
 boolean setBcc(java.lang.String bcc)
          Inserts the value for te bcc header
 boolean setCc(java.lang.String cc)
          Inserts the value for the cc header
 boolean setContent_Type(java.lang.String content_type)
          Inserts the value for the content type header
 boolean setContent(java.lang.Object content)
          Inserts the value for the content header
 boolean setDate(java.lang.String date)
          Inserts the value for the date header
 boolean setFrom(java.lang.String from)
          Inserts the value for the from header
 boolean setMessage_ID(java.lang.String message_id)
          Inserts the value for the message ID header
 boolean setSubject(java.lang.String subject)
          Inserts the value for the subject header
 boolean setTo(java.lang.String to)
          Inserts the value for the to header
 boolean setX_Mms_Content_Location(java.lang.String content_location)
          Inserts the value for the content location header
 boolean setX_Mms_Delivery_Report(java.lang.String delivery_report)
          Inserts the value for the delivery report header
 boolean setX_Mms_Delivery_Time(long delivery_time)
          Inserts the value for the Delivery-time header
 boolean setX_Mms_Expiry(long expiry_value)
          Inserts the value for the MMs expiry date header
 boolean setX_Mms_Message_Class(java.lang.String message_class)
          Inserts the value for the messgage class header
 boolean setX_Mms_Message_Size(long message_size)
          Inserts the value for the message size header
 boolean setX_Mms_Message_Type(java.lang.String message_type)
          Inserts the value for the Message-type header
 boolean setX_Mms_MMS_Version(java.lang.String mms_version)
          Inserts the value for the MMS vesion header
 boolean setX_Mms_Priority(java.lang.String priority)
          Inserts the value for the messages priority header
 boolean setX_Mms_Read_Report(java.lang.String read_report)
          Inserts the value for the read report header
 boolean setX_Mms_Read_Status(java.lang.String read_status)
          Inserts the value for the read status header
 boolean setX_Mms_Reply_Charging_Deadline(java.lang.String reply_charging_deadline)
          Inserts the value for the reply charging deadline header
 boolean setX_Mms_Reply_Charging_ID(java.lang.String reply_charging_id)
          Inserts the value for the reply charging ID header
 boolean setX_Mms_Reply_Charging_Size(java.lang.String reply_charging_size)
          Inserts the value for the reply charging size header
 boolean setX_Mms_Reply_Charging(java.lang.String reply_charging)
          Inserts the value for the Reply charging header
 boolean setX_Mms_Reply_Previously_Sent_By(java.lang.String previously_sent_by)
          Inserts the value for the prevoiously sent by header
 boolean setX_Mms_Reply_Previously_Sent_Date(java.lang.String previously_sent_date)
          Inserts the value for the sent date header
 boolean setX_Mms_Report_Allowed(java.lang.String report_allowed)
          Inserts the value for the report allowed header
 boolean setX_Mms_Response_Status(java.lang.String response_status)
          Inserts the value for the response status header
 boolean setX_Mms_Response_Text(java.lang.String response_text)
          Inserts the value for the response text header
 boolean setX_Mms_Retrieve_Status(java.lang.String retrieve_status)
          Inserts the value for the retrieve status header
 boolean setX_Mms_Retrieve_Text(java.lang.String retrieve_text)
          Inserts the value for the retrieve text header
 boolean setX_Mms_Sender_Visibility(java.lang.String sender_visibility)
          Inserts the value for the sender visibility header
 boolean setX_Mms_Status(java.lang.String status)
          Inserts the value for the status header
 boolean setX_Mms_Transaction_ID(java.lang.String transaction_id)
          Inserts the value for the transaction ID header
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MM_Data

public MM_Data()
Constructor which creates HashMap for MM

Method Detail

keyCheck

public boolean keyCheck(java.lang.Object key)
Checks to see if m_dataMap contains a given key

Parameters:
key -
Returns:
true if the key is present, otherwise false

getX_Mms_Expiry

public java.lang.String getX_Mms_Expiry()
Retrieves MM expiry time

Returns:
string

getX_Mms_Message_Type

public java.lang.String getX_Mms_Message_Type()
Retrieves MM header with message type

Returns:
string

getX_Mms_Transaction_ID

public java.lang.String getX_Mms_Transaction_ID()
Retrieves MM header with uniqe transaction id

Returns:
string

getX_Mms_MMS_Version

public java.lang.String getX_Mms_MMS_Version()
Retrieves MM header with MM version

Returns:
String

getContent_Type

public java.lang.String getContent_Type()
Retrieves MM header with content information

Returns:
String

getContent

public java.lang.String getContent()
Retrieves MM header with content

Returns:
String

getX_Mms_Delivery_Time

public java.lang.String getX_Mms_Delivery_Time()
Retrieves MM header with time the MM was submitted

Returns:
String

getX_Mms_Reply_Charging

public java.lang.String getX_Mms_Reply_Charging()
Retrieves the MM header containing information about reply charging

Returns:
String

getX_Mms_Reply_Charging_Deadline

public java.lang.String getX_Mms_Reply_Charging_Deadline()
Retrieves the MM header containing the deadline reply charging

Returns:
String

getX_Mms_Reply_Charging_Size

public java.lang.String getX_Mms_Reply_Charging_Size()
Retrieves the MM header containing the message size for reply charging

Returns:
String

getX_Mms_Reply_Charging_ID

public java.lang.String getX_Mms_Reply_Charging_ID()
Retrieves the MM header containing the reply charging ID

Returns:
String

getX_Mms_Previously_Sent_By

public java.lang.String getX_Mms_Previously_Sent_By()
Retrieves the MM header containing information about the messages previous sender

Returns:
String

getX_Mms_Previously_Sent_Date

public java.lang.String getX_Mms_Previously_Sent_Date()
Retrieves the MM header containing date when the message was last sent

Returns:
String

getX_Mms_Read_Report

public java.lang.String getX_Mms_Read_Report()
Retrieves the MM header telling if the message has been read or not

Returns:
String

getDate

public java.lang.String getDate()
Retrieves MM header with date information

Returns:
String

getX_Mms_Message_Class

public java.lang.String getX_Mms_Message_Class()
Retrieves MM header with ??(Not finished)

Returns:
String

getX_Mms_Priority

public java.lang.String getX_Mms_Priority()
Retrieves MM header with priority level

Returns:
String

getX_Mms_Sender_Visibility

public java.lang.String getX_Mms_Sender_Visibility()
Retrieves MM header with the setting from sender

Returns:
String

getX_Mms_Delivery_Report

public java.lang.String getX_Mms_Delivery_Report()
Retrieves MM header with delivery report info

Returns:
String

getSubject

public java.lang.String getSubject()
Retrieves the MM subject header

Returns:
String

getFrom

public java.lang.String getFrom()
Retrieves MM header with sender information

Returns:
String

getTo

public java.lang.String getTo()
Retrieves MM header with receiver info

Returns:
String

getCc

public java.lang.String getCc()
Retrieves MM header with CC info

Returns:
String

getBcc

public java.lang.String getBcc()
Retrieves MM header with Bcc info

Returns:
String

getMessage_ID

public java.lang.String getMessage_ID()
Retrieves MM header with uniqe message identification

Returns:
String

getX_Mms_Response_Status

public java.lang.String getX_Mms_Response_Status()
Retrieves MM header with information about response to UA status

Returns:
String

getX_Mms_Response_Text

public java.lang.String getX_Mms_Response_Text()
Retrieves the MM response text

Returns:
String

getX_Mms_Retrieve_Status

public java.lang.String getX_Mms_Retrieve_Status()
Retrieves the MM retrieval status

Returns:
String

getX_Mms_Retrieve_Text

public java.lang.String getX_Mms_Retrieve_Text()
Retrieves MM header with response content

Returns:
String

getX_Mms_Read_Status

public java.lang.String getX_Mms_Read_Status()
Retrieves MM header with info on status for MMS

Returns:
String

getX_Mms_Status

public java.lang.String getX_Mms_Status()
Retrieves the status of the MM

Returns:
String

getX_Mms_Report_Allowed

public java.lang.String getX_Mms_Report_Allowed()
Retrieves MM header with the report field setting

Returns:
String

getX_Mms_Content_Location

public java.lang.String getX_Mms_Content_Location()
Retrieves MM header with the URL where the MM can be downloaded

Returns:
String

getX_Mms_Message_Size

public java.lang.String getX_Mms_Message_Size()
Retrieves MM header with the information of the size of the MMS

Returns:
String

setX_Mms_Expiry

public boolean setX_Mms_Expiry(long expiry_value)
Inserts the value for the MMs expiry date header

Parameters:
expiry_value -
Returns:
true if inserted, otherwise false

setX_Mms_Message_Type

public boolean setX_Mms_Message_Type(java.lang.String message_type)
Inserts the value for the Message-type header

Parameters:
message_type -
Returns:
true if inserted, otherwise false

setX_Mms_Transaction_ID

public boolean setX_Mms_Transaction_ID(java.lang.String transaction_id)
Inserts the value for the transaction ID header

Parameters:
transaction_id -
Returns:
true if inserted, otherwise false

setX_Mms_MMS_Version

public boolean setX_Mms_MMS_Version(java.lang.String mms_version)
Inserts the value for the MMS vesion header

Parameters:
mms_version -
Returns:
true if inserted, otherwise false

setContent_Type

public boolean setContent_Type(java.lang.String content_type)
Inserts the value for the content type header

Parameters:
content_type -
Returns:
true if inserted, otherwise false

setContent

public boolean setContent(java.lang.Object content)
Inserts the value for the content header

Parameters:
content -
Returns:
true if inserted, otherwise false

setX_Mms_Delivery_Time

public boolean setX_Mms_Delivery_Time(long delivery_time)
Inserts the value for the Delivery-time header

Parameters:
delivery_time -
Returns:
true if inserted, otherwise false

setDate

public boolean setDate(java.lang.String date)
Inserts the value for the date header

Parameters:
date -
Returns:
true if inserted, otherwise false

setX_Mms_Message_Class

public boolean setX_Mms_Message_Class(java.lang.String message_class)
Inserts the value for the messgage class header

Parameters:
message_class -
Returns:
true if inserted, otherwise false

setX_Mms_Priority

public boolean setX_Mms_Priority(java.lang.String priority)
Inserts the value for the messages priority header

Parameters:
priority -
Returns:
true if inserted, otherwise false

setX_Mms_Sender_Visibility

public boolean setX_Mms_Sender_Visibility(java.lang.String sender_visibility)
Inserts the value for the sender visibility header

Parameters:
sender_visibility -
Returns:
true if inserted, otherwise false

setX_Mms_Delivery_Report

public boolean setX_Mms_Delivery_Report(java.lang.String delivery_report)
Inserts the value for the delivery report header

Parameters:
delivery_report -
Returns:
true if inserted, otherwise false

setX_Mms_Reply_Charging

public boolean setX_Mms_Reply_Charging(java.lang.String reply_charging)
Inserts the value for the Reply charging header

Parameters:
reply_charging -
Returns:
true if inserted, otherwise false

setX_Mms_Reply_Charging_Deadline

public boolean setX_Mms_Reply_Charging_Deadline(java.lang.String reply_charging_deadline)
Inserts the value for the reply charging deadline header

Parameters:
reply_charging_deadline -
Returns:
true if inserted, otherwise false

setX_Mms_Reply_Charging_Size

public boolean setX_Mms_Reply_Charging_Size(java.lang.String reply_charging_size)
Inserts the value for the reply charging size header

Parameters:
reply_charging_size -
Returns:
true if inserted, otherwise false

setX_Mms_Reply_Charging_ID

public boolean setX_Mms_Reply_Charging_ID(java.lang.String reply_charging_id)
Inserts the value for the reply charging ID header

Parameters:
reply_charging_id -
Returns:
true if inserted, otherwise false

setX_Mms_Reply_Previously_Sent_By

public boolean setX_Mms_Reply_Previously_Sent_By(java.lang.String previously_sent_by)
Inserts the value for the prevoiously sent by header

Parameters:
previously_sent_by -
Returns:
true if inserted, otherwise false

setX_Mms_Reply_Previously_Sent_Date

public boolean setX_Mms_Reply_Previously_Sent_Date(java.lang.String previously_sent_date)
Inserts the value for the sent date header

Parameters:
previously_sent_date -
Returns:
true if inserted, otherwise false

setX_Mms_Read_Report

public boolean setX_Mms_Read_Report(java.lang.String read_report)
Inserts the value for the read report header

Parameters:
read_report -
Returns:
true if inserted, otherwise false

setSubject

public boolean setSubject(java.lang.String subject)
Inserts the value for the subject header

Parameters:
subject -
Returns:
true if inserted, otherwise false

setFrom

public boolean setFrom(java.lang.String from)
Inserts the value for the from header

Parameters:
from -
Returns:
true if inserted, otherwise false

setTo

public boolean setTo(java.lang.String to)
Inserts the value for the to header

Parameters:
to -
Returns:
true if inserted, otherwise false

setCc

public boolean setCc(java.lang.String cc)
Inserts the value for the cc header

Parameters:
cc -
Returns:
true if inserted, otherwise false

setBcc

public boolean setBcc(java.lang.String bcc)
Inserts the value for te bcc header

Parameters:
bcc -
Returns:
true if inserted, otherwise false

setMessage_ID

public boolean setMessage_ID(java.lang.String message_id)
Inserts the value for the message ID header

Parameters:
message_id -
Returns:
true if inserted, otherwise false

setX_Mms_Retrieve_Status

public boolean setX_Mms_Retrieve_Status(java.lang.String retrieve_status)
Inserts the value for the retrieve status header

Parameters:
retrieve_status -
Returns:
true if inserted, otherwise false

setX_Mms_Response_Status

public boolean setX_Mms_Response_Status(java.lang.String response_status)
Inserts the value for the response status header

Parameters:
response_status -
Returns:
true if inserted, otherwise false

setX_Mms_Retrieve_Text

public boolean setX_Mms_Retrieve_Text(java.lang.String retrieve_text)
Inserts the value for the retrieve text header

Parameters:
retrieve_text -
Returns:
true if inserted, otherwise false

setX_Mms_Response_Text

public boolean setX_Mms_Response_Text(java.lang.String response_text)
Inserts the value for the response text header

Parameters:
response_text -
Returns:
true if inserted, otherwise false

setX_Mms_Read_Status

public boolean setX_Mms_Read_Status(java.lang.String read_status)
Inserts the value for the read status header

Parameters:
read_status -
Returns:
true if inserted, otherwise false

setX_Mms_Status

public boolean setX_Mms_Status(java.lang.String status)
Inserts the value for the status header

Parameters:
status -
Returns:
true if inserted, otherwise false

setX_Mms_Report_Allowed

public boolean setX_Mms_Report_Allowed(java.lang.String report_allowed)
Inserts the value for the report allowed header

Parameters:
report_allowed -
Returns:
true if inserted, otherwise false

setX_Mms_Content_Location

public boolean setX_Mms_Content_Location(java.lang.String content_location)
Inserts the value for the content location header

Parameters:
content_location -
Returns:
true if inserted, otherwise false

setX_Mms_Message_Size

public boolean setX_Mms_Message_Size(long message_size)
Inserts the value for the message size header

Parameters:
message_size -
Returns:
true if inserted, otherwise false

removeElement

public boolean removeElement(java.lang.Object key)
Removes an element in HashMap

Parameters:
key -
Returns:
True if removed, null may be returned if key doesn't exists.

getSize

public int getSize()
Returns the dataMap's size.

Returns:
Integer. The size of HashMap.

compareValue

public boolean compareValue(java.lang.String key,
                            java.lang.String value)
Compares a given value with that which is present in m_dataMap

Parameters:
key -
value -
Returns:
true if the values are alike, otherwise false

keyExists

public boolean keyExists(java.lang.String key)
Returns true if a given key is present in m_dataMap

Parameters:
key -
Returns:
true if present, otherwise false

getKeys

public java.lang.Object[] getKeys()
Returns all the key in HashMap to a String array.

Returns:
Object array

getValues

public java.lang.Object[] getValues()
Returns all values in HashMap into a Object array

Returns:
an Object array

insertElement

public boolean insertElement(java.lang.Object messageType,
                             java.lang.Object content)
Inserts a new element into the HashMap
Returns false if messagetype already exists.

Parameters:
messageType -
content -
Returns:
Boolean. True if input successful, false if the key exist in HashMap

copy

public void copy(java.lang.Object other)
          throws OpenMMSException
Creates a copy of a given MM_Data object

Parameters:
other -
Throws:
OpenMMSException