com.ados.hestia.parser.rnbm.exchange
Class PayloadContainer

java.lang.Object
  extended by com.ados.hestia.parser.rnbm.exchange.Container
      extended by com.ados.hestia.parser.rnbm.exchange.PayloadContainer
All Implemented Interfaces:
Serializable

public class PayloadContainer
extends Container

Exchange RJO object with attachement beetween Hestia and EIS.

Version:
$Revision: 1410 $ $Date: 2005-11-30 07:38:56 +0900 $
See Also:
Serialized Form

Field Summary
static int CONTAINER_TYPE_PAYLOAD
           
protected  Attachment[] m_attachments
           
protected  ServiceContent m_serviceContent
           
 
Fields inherited from class com.ados.hestia.parser.rnbm.exchange.Container
m_date, m_eis, m_fifoIndex, m_logTraceID, m_partner, m_pipID, m_pipInstanceID, m_version
 
Constructor Summary
PayloadContainer(Date date, PayloadContainer pc, ServiceContent serviceContent, Attachment[] attachments)
          Create as response for provided container.
PayloadContainer(Date date, String eis, String partner, String pipInstanceID, ServiceContent serviceContent, Attachment[] attachments)
          Direct constructor.
 
Method Summary
 void addAttachment(Attachment attachment)
          Add attachment.
 void deleteAttachment(Attachment attachment)
          Remove attachment from payload.
 Attachment getAttachment(int index)
          Returns specific attachment or null if index is invalid.
 Attachment getAttachment(String fileName)
          Seek and return attachment by it's file name.
 int getAttachmentCount()
          Returns attachments count.
 Attachment[] getAttachments()
          Returns array of attachments.
 ServiceContent getServiceContent()
          Returns service content.
 int getType()
          Indicate type of container.
 String toString()
          
 
Methods inherited from class com.ados.hestia.parser.rnbm.exchange.Container
getDate, getEIS, getFIFOIndex, getLogTraceID, getPartner, getPIPID, getPipInstanceID, getVersion, setFIFOIndex, setLogTraceID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTAINER_TYPE_PAYLOAD

public static final int CONTAINER_TYPE_PAYLOAD
See Also:
Constant Field Values

m_serviceContent

protected ServiceContent m_serviceContent

m_attachments

protected Attachment[] m_attachments
Constructor Detail

PayloadContainer

public PayloadContainer(Date date,
                        String eis,
                        String partner,
                        String pipInstanceID,
                        ServiceContent serviceContent,
                        Attachment[] attachments)
Direct constructor.

Parameters:
date - - date of creation.
eis - - eis identifier.
partner - - partner identifier.
pipInstanceID - corresponded instance of PIP.
serviceContent - ServiceContent to keep.
attachments - array of attached files. Can be null.

PayloadContainer

public PayloadContainer(Date date,
                        PayloadContainer pc,
                        ServiceContent serviceContent,
                        Attachment[] attachments)
Create as response for provided container.

Parameters:
date - - date of creation.
pc - - original request container.
serviceContent - - ServiceContent to keep.
attachments - - array of attached files.
Method Detail

getType

public int getType()
Indicate type of container. Is this payload or status.

Specified by:
getType in class Container
Returns:
type of container. Is this payload or status

getServiceContent

public ServiceContent getServiceContent()
Returns service content.

Returns:
service content

getAttachments

public Attachment[] getAttachments()
Returns array of attachments.

Returns:
array of attachments

getAttachmentCount

public int getAttachmentCount()
Returns attachments count.

Returns:
attachments count

getAttachment

public Attachment getAttachment(int index)
Returns specific attachment or null if index is invalid.

Parameters:
index - position of attachment
Returns:
specific attachment or null if index is invalid

getAttachment

public Attachment getAttachment(String fileName)
Seek and return attachment by it's file name.

Parameters:
fileName - name of file to seek
Returns:
Seek and return attachment by it's file name. return null if attach was not found.

addAttachment

public void addAttachment(Attachment attachment)
Add attachment.

Parameters:
attachment - attachment to add

deleteAttachment

public void deleteAttachment(Attachment attachment)
Remove attachment from payload.

Parameters:
attachment - attachment to remove

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2005-2006 ADOS Co.,Ltd.. All Rights Reserved.