Class IDoc
java.lang.Object
com.onenetwork.platform.integ.sap.IDocElement
com.onenetwork.platform.integ.sap.IDoc
public class IDoc extends IDocElement
Represents an instance of an SAP IDoc.
-
Field Summary
Fields Modifier and Type Field Description protected IDocDef
iDocDef
protected java.util.List<IDocSegment>
segments
-
Constructor Summary
Constructors Constructor Description IDoc()
-
Method Summary
Modifier and Type Method Description void
addSegment(IDocSegment iDocSegment)
Adds the specified segmentIDocSegment
addSegment(java.lang.String segmentName)
Creates a new IDocSegment with the given name, adds it to the segment list, and returns itIDocSegment
getFirstSegment(java.lang.String segmentName)
Returns the first occurrence of the IDocSegment with the specified nameIDocDef
getIDocDef()
Returns the IDocDef which describes the structure of this IDocjava.util.List<IDocSegment>
getSegments()
Returns all the segments within the IDoc.java.util.List<IDocSegment>
getSegments(java.lang.String segmentName)
Returns a new List containing all the segments with the specified namevoid
setIDocDef(IDocDef iDocDef)
Sets the IDocDef which describes the structure of this IDoc
-
Field Details
-
Constructor Details
-
IDoc
public IDoc()
-
-
Method Details
-
getIDocDef
Returns the IDocDef which describes the structure of this IDoc- Returns:
- IDocDef which describes the structure of this IDoc
-
setIDocDef
Sets the IDocDef which describes the structure of this IDoc- Parameters:
iDocDef
- IDocDef which describes the structure of this IDoc
-
getSegments
Returns all the segments within the IDoc. Mutating this list will alter the IDoc.- Returns:
- all the segments within the IDoc (may be empty, but will never be null)
-
getSegments
Returns a new List containing all the segments with the specified name- Parameters:
segmentName
- segment name to look for- Returns:
- all IDocSegments with the specified name, or empty list
-
getFirstSegment
Returns the first occurrence of the IDocSegment with the specified name- Parameters:
name
-- Returns:
- first occurrence of the IDocSegment, or null
-
addSegment
Creates a new IDocSegment with the given name, adds it to the segment list, and returns it- Parameters:
segmentName
- name of the new segment- Returns:
- the IDocSegment that was created and added
-
addSegment
Adds the specified segment- Parameters:
iDocSegment
- segment to be added
-