Interface EDIService

All Superinterfaces:
Service

public interface EDIService
extends Service
EDIService is used when generating and processing EDI messages. It covers activities such as:
  • creating an EDI Envelope
  • sending an EDI
  • getting EDI Delimiters
  • getting EDI envelopeInfo
  • enqueueing an outbound EDI message
  • Method Summary

    Modifier and Type Method Description
    void buildDataElementsForSegment​(com.americancoders.edi.Segment segment)
    Builds the dataElements using the template corresponding to the segment specified
    java.lang.String convertEnvelopeToString​(com.americancoders.edi.Envelope envelope, EDIEnvelopeInfo ediEnvelopeInfo, EDIMessagingContext ediMessagingContext)
    This method converts the envelope into a formatted String
    java.lang.String convertEnvelopeToString​(com.americancoders.edi.Envelope envelope, EDIMessagingContext ediMessagingContext)
    Deprecated.
    com.americancoders.edi.Envelope createEnvelope​(java.util.List<com.americancoders.edi.TransactionSet> transactionSets, InterchangeInfo interchangeInfo, EDIEnvelopeInfo ediEnvelopeInfo, EDIMessagingContext ediMessagingContext)
    This method creates a default OBOE envelope based on the EDI Format - either X12 / EDIFACT with Interchange Control Version Number 00401 and default sender and receiver as "OneNetwork" and "Client"
    EDIDelimiters getDefaultEDIDelimiters​(java.lang.String ediType)
    Returns the default EDI delimiters applicable based on the EDI type (X12 or EDIFact) EDIDelimeters object contains information regarding group, segment, line and other delimiters.
    EDIDelimiters getEDIDelimiters​(com.americancoders.edi.Envelope envelope)
    This method returns the EDIDelimeters object containing information regarding group, segment, line and other delimiters for the EDI Envelope.
    EDIEnvelopeInfo getEDIEnvelopeInfo​(com.americancoders.edi.Envelope envelope, EDIDelimiters ediDelimiters, EDIMessagingContext ediMessagingContext)
    This method creates EDIEnvelope object consisting of delimiters , control numbers information for the envelope
    com.americancoders.edi.Envelope getEnvelope​(java.lang.String ediContent)
    Converts EDI Content in string representation into Envelope object.
    EDIMessage send​(com.americancoders.edi.Envelope envelope, EDIEnvelopeInfo ediEnvelopeInfo, QueueRef queue, boolean createEdiMsgQueueEntries, EDIMessagingContext ediMessagingContext)
    This method is used to send an outbound EDI envelope to the outbox queue returned by the mapper.
    EDIMessage send​(com.americancoders.edi.Envelope envelope, QueueRef queue, boolean createEdiMsgQueueEntries, EDIMessagingContext ediMessagingContext)
    Deprecated.
  • Method Details

    • createEnvelope

      com.americancoders.edi.Envelope createEnvelope​(java.util.List<com.americancoders.edi.TransactionSet> transactionSets, InterchangeInfo interchangeInfo, EDIEnvelopeInfo ediEnvelopeInfo, EDIMessagingContext ediMessagingContext)
      This method creates a default OBOE envelope based on the EDI Format - either X12 / EDIFACT with Interchange Control Version Number 00401 and default sender and receiver as "OneNetwork" and "Client"
      Parameters:
      transactionSets - - List of transactionSet objects to be used for creating the envelope
      ediMessagingContext - - EDIMessagingContext which has the EDI context details
      interchangeInfo - - InterchangeInfo object consisting of Sender/Receiver GS and ISA IDs and qualifier information
      ediEnvelopeInfo - - EDIEnvelopeInfo object consisting of delimiters , control numbers information for the envelope
      Returns:
      the EDI Envelope object.
    • convertEnvelopeToString

      @Deprecated java.lang.String convertEnvelopeToString​(com.americancoders.edi.Envelope envelope, EDIMessagingContext ediMessagingContext)
      Deprecated.
      Parameters:
      envelope - - Envelope object to be converted into text representation
      ediMessagingContext - - EDIMessagingContext which has the EDI context details
      Returns:
      string representation of Envelope as formatted text
    • convertEnvelopeToString

      java.lang.String convertEnvelopeToString​(com.americancoders.edi.Envelope envelope, EDIEnvelopeInfo ediEnvelopeInfo, EDIMessagingContext ediMessagingContext)
      This method converts the envelope into a formatted String
      Parameters:
      envelope - - Envelope object to be converted into text representation
      ediEnvelopeInfo - - - EDIEnvelopeInfo object consisting of delimiters & control header information for the envelope
      ediMessagingContext - - EDIMessagingContext which has the EDI context details
      Returns:
      string representation of Envelope as formatted text
    • getEnvelope

      com.americancoders.edi.Envelope getEnvelope​(java.lang.String ediContent) throws java.lang.Exception
      Converts EDI Content in string representation into Envelope object.
      Parameters:
      ediContent - - String representation of Envelope
      Returns:
      Envelope object
      Throws:
      java.lang.Exception - - throws Exception when EDI cannot be parsed
    • getEDIDelimiters

      EDIDelimiters getEDIDelimiters​(com.americancoders.edi.Envelope envelope)
      This method returns the EDIDelimeters object containing information regarding group, segment, line and other delimiters for the EDI Envelope.
      Parameters:
      envelope - - Envelope object
      Returns:
      EDIDelimiters object for the envelope
    • getEDIEnvelopeInfo

      EDIEnvelopeInfo getEDIEnvelopeInfo​(com.americancoders.edi.Envelope envelope, EDIDelimiters ediDelimiters, EDIMessagingContext ediMessagingContext)
      This method creates EDIEnvelope object consisting of delimiters , control numbers information for the envelope
      Parameters:
      envelope - - the EDI envelope
      ediDelimiters - - EDIDelimiters object for the envelope
      ediMessagingContext - - EDIMessagingContext which has the EDI context details
      Returns:
    • send

      EDIMessage send​(com.americancoders.edi.Envelope envelope, EDIEnvelopeInfo ediEnvelopeInfo, QueueRef queue, boolean createEdiMsgQueueEntries, EDIMessagingContext ediMessagingContext) throws java.lang.Exception
      This method is used to send an outbound EDI envelope to the outbox queue returned by the mapper.

      Default behavior is to enqueue it to the oubox/EDI queue.

      Parameters:
      envelope - - the EDI envelope to send
      ediEnvelopInfo - - EDIEnvelopeInfo object consisting of delimiters & control header information for the envelope
      queue - - the outbox EDI queue to use
      createEdiMsgQueueEntries - - boolean flag which determines whether to update the EDIMessageQueue entry after sending the EDI
      ediMessagingContext - - EDIMessagingContext which has the EDI context details
      Returns:
      - the EDIMessage object which contains the platform Message object and the Envelope object both.
      Throws:
      java.lang.Exception
    • send

      @Deprecated EDIMessage send​(com.americancoders.edi.Envelope envelope, QueueRef queue, boolean createEdiMsgQueueEntries, EDIMessagingContext ediMessagingContext) throws java.lang.Exception
      Deprecated.
      Parameters:
      envelope - - the EDI envelope to send
      queue - - the outbox EDI queue to use
      createEdiMsgQueueEntries - - boolean flag which determines whether to update the EDIMessageQueue entry after sending the EDI
      ediMessagingContext - - EDIMessagingContext which has the EDI context details
      Returns:
      - the EDIMessage object which contains the platform Message object and the Envelope object both.
      Throws:
      java.lang.Exception
    • getDefaultEDIDelimiters

      EDIDelimiters getDefaultEDIDelimiters​(java.lang.String ediType)
      Returns the default EDI delimiters applicable based on the EDI type (X12 or EDIFact) EDIDelimeters object contains information regarding group, segment, line and other delimiters.
      Parameters:
      ediType - - X12 or EDIFact refer EDIConstants
      Returns:
      default EDIDelimiters applicable
    • buildDataElementsForSegment

      void buildDataElementsForSegment​(com.americancoders.edi.Segment segment)
      Builds the dataElements using the template corresponding to the segment specified
      Parameters:
      segment - - Segment whose template needs to be used.