com.americancoders.edi
Class OutgoingEDIMail

java.lang.Object
  |
  +--com.americancoders.edi.OutgoingEDIMail

public class OutgoingEDIMail
extends java.lang.Object

Class to send EDI Documents via Internet Mail
Class contains a main method to allow it to invoked as an application.
format: java com.americancoders.edi.OutgoingEDIMail hostid userid toWhom filename
where hostid is the name of your incoming mail server
userid mailid to get mail
toWhom userid to receive file
filename file to be mailed, file will be wrapped around MIME type applicaiton/edi/x12

OBOE - Open Business Objects for EDI
An EDI and XML Translator Written In Java
Copyright 1998-2000 - American Coders, LTD - Raleigh NC USA
All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com

Version:
1.4.1
Author:
Joe McVerry, American Coders Ltd.

Constructor Summary
OutgoingEDIMail(java.lang.String inHost, java.lang.String inUser)
          construct with host, user protocol.
OutgoingEDIMail(java.lang.String inHost, java.lang.String inUser, java.lang.String inProtocol)
          construct with host, user protocol.
OutgoingEDIMail(java.lang.String inHost, java.lang.String inUser, java.lang.String inKeyStoreFileName, java.lang.String inKeyStorePassword)
          construct with host, user protocol.
 
Method Summary
static byte[] decode(byte[] data)
           
static byte[] encode(byte[] data)
           
static void main(java.lang.String[] argv)
           
 void sendEDIDocument(java.lang.String message, java.lang.String toWhom, boolean sendMDN)
          send a document, uses the other sendEDIDocument with debugging turned off
 void sendEDIDocument(java.lang.String message, java.lang.String toWhom, boolean sendMDN, boolean debug)
          send a document, optional debugging switch.
 void sendEncryptedEDIDocument(java.lang.String message, java.lang.String toWhom, boolean debug)
          send an encrypted document, optional debugging switch.
 void sendMDNResponse(java.lang.String toWhom, boolean lookedAt)
          send an MIME Message Delivery Notification back to sender
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded response text
hardcoded reported as automatic-action in MDN disposition
 void sendSignedEDIDocument(java.lang.String message, java.lang.String toWhom, boolean debug)
          send an signed document, optional debugging switch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutgoingEDIMail

public OutgoingEDIMail(java.lang.String inHost,
                       java.lang.String inUser,
                       java.lang.String inProtocol)
construct with host, user protocol. as of now the only protocol supported is SMTP, so there's really no reason to use this instantiator.
Parameters:
String - SMTP hostid
String - register userid
String - protocol - if someone provides another java.mail protocol, specify it here

OutgoingEDIMail

public OutgoingEDIMail(java.lang.String inHost,
                       java.lang.String inUser)
construct with host, user protocol. as of now the only protocol supported is SMTP
Parameters:
String - SMTP hostid
String - register userid

OutgoingEDIMail

public OutgoingEDIMail(java.lang.String inHost,
                       java.lang.String inUser,
                       java.lang.String inKeyStoreFileName,
                       java.lang.String inKeyStorePassword)
                throws java.lang.Exception
construct with host, user protocol. as of now the only protocol supported is SMTP
Parameters:
String - SMTP hostid
String - register userid
String - key Store Filename
String - key Store Password
Method Detail

main

public static void main(java.lang.String[] argv)

sendEDIDocument

public void sendEDIDocument(java.lang.String message,
                            java.lang.String toWhom,
                            boolean sendMDN)
send a document, uses the other sendEDIDocument with debugging turned off
Parameters:
String - message, the EDI Document
String - toWhom, target audience
boolean - sendMDN, attach message disposition notification MIME object

sendEDIDocument

public void sendEDIDocument(java.lang.String message,
                            java.lang.String toWhom,
                            boolean sendMDN,
                            boolean debug)
send a document, optional debugging switch.
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded mime type applciation/edix12
Parameters:
String - message, the EDI Document
String - toWhom, target audience
boolean - sendMDN, attach message disposition notification MIME object
boolean - debug turn on java.mail debugger

sendEncryptedEDIDocument

public void sendEncryptedEDIDocument(java.lang.String message,
                                     java.lang.String toWhom,
                                     boolean debug)
send an encrypted document, optional debugging switch.
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded mime type applciation/edix12
Parameters:
String - message, the EDI Document
String - toWhom, target audience, keyStore key
boolean - debug turn on java.mail debugger

sendSignedEDIDocument

public void sendSignedEDIDocument(java.lang.String message,
                                  java.lang.String toWhom,
                                  boolean debug)
send an signed document, optional debugging switch.
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded mime type applciation/edix12
Parameters:
String - message, the EDI Document
String - toWhom, target audience, keyStore key
boolean - debug turn on java.mail debugger

sendMDNResponse

public void sendMDNResponse(java.lang.String toWhom,
                            boolean lookedAt)
send an MIME Message Delivery Notification back to sender
hardcoded mailer id
hardcoded subject line, see class variable subject
hardcoded response text
hardcoded reported as automatic-action in MDN disposition
Parameters:
String - toWhom, target audience
boolean - lookedAt, was the message looked at

encode

public static byte[] encode(byte[] data)

decode

public static byte[] decode(byte[] data)