com.sap.ip.me.api.sync
Interface InboundContainer


public interface InboundContainer

Respresents data received from backend and related to a particular method.

Author:
SAP

Method Summary
 InboundContainerElement[] getAllElements()
          Gets all body elements of this inbound conatainer.
 java.lang.String getAncestorContainerId()
          Returns the identifier of the container which is ancestor for this one.
 java.lang.String getContainerId()
          Returns the unique identifier of this container.
 InboundContainerElement getElement(java.lang.String fieldName, java.lang.String lineNumber)
          Gets the element for given field name and line number.
 InboundContainerElement[] getElementsWithFieldName(java.lang.String fieldName)
          Gets the elements for the given field name.
 java.lang.String getExecutionDate()
          Gets the execution date of this inbound container.
 java.lang.String getExecutionTime()
          Gets the execution time of this inbound container.
 java.lang.String getGenericBody()
          If this container represents an answer to outbound container with generic body.
 java.lang.String getMethod()
          Gets the method name which is realted to this inbound container.
 java.lang.String getOwner()
          Gets the owner of this inbound container.
 java.lang.String getSendDate()
          Gets the date when this container was send.
 java.lang.String getSendTime()
          Gets the time time when the container was send.
 java.lang.String getStatus()
          Gets the status of the corresponding outbound container.
 InboundContainerElement readNextElement()
          This method has been introduced to reduce the memory consumption on client while synchronization.
 

Method Detail

getMethod

public java.lang.String getMethod()
Gets the method name which is realted to this inbound container.

Returns:
The method name

getSendDate

public java.lang.String getSendDate()
Gets the date when this container was send.

Returns:
The send date

getSendTime

public java.lang.String getSendTime()
Gets the time time when the container was send.

Returns:
The send time

getOwner

public java.lang.String getOwner()
Gets the owner of this inbound container.

Returns:
The owners login name or empty string if container is shared.

getStatus

public java.lang.String getStatus()
Gets the status of the corresponding outbound container.
Following states can occur:

Returns:
The status of the corresponding outbound container.

getExecutionDate

public java.lang.String getExecutionDate()
Gets the execution date of this inbound container.

Returns:
The execution date.

getExecutionTime

public java.lang.String getExecutionTime()
Gets the execution time of this inbound container.

Returns:
The execution time.

getGenericBody

public java.lang.String getGenericBody()
If this container represents an answer to outbound container with generic body.

Returns:
The generic body value.

getContainerId

public java.lang.String getContainerId()
Returns the unique identifier of this container.

Returns:
The container id.

getAncestorContainerId

public java.lang.String getAncestorContainerId()
Returns the identifier of the container which is ancestor for this one. This attribute will be set by the application on the backend. Returns empty string if the attribute is not set.

Returns:
The container id of the ancestor container.

getAllElements

public InboundContainerElement[] getAllElements()
Gets all body elements of this inbound conatainer. If this method is used the whole data container will be read into memory.
If application does not need all elements at the same time readNextItem should be used.

Returns:
Array of inbound container elements. Method does not return null. If there are no elements an empty array will be returned.

getElementsWithFieldName

public InboundContainerElement[] getElementsWithFieldName(java.lang.String fieldName)
Gets the elements for the given field name.
This method requires that the whole inbound container has been read into memory.
If application does not need all elements at the same time readNextItem should be used.

Parameters:
fieldName - Field name of the elements that should be returned.
Returns:
Array of inbound container elements with field name equal to given field name. The method does not return null. If there are no elements in the container for given field name an empty array will be returned.

getElement

public InboundContainerElement getElement(java.lang.String fieldName,
                                          java.lang.String lineNumber)
Gets the element for given field name and line number.
This method requires that the whole inbound container has been read into memory.
If application does not need all elements at the same time readNextItem should be used.

Parameters:
fieldName - Field name of the container element that should be returned.
lineNumber - Line number of the container element that should be returned.
Returns:
Inbound container element for given field name and line number. Returns null if container does not contain an element with given field name and line number.

readNextElement

public InboundContainerElement readNextElement()
                                        throws java.io.IOException
This method has been introduced to reduce the memory consumption on client while synchronization. The inbound file will not be read completely into memory any more. The inbound file will be read step by step. This method reads the next inbound container element from inbound stream. Application can use this method to iterate over all container elements. Sorting of inbound container elements is not guaranteed. If there are no more inbound container elements null will be returned.

Returns:
null if there are no more inbound container elements. Otherwise the next inbound container element will be returned.
Throws:
java.io.IOException - If inbound stream is corrupted an IOException may occur. Usually this method should not occur.


Copyright © 2005 SAP AG. All Rights Reserved.