com.cyclonecommerce.cybervan.api
Interface IntegrationDocument

All Known Implementing Classes:
DefaultDocument

public interface IntegrationDocument

Represents the content and information concerning a document


Field Summary
static int MAX_REFERENCES
           
static java.lang.String NA
           
static java.lang.String NA_LIT
           
 
Method Summary
 java.lang.String getControlId()
          Get the document's control id.
 java.lang.String getCorrelationId()
          Get the document's correlation id.
 java.lang.String getEbXmlAction()
          Get the ebXmlAction of the document was transfered using ebXml
 java.lang.String getEbXmlService()
          Get the ebXmlService if the document was transfered using ebXml.
 java.lang.String getFingerprint()
          Get the documents fingerprint.
 InterchangeURL getInterchangeHttpsURL()
          HTTPS URL to use to retrieve the raw document content.
 InterchangeURL getInterchangeURL()
          HTTP URL to use to retrieve the raw document content.
 int getMaxReferences()
          Deprecated.  
 java.lang.String getName()
          Get the filename used when backing up the file.
 java.lang.String getOriginalName()
          Get the document's original filename.
 int getOriginalSize()
          Get the size, in bytes, of the original, raw data.
 java.lang.String getPackagingType()
          Get the packaging type (AKA: BusinessProtocol) to used transfering sending a document.
 java.lang.String getPackagingVersion()
          Get the packaging version (AKA: BusinessProtocol) used when transfering a document.
 java.lang.String getPath()
          Return the path to the document content.
 java.lang.String getPersistedName()
          getPersistedName
 CompanyId getReceiverId()
          Get the Receiver CompanyId object.
 java.lang.String getReference(int referenceNumber)
          Deprecated. Use getUserData instead.
 java.lang.String getRefToMessageId()
          Get the document's RefToMessageId.
 SecurityLevel getSecurityLevel()
          Get the level of security used when transporting the document.
 CompanyId getSenderId()
          Set the Sender CompanyId.
 int getSequenceId()
          getSequenceId
 java.lang.String getTransport()
          Get the transport that the document was transported on.
 int getTransportSize()
          Get the packeged size of the document.
 DocumentType getType()
          Get the document type.
 java.lang.String getUniqueId()
          Get the document's unique id.
 java.util.Properties getUserData()
          Get the additional user defined data.
 void setContent(java.lang.String path)
          setContent - Sets the raw data of the document.
 void setCorrelationId(java.lang.String id)
          Set the document's correlation id.
 void setEbXmlAction(java.lang.String ebXmlAction)
          Set the ebXmlAction if MCD free trading is enabled.
 void setEbXmlService(java.lang.String ebXmlService)
          Set the ebXmlService if MCD free ebXml trading is enabled.
 void setInterchangeHttpsURL(InterchangeURL url)
          setInterchangeHttpsURL - Sets URL to use when communicating with Interchange.
 void setInterchangeURL(InterchangeURL url)
          setInterchangeURL - Sets URL to use when communicating with Interchange.
 void setPackagingType(java.lang.String packagingType)
          Set the packaging type (AKA: BusinessProtocol) to used when transfering a document.
 void setPackagingVersion(java.lang.String packagingVersion)
          Set the packaging version (AKA: BusinessProtocol) to used when transfering a document.
 void setPath(java.lang.String path)
          Set the path the document content.
 void setReceiverId(CompanyId id)
          setReceiverId - Sets the ID of the document recipient
 void setReference(int referenceNumber, java.lang.String reference)
          Deprecated. Use setUserData instead.
 void setRefToMessageId(java.lang.String id)
          Set the document's RefToMessageId.
 void setSenderId(CompanyId id)
          setSenderId - Sets the ID of the document sender
 void setUniqueId(java.lang.String uniqueId)
          Set the documents Unique Id.
 void setUserData(java.util.Properties userProperties)
          Sets additional user defined data that may be used by the packager when constructing the packaged document.
 

Field Detail

MAX_REFERENCES

public static final int MAX_REFERENCES

NA_LIT

public static final java.lang.String NA_LIT

NA

public static final java.lang.String NA
Method Detail

getControlId

public java.lang.String getControlId()
Get the document's control id.
Returns:
Returns the document's control id. Will be initialized to XML for XML documents. Binary for Binary documents. And, a EDI control id defined in the document for X12 and EDIFACT documents.

getFingerprint

public java.lang.String getFingerprint()
Get the documents fingerprint.
Returns:
Returns the fingerprint of the signed data. Returns null if not available.

getName

public java.lang.String getName()
Get the filename used when backing up the file.
Returns:
Returns the backup filename.

getOriginalName

public java.lang.String getOriginalName()
Get the document's original filename.
Returns:
Original filename of the document.

getOriginalSize

public int getOriginalSize()
Get the size, in bytes, of the original, raw data. Returns null if not available
Returns:
Returns the size, in bytes, of the original, raw data. Returns null if not available

getPath

public java.lang.String getPath()
Return the path to the document content. For use by local clients only
Returns:
Return the path to the document content. For use by local clients only

setPath

public void setPath(java.lang.String path)
Set the path the document content.
Parameters:
path - to the raw document content.

getReceiverId

public CompanyId getReceiverId()
Get the Receiver CompanyId object.
Returns:
Returns the Receiver's CompanyId object. An uninitialized CompanyId object is returned if setReceiverId has not yet been called.

getReference

public java.lang.String getReference(int referenceNumber)
Deprecated. Use getUserData instead.

getReference
Parameters:
referenceNumber - The reference index ( zero based )
Returns:
Returns the specified user defined reference. Returns null if not available

getInterchangeURL

public InterchangeURL getInterchangeURL()
HTTP URL to use to retrieve the raw document content. Only used when HTTP API support is enabled. For use by remote clients only
Returns:
Returns the HTTP url to use to retreive the raw document content. Returns null if not available

getInterchangeHttpsURL

public InterchangeURL getInterchangeHttpsURL()
HTTPS URL to use to retrieve the raw document content. Only used when HTTPS API support is enabled. For use by remote clients only
Returns:
Returns the HTTPS URL to use to retreive the raw document content. Returns null if not available

getSecurityLevel

public SecurityLevel getSecurityLevel()
Get the level of security used when transporting the document. Returns null if not available
Returns:
Returns the level of security used when transporting the document. Returns null if not available

getSenderId

public CompanyId getSenderId()
Set the Sender CompanyId.
Returns:
Returns the Sender's CompanyId object. An uninitialized CompanyId object is returned if setSenderId has not yet been called.

getTransportSize

public int getTransportSize()
Get the packeged size of the document.
Returns:
Returns the size of the document, in bytes, at the time of tranport ( including compression, security and packaging ). Returns null if not available

getTransport

public java.lang.String getTransport()
Get the transport that the document was transported on.
Returns:
Returns the transport the document was received on. Returns null if not available

getType

public DocumentType getType()
Get the document type.
Returns:
Returns the document type - X12, EDIFACT, XML, etc. Null if not available.

getUniqueId

public java.lang.String getUniqueId()
Get the document's unique id.
Returns:
Returns a unique document ID. This ID is generated by Interchange Server and is used for tracking purposes

setUniqueId

public void setUniqueId(java.lang.String uniqueId)
Set the documents Unique Id. This ID is used by the Interchange Server for tracking purposes. If the UniqueId is not set by the api client, then Interchange will assigne an id. Make sure when calling this method that the id is globally unique.

getCorrelationId

public java.lang.String getCorrelationId()
Get the document's correlation id.
Returns:
Returns the document Correlation Id. This id can be generated by Interchange, or generated by applications integrating with Interchange. The id is used to tie together multiple documents into a conversation. Multiple documents can have the same Correlation Id.

setCorrelationId

public void setCorrelationId(java.lang.String id)
Set the document's correlation id.
Parameters:
id - The document Correlation Id. This id can be generated by Interchange, or generated by applications integrating with Interchange. The id is used to tie together multiple documents into a conversation. Multiple documents can have the same Correlation Id.

getRefToMessageId

public java.lang.String getRefToMessageId()
Get the document's RefToMessageId.
For RosettaNet and ebXML ACKs this value is set to to unique id of the corresponding document. For both RosettaNet and ebXML the document message id and the unique id are equivalent.
For EDIINT MDNs this value is going to be set to the message id of the corresponding document. The EDIINT message id is in the form "<#CompanyId#ControlId#UniqueId#>". Where CompanyId is the Id of the sending company. ControlId is the X12/EDIFACT document control id. And, UniqueId is the Interchange unique document id. For EDIINT the Interchange unique id is not equivalent to the message id.
Returns:
Returns the document RefToMessageId. The MessageId in which this (current) document refers to (or is a response to).

setRefToMessageId

public void setRefToMessageId(java.lang.String id)
Set the document's RefToMessageId. Typically used internally by the server. Can be used by a backend system to set a reference to a previously sent or received document.
Parameters:
id - The document RefToMessageId.

getSequenceId

public int getSequenceId()
getSequenceId
Returns:
Returns a unique document sequence ID. This ID is generated by Inbound Agent and is only set when sequencing is turned on by partner's inbound configuration.

getPersistedName

public java.lang.String getPersistedName()
getPersistedName
Returns:
Returns the name of the document as persisted on disk.

setInterchangeURL

public void setInterchangeURL(InterchangeURL url)
setInterchangeURL - Sets URL to use when communicating with Interchange. Cyclone Internal use only
Parameters:
url -  

setInterchangeHttpsURL

public void setInterchangeHttpsURL(InterchangeURL url)
setInterchangeHttpsURL - Sets URL to use when communicating with Interchange. Cyclone Internal use only
Parameters:
url -  

setContent

public void setContent(java.lang.String path)
setContent - Sets the raw data of the document. For use by local clients only
Parameters:
path - The full path of the file containing the raw data

setReceiverId

public void setReceiverId(CompanyId id)
setReceiverId - Sets the ID of the document recipient
Parameters:
id - The company ID

setReference

public void setReference(int referenceNumber,
                         java.lang.String reference)
Deprecated. Use setUserData instead.

setReference - Sets the specified user defined reference
Parameters:
referenceNumber - The reference index
reference - The user specifed reference

setSenderId

public void setSenderId(CompanyId id)
setSenderId - Sets the ID of the document sender
Parameters:
id - The company ID

getMaxReferences

public int getMaxReferences()
Deprecated.  

getMaxReferences - Gets the maximum number of references
Returns:
int

getEbXmlService

public java.lang.String getEbXmlService()
Get the ebXmlService if the document was transfered using ebXml.
Returns:
Returns the ebXmlService if the document was transfered using ebXml.

setEbXmlService

public void setEbXmlService(java.lang.String ebXmlService)
Set the ebXmlService if MCD free ebXml trading is enabled. The ebXmlService must be set if trading ebXml without using a MCD.
Parameters:
ebXmlService - ebXML Service to use when packaging a ebXML document if MCD Free mode is being utilized.

getEbXmlAction

public java.lang.String getEbXmlAction()
Get the ebXmlAction of the document was transfered using ebXml
Returns:
Returns the ebXmlAction of the document was transfered using ebXml

setEbXmlAction

public void setEbXmlAction(java.lang.String ebXmlAction)
Set the ebXmlAction if MCD free trading is enabled. The ebXmlAction must be set if trading ebXml without using a MCD.
Parameters:
ebXmlAction - ebXML Action to use when packaging a ebXML document if MCD Free mode is being utilized.

getPackagingType

public java.lang.String getPackagingType()
Get the packaging type (AKA: BusinessProtocol) to used transfering sending a document.
Returns:
Returns Packaging Type used when packaging the document.
See Also:
PackagingTypes

setPackagingType

public void setPackagingType(java.lang.String packagingType)
Set the packaging type (AKA: BusinessProtocol) to used when transfering a document. The packaging type only needs to be set if trading ebXml without using a MCD. Only should be set for ebXML packaging when MCD free trading is being utilized. do not set this value at any other time.
Parameters:
packagingType - The packaging type to use to package the document.
See Also:
PackagingTypes

getPackagingVersion

public java.lang.String getPackagingVersion()
Get the packaging version (AKA: BusinessProtocol) used when transfering a document.
Returns:
Packaging version used when packaging the document.

setPackagingVersion

public void setPackagingVersion(java.lang.String packagingVersion)
Set the packaging version (AKA: BusinessProtocol) to used when transfering a document. The packaging version only needs to be set if trading ebXml without using a MCD. Only should be set for ebXML packaging when MCD free trading is being utilized. do not set this value at any other time.
Parameters:
packagingVersion - The packaging version

setUserData

public void setUserData(java.util.Properties userProperties)
Sets additional user defined data that may be used by the packager when constructing the packaged document. Currently the properties are only utilized when packaging ebXML documents. setUserData can be called for outbound documents. The properties will be used to populate the ebXML #wildcard element.
Parameters:
userProperties - Initialized with user defined data.

getUserData

public java.util.Properties getUserData()
Get the additional user defined data. Currently the properties are only supported for ebXML documents. getUserData can be called for Inbound Documents. The properties will be read from the inbound ebXML document's #wildcard element.
Returns:
Additional user data transfered within the headers of a inbound document.