org.neociclo.odetteftp.util
Class OdetteFtpSupport

java.lang.Object
  extended by org.neociclo.odetteftp.util.OdetteFtpSupport

public class OdetteFtpSupport
extends Object

Version:
$Rev: 800 $ $Date: 2010-10-19 20:55:25 -0200 (Tue, 19 Oct 2010) $
Author:
Rafael Marins

Method Summary
static void createEnvelopedFile(File input, File output, EnvelopedVirtualFile virtualFile)
           
static void createEnvelopedFile(File input, File output, EnvelopedVirtualFile virtualFile, X509Certificate userCert, PrivateKey userPrivateKey, X509Certificate partnerCert)
           
static void createEnvelopedFile(File input, File output, SecurityLevel securityLevel, CipherSuite cipherSel, FileCompression compressionAlgo, FileEnveloping envelopingFormat, X509Certificate partnerCert, X509Certificate userCert, PrivateKey userPrivateKey)
           
static DeliveryNotification getReplyDeliveryNotification(VirtualFile incomingVirtualFile)
           
static DeliveryNotification getReplyDeliveryNotification(VirtualFile incomingVirtualFile, String creator)
           
static DeliveryNotification getReplyDeliveryNotification(VirtualFile incomingVirtualFile, String creator, NegativeResponseReason reason, String negativeReasonText)
           
static SignedDeliveryNotification getReplySignedDeliveryNotification(EnvelopedVirtualFile incomingVirtualFile, String creator, NegativeResponseReason reason, String negativeReasonText, byte[] signature)
          Prepare the reply Signed Delivery Notification.
static SignedDeliveryNotification getReplySignedDeliveryNotification(EnvelopedVirtualFile incomingVirtualFile, String creator, NegativeResponseReason reason, String negativeReasonText, byte[] virtualFileHash, byte[] signature)
           
static void parseEnvelopedFile(File input, File output, EnvelopedVirtualFile virtualFile, X509Certificate userCert, PrivateKey userPrivateKey, X509Certificate partnerCert)
           
static void parseEnvelopedFile(File input, File output, SecurityLevel securityLevel, CipherSuite cipherSel, FileCompression compressionAlgo, FileEnveloping envelopingFormat, X509Certificate userCert, PrivateKey userPrivateKey, X509Certificate partnerCert)
          Maybe output file is generated even when an exception is thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createEnvelopedFile

public static void createEnvelopedFile(File input,
                                       File output,
                                       EnvelopedVirtualFile virtualFile)
                                throws EnvelopingException
Throws:
EnvelopingException

createEnvelopedFile

public static void createEnvelopedFile(File input,
                                       File output,
                                       EnvelopedVirtualFile virtualFile,
                                       X509Certificate userCert,
                                       PrivateKey userPrivateKey,
                                       X509Certificate partnerCert)
                                throws EnvelopingException
Throws:
EnvelopingException

createEnvelopedFile

public static void createEnvelopedFile(File input,
                                       File output,
                                       SecurityLevel securityLevel,
                                       CipherSuite cipherSel,
                                       FileCompression compressionAlgo,
                                       FileEnveloping envelopingFormat,
                                       X509Certificate partnerCert,
                                       X509Certificate userCert,
                                       PrivateKey userPrivateKey)
                                throws EnvelopingException
Throws:
EnvelopingException

parseEnvelopedFile

public static void parseEnvelopedFile(File input,
                                      File output,
                                      EnvelopedVirtualFile virtualFile,
                                      X509Certificate userCert,
                                      PrivateKey userPrivateKey,
                                      X509Certificate partnerCert)
                               throws EnvelopingException
Throws:
EnvelopingException

parseEnvelopedFile

public static void parseEnvelopedFile(File input,
                                      File output,
                                      SecurityLevel securityLevel,
                                      CipherSuite cipherSel,
                                      FileCompression compressionAlgo,
                                      FileEnveloping envelopingFormat,
                                      X509Certificate userCert,
                                      PrivateKey userPrivateKey,
                                      X509Certificate partnerCert)
                               throws EnvelopingException
Maybe output file is generated even when an exception is thrown.

Parameters:
input -
output -
securityLevel -
cipherSel -
compressionAlgo -
envelopingFormat -
userCert -
userPrivateKey -
partnerCert -
Throws:
EnvelopingException
SignatureCheckException

getReplyDeliveryNotification

public static DeliveryNotification getReplyDeliveryNotification(VirtualFile incomingVirtualFile)

getReplyDeliveryNotification

public static DeliveryNotification getReplyDeliveryNotification(VirtualFile incomingVirtualFile,
                                                                String creator)

getReplyDeliveryNotification

public static DeliveryNotification getReplyDeliveryNotification(VirtualFile incomingVirtualFile,
                                                                String creator,
                                                                NegativeResponseReason reason,
                                                                String negativeReasonText)

getReplySignedDeliveryNotification

public static SignedDeliveryNotification getReplySignedDeliveryNotification(EnvelopedVirtualFile incomingVirtualFile,
                                                                            String creator,
                                                                            NegativeResponseReason reason,
                                                                            String negativeReasonText,
                                                                            byte[] signature)
                                                                     throws NoSuchAlgorithmException,
                                                                            NoSuchProviderException,
                                                                            IOException
Prepare the reply Signed Delivery Notification. Set automatically the computed the Virtual File hash.

Parameters:
incomingVirtualFile -
creator -
reason -
negativeReasonText -
signature -
Returns:
Throws:
NoSuchAlgorithmException
NoSuchProviderException
IOException

getReplySignedDeliveryNotification

public static SignedDeliveryNotification getReplySignedDeliveryNotification(EnvelopedVirtualFile incomingVirtualFile,
                                                                            String creator,
                                                                            NegativeResponseReason reason,
                                                                            String negativeReasonText,
                                                                            byte[] virtualFileHash,
                                                                            byte[] signature)


ACCORD