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


public interface OutboundContainer

Represents a data container for all data that will be passed to the ABAP function module when synchronized to the backend

Author:
SAP

Field Summary
static java.lang.String TYPE_OUTBOUND
          Default type.
static java.lang.String TYPE_REQUEST
          will cause the inbound container to be provided during Sync
 
Method Summary
 void addItem(java.lang.String fieldname, int linenumber, java.lang.String fieldvalue)
          Deprecated. use addItem(String fieldname, String fieldvalue) instead. The line number will be increased automatically.
 void addItem(java.lang.String fieldname, java.lang.String fieldvalue)
          Adds an item to the container.
 void close()
          Writes the content of the container to the current outbound file
 java.lang.String getContainerId()
          Gets the unique identifier of the OutboundContainer object
 int getNextLineNumberForFieldname(java.lang.String fieldname)
          Gets the next line number for a field.
 boolean setInitialItemCount(int initialItemCount)
          Initially reserves space for given number of items.
 

Field Detail

TYPE_OUTBOUND

public static final java.lang.String TYPE_OUTBOUND
Default type. Inbound containers will be processed after sync and will be brougth in at next sync if ready

See Also:
Constant Field Values

TYPE_REQUEST

public static final java.lang.String TYPE_REQUEST
will cause the inbound container to be provided during Sync

See Also:
Constant Field Values
Method Detail

getContainerId

public java.lang.String getContainerId()
Gets the unique identifier of the OutboundContainer object

Returns:
The unique identifier

addItem

public void addItem(java.lang.String fieldname,
                    int linenumber,
                    java.lang.String fieldvalue)
             throws SyncException
Deprecated. use addItem(String fieldname, String fieldvalue) instead. The line number will be increased automatically.

Adds an item to the container. Field name and field value cannot be null and field name cannot be empty (IllegalArgumentException will be thrown).

Parameters:
fieldname - the field name
linenumber - the line number
fieldvalue - the value of this field
Throws:
SyncException - Will be thrown if container was already closed

addItem

public void addItem(java.lang.String fieldname,
                    java.lang.String fieldvalue)
             throws SyncException
Adds an item to the container. Field name and field value cannot be null and field name cannot be empty (IllegalArgumentException will be thrown).

Parameters:
fieldname - the fiel name
fieldvalue - the value of this field
Throws:
SyncException - Will be thrown if container was already closed

close

public void close()
           throws SyncException
Writes the content of the container to the current outbound file

Throws:
SyncException - Will be thrown if container can not be written to the outbound file

getNextLineNumberForFieldname

public int getNextLineNumberForFieldname(java.lang.String fieldname)
Gets the next line number for a field. This value will be used with next addItem call for the given field name. Field name cannot be empty or null (IllegalArgumentException will be thrown).

Parameters:
fieldname - the field name
Returns:
The next line number for the given field

setInitialItemCount

public boolean setInitialItemCount(int initialItemCount)
Initially reserves space for given number of items. This method can only be called once and it can only be called before the first addItem . Otherwise the call will be ignored and false will be returned. Only if the inital size could be set successfully true will be returned.

Parameters:
initialItemCount - The new initial number of items. Only values > 0 are allowed. Other values will be ignored
Returns:
true iff the initial number of items could be set successfully


Copyright © 2005 SAP AG. All Rights Reserved.