org.aludratest.service.edifactfile
Interface EdifactFileInteraction

All Superinterfaces:
Action, Interaction
All Known Implementing Classes:
EdifattoFileAction

public interface EdifactFileInteraction
extends Interaction

Parses and saves EDIFACT and X12 documents from and to streams.

Author:
Volker Bergmann

Method Summary
 org.databene.edifatto.model.Interchange createInterchange(String elementType, String elementName, String templateUri, org.databene.edifatto.EdiFormatSymbols symbols, Map<String,Object> variables)
          Creates an Interchange based on a template file and a variable tree
 void delete(String elementType, String elementName, String filePath)
          Deletes a file
 org.databene.edifatto.model.Interchange readInterchange(String elementType, String elementName, String filePath)
          Reads an Interchange from a file system.
 void waitUntilExists(String elementType, String elementName, String filePath)
          Polls the file system until a file at the given path is found or a timeout occurs.
 void waitUntilNotExists(String elementType, String elementName, String filePath)
          Polls the file system until no file is found at the given path.
 void writeInterchange(String elementType, String elementName, org.databene.edifatto.model.Interchange interchange, String filePath, boolean overwrite)
          Writes an EDIFACT or X12 interchange to an OutputStream.
 
Methods inherited from interface org.aludratest.service.Action
createAttachments, createDebugAttachments, setSystemConnector
 

Method Detail

waitUntilExists

void waitUntilExists(String elementType,
                     String elementName,
                     String filePath)
Polls the file system until a file at the given path is found or a timeout occurs.

Parameters:
elementType -
elementName -
filePath -

waitUntilNotExists

void waitUntilNotExists(String elementType,
                        String elementName,
                        String filePath)
Polls the file system until no file is found at the given path.

Parameters:
elementType -
elementName -
filePath -

delete

void delete(String elementType,
            String elementName,
            String filePath)
Deletes a file

Parameters:
elementType -
elementName -
filePath - the path of the file to delete

writeInterchange

void writeInterchange(String elementType,
                      String elementName,
                      org.databene.edifatto.model.Interchange interchange,
                      String filePath,
                      boolean overwrite)
Writes an EDIFACT or X12 interchange to an OutputStream.

Parameters:
elementType -
elementName -
interchange - the interchange to persist
filePath - the path of the file to write
overwrite - flag that indicates whether a pre-existing file may be overwritten

createInterchange

org.databene.edifatto.model.Interchange createInterchange(String elementType,
                                                          String elementName,
                                                          String templateUri,
                                                          org.databene.edifatto.EdiFormatSymbols symbols,
                                                          Map<String,Object> variables)
Creates an Interchange based on a template file and a variable tree

Parameters:
elementType -
elementName -
templateUri - the path of the template file
symbols - the symbols to use
variables - the variable tree
Returns:
a new Interchange containing the information from the variable tree

readInterchange

org.databene.edifatto.model.Interchange readInterchange(String elementType,
                                                        String elementName,
                                                        String filePath)
Reads an Interchange from a file system.

Parameters:
elementType -
elementName -
filePath - the full path of the file to read
Returns:
an Interchange data structure that contains the EDI data mapped to a tree structure


Copyright © 2015 aludratest.org. All rights reserved.