Agentflow
V3.1

pe.pase
Class PASEMessage

java.lang.Object
  extended by pe.pase.PASEMessage
All Implemented Interfaces:
com.flowring.entity.Entity, java.io.Serializable

public class PASEMessage
extends java.lang.Object
implements java.io.Serializable, com.flowring.entity.Entity

The abstract representation of the mail message. MessageID, SendID, RecID, SendName, RecName, Title, MessageContent, and Time are the information encapsulated in PASEMessage. The MessageID is unique and used to identity the specific message in the Agentflow System.

Version:
1.1.5,
Author:
yschen
See Also:
Serialized Form

Field Summary
static int DELETE_MESSAGE
          Message Type: Delete Message
static int FORWARD_MESSAGE
          Message Type: Forward Message
static int NEW_MESSAGE
          Message Type: New Message
static int REPLY_MESSAGE
          Message Type: Reply Message
 
Constructor Summary
PASEMessage()
          Constructor.
PASEMessage(java.lang.String id)
          Constructor.
PASEMessage(java.lang.String pSendID, java.lang.String pRecID, java.lang.String pTitle, java.lang.String pMsg, long pTime)
          Constructor.
 
Method Summary
 void addAttachFileItem(java.lang.Object data)
          Add the attach File item
 void addAttachItem(java.lang.Object data)
          Add the attach Form item
 java.util.Vector getAttachFileList()
          Get the attach File list
 java.util.Vector getAttachList()
          Get the attach Form list
 java.lang.Object getHashKey()
           
 java.lang.String getMsg()
          Get the content of message
 java.lang.String getMsgID()
          Get the message id
 java.lang.String getRecID()
          Get the login id of receiver
 java.lang.String getRecName()
          Get the name of receiver
 java.lang.String getSendID()
          Get the login id of sender
 java.lang.String getSendName()
          Get the name of sender
 long getTime()
          Get the time of message
 java.lang.String getTimeString()
          Get the time string.
 java.lang.String getTitle()
          Get the title of message
 int getType()
          Get the type of message
 boolean isNew()
          Check whether the message is new message
 boolean isReply()
          Check whether the message is reply message
 java.lang.String packAttachList()
          Convert the attach data into string format and pack the strings together.
 void parseAttachList(java.lang.String param)
          Parse the given string.
 void setAttachFileList(java.util.Vector v)
          Set the attach File list
 void setAttachList(java.util.Vector v)
          Set the attach Form list
 void setMsg(java.lang.String msg)
          Set the content of message
 void setMsgID(java.lang.String id)
          Set the message id
 void setNew(boolean b)
          Set the message is new message
 void setRecID(java.lang.String id)
          Set the login id of receiver
 void setRecName(java.lang.String name)
          Set the name of receiver
 void setReply(boolean b)
          Set the message is reply message
 void setSendID(java.lang.String id)
          Set the login id of sender
 void setSendName(java.lang.String name)
          Set the name of sender
 void setTime(long t)
          Set the time of the message
 void setTitle(java.lang.String title)
          Set the title of message
 void setType(int i)
          Set the type of the message
 java.lang.String toString()
          Convert the PASEMessage instance into the string format.
 void update(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DELETE_MESSAGE

public static final int DELETE_MESSAGE
Message Type: Delete Message

Since:
version 1.1.0
See Also:
Constant Field Values

FORWARD_MESSAGE

public static final int FORWARD_MESSAGE
Message Type: Forward Message

Since:
version 1.1.0
See Also:
Constant Field Values

NEW_MESSAGE

public static final int NEW_MESSAGE
Message Type: New Message

Since:
version 1.1.0
See Also:
Constant Field Values

REPLY_MESSAGE

public static final int REPLY_MESSAGE
Message Type: Reply Message

Since:
version 1.1.0
See Also:
Constant Field Values
Constructor Detail

PASEMessage

public PASEMessage()
Constructor. Constructs a instance of PASEMessage without parameters and initial all variables with default value.

Since:
version 1.1.0

PASEMessage

public PASEMessage(java.lang.String id)
Constructor. Constructs a instance of PASEMessage with the message id and intial the other variables with default value.

Parameters:
id - the given pase message id
Since:
version 1.1.0

PASEMessage

public PASEMessage(java.lang.String pSendID,
                   java.lang.String pRecID,
                   java.lang.String pTitle,
                   java.lang.String pMsg,
                   long pTime)
Constructor. Constructs a instance of PASEMessage with the specified parameters.

Parameters:
pSendID - the given login id of the sender
pRecID - the given login id of the receiver
pTitle - the given title of the message
pMsg - the given content of the message
pTime - the given time
Since:
version 1.1.0
Method Detail

addAttachFileItem

public void addAttachFileItem(java.lang.Object data)
Add the attach File item

Parameters:
data - the given data
Since:
version 1.2

addAttachItem

public void addAttachItem(java.lang.Object data)
Add the attach Form item

Parameters:
data - the given data
Since:
version 1.1.0

getAttachFileList

public java.util.Vector getAttachFileList()
Get the attach File list

Returns:
the attach File list (the element in Vector is Object)
Since:
version 1.2

getAttachList

public java.util.Vector getAttachList()
Get the attach Form list

Returns:
the attach list (the element in Vector is Object)
Since:
version 1.1.0

getHashKey

public java.lang.Object getHashKey()
Specified by:
getHashKey in interface com.flowring.entity.Entity

getMsg

public java.lang.String getMsg()
Get the content of message

Returns:
the content
Since:
version 1.1.0

getMsgID

public java.lang.String getMsgID()
Get the message id

Returns:
the message id
Since:
version 1.1.0

getRecID

public java.lang.String getRecID()
Get the login id of receiver

Returns:
the login id
Since:
version 1.1.0

getRecName

public java.lang.String getRecName()
Get the name of receiver

Returns:
the name
Since:
version 1.1.0

getSendID

public java.lang.String getSendID()
Get the login id of sender

Returns:
the login id
Since:
version 1.1.0

getSendName

public java.lang.String getSendName()
Get the name of sender

Returns:
the name
Since:
version 1.1.0

getTime

public long getTime()
Get the time of message

Returns:
the time
Since:
version 1.1.0

getTimeString

public java.lang.String getTimeString()
Get the time string. The string format is "yyyy-MM-dd HH:mm"

Returns:
the string
Since:
version 1.1.0

getTitle

public java.lang.String getTitle()
Get the title of message

Returns:
the title
Since:
version 1.1.0

getType

public int getType()
Get the type of message

Returns:
the type (NEW_MESSAGE, REPLY_MESSAGE, FORWARD_MESSAGE, DELETE_MESSAGE)
Since:
version 1.1.0

isNew

public boolean isNew()
Check whether the message is new message

Returns:
true if the message is new message; false otherwise
Since:
version 1.1.0

isReply

public boolean isReply()
Check whether the message is reply message

Returns:
true if the message is reply message; false otherwise
Since:
version 1.1.0

packAttachList

public java.lang.String packAttachList()
Convert the attach data into string format and pack the strings together.

Returns:
the string
Since:
version 1.1.0

parseAttachList

public void parseAttachList(java.lang.String param)
Parse the given string. Create attach data. Add the data to the attach list.

Parameters:
param - the given param string
Since:
version 1.1.0

setAttachFileList

public void setAttachFileList(java.util.Vector v)
Set the attach File list

Parameters:
v - the given attach File list. (the element in Vector is Object)
Since:
version 1.2

setAttachList

public void setAttachList(java.util.Vector v)
Set the attach Form list

Parameters:
v - the given attach list. (the element in Vector is Object)
Since:
version 1.1.0

setMsg

public void setMsg(java.lang.String msg)
Set the content of message

Parameters:
msg - the content
Since:
version 1.1.0

setMsgID

public void setMsgID(java.lang.String id)
Set the message id

Parameters:
id - the given message id
Since:
version 1.1.0

setNew

public void setNew(boolean b)
Set the message is new message

Parameters:
b - the given boolean value
Since:
version 1.1.0

setRecID

public void setRecID(java.lang.String id)
Set the login id of receiver

Parameters:
id - the given login id
Since:
version 1.1.0

setRecName

public void setRecName(java.lang.String name)
Set the name of receiver

Parameters:
name - the given name
Since:
version 1.1.0

setReply

public void setReply(boolean b)
Set the message is reply message

Parameters:
b - the given boolean value
Since:
version 1.1.0

setSendID

public void setSendID(java.lang.String id)
Set the login id of sender

Parameters:
id - the given login id
Since:
version 1.1.0

setSendName

public void setSendName(java.lang.String name)
Set the name of sender

Parameters:
name - the given name
Since:
version 1.1.0

setTime

public void setTime(long t)
Set the time of the message

Parameters:
t - the given time
Since:
version 1.1.0

setTitle

public void setTitle(java.lang.String title)
Set the title of message

Parameters:
title - the given title
Since:
version 1.1.0

setType

public void setType(int i)
Set the type of the message

Parameters:
i - the given type
Since:
version 1.1.0

toString

public java.lang.String toString()
Convert the PASEMessage instance into the string format. The string format is { mMsgID = [message id] mSendID = [sender's login id] mSendName = [sender's name] mRecID = [receiver's login id] mRecName = [receiver's name] mTitle = [message title] mMsg = [message content] attachList = [attach list] }

Overrides:
toString in class java.lang.Object
Returns:
the string
Since:
version 1.1.0

update

public void update(java.lang.Object obj)
Specified by:
update in interface com.flowring.entity.Entity

Agentflow
V3.1

Submit a bug or feature
Copyright 1999-2010 Flowring , Inc. 12F., No.120, Sec2, Gongdao 5th Rd.,
Hsinchu City 300, Taiwan (R.O.C.) All Rights Reserved.