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  

    Fields inherited from class com.onenetwork.platform.integ.sap.IDocElement

    name
  • Constructor Summary

    Constructors 
    Constructor Description
    IDoc()  
  • Method Summary

    Modifier and Type Method Description
    void addSegment​(IDocSegment iDocSegment)
    Adds the specified segment
    IDocSegment addSegment​(java.lang.String segmentName)
    Creates a new IDocSegment with the given name, adds it to the segment list, and returns it
    IDocSegment getFirstSegment​(java.lang.String segmentName)
    Returns the first occurrence of the IDocSegment with the specified name
    IDocDef getIDocDef()
    Returns the IDocDef which describes the structure of this IDoc
    java.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 name
    void setIDocDef​(IDocDef iDocDef)
    Sets the IDocDef which describes the structure of this IDoc

    Methods inherited from class com.onenetwork.platform.integ.sap.IDocElement

    getName, setName

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • IDoc

      public IDoc()
  • Method Details

    • getIDocDef

      public IDocDef getIDocDef()
      Returns the IDocDef which describes the structure of this IDoc
      Returns:
      IDocDef which describes the structure of this IDoc
    • setIDocDef

      public void setIDocDef​(IDocDef iDocDef)
      Sets the IDocDef which describes the structure of this IDoc
      Parameters:
      iDocDef - IDocDef which describes the structure of this IDoc
    • getSegments

      public java.util.List<IDocSegment> 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

      public java.util.List<IDocSegment> getSegments​(java.lang.String segmentName)
      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

      public IDocSegment getFirstSegment​(java.lang.String segmentName)
      Returns the first occurrence of the IDocSegment with the specified name
      Parameters:
      name -
      Returns:
      first occurrence of the IDocSegment, or null
    • addSegment

      public IDocSegment addSegment​(java.lang.String segmentName)
      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

      public void addSegment​(IDocSegment iDocSegment)
      Adds the specified segment
      Parameters:
      iDocSegment - segment to be added