com.cyclonecommerce.cybervan.api
Class DefaultDocument

java.lang.Object
  |
  +--com.cyclonecommerce.cybervan.api.DefaultDocument

public class DefaultDocument
extends java.lang.Object
implements IntegrationDocument, java.io.Serializable

Provides a means for an Interchange Server to instantiate an IntegrationDocument. Used for outbound documents Only the IntegrationDocument interface methods are intended for use by a client.

See Also:
Serialized Form

Fields inherited from interface com.cyclonecommerce.cybervan.api.IntegrationDocument
MAX_REFERENCES, NA, NA_LIT
 
Constructor Summary
DefaultDocument()
           
 
Method Summary
 void addSecurityLevel(int securityLevel)
          Method addSecurityLevel
 java.lang.String getControlId()
          Method getControlId
 java.lang.String getCorrelationId()
          getCorrelationId
 java.lang.String getDirectory()
          Method getDirectory
 java.lang.String getEbXmlAction()
          Return the ebXmlAction of the document was transfered using ebXml
 java.lang.String getEbXmlService()
          Return the ebXmlService if the document was transfered using ebXml
 java.lang.String getFingerprint()
          Method getFingerprint
 InterchangeURL getInterchangeHttpsURL()
          getInterchangeHttpsURL For use by remote clients only
 InterchangeURL getInterchangeURL()
          Method getInterchangeURL
 int getMaxReferences()
          Method getMaxReferences
 java.lang.String getName()
          Method getName
 java.lang.String getOriginalName()
          Method getOriginalName
 int getOriginalSize()
          Method getOriginalSize
 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()
          Method getPath
 java.lang.String getPersistedName()
          Return the name as stored on disk (Inbound Transport).
 CompanyId getReceiverId()
          Method getReceiverId
 java.lang.String getReference(int aReferenceNumber)
          Method getReference
 java.lang.String getRefToMessageId()
          getRefToMessageId
 SecurityLevel getSecurityLevel()
          Method getSecurityLevel
 CompanyId getSenderId()
          Method getSenderId
 int getSequenceId()
          Method getSequenceId
 java.lang.String getTransport()
          Method getTransport - return the transport the document was received on.
 int getTransportSize()
          Method getTransportSize
 DocumentType getType()
          Method getType
 java.lang.String getUniqueId()
          Method getUniqueId
 java.util.Properties getUserData()
          Get the additional user defined data.
 void setContent(java.lang.String path)
          Method setContent
 void setControlId(java.lang.String aControlId)
          Method setControlId
 void setCorrelationId(java.lang.String id)
          setCorrelationId
 void setDirectory(java.lang.String aDirectory)
          Method setDirectory
 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 setEncrypted(boolean isEncrypted)
          Set if the document is encrypted
 void setFileExt(java.lang.String fileExt)
           
 void setFingerprint(java.lang.String aFingerprint)
          Method setFingerprint
 void setInterchangeHttpsURL(InterchangeURL url)
          setInterchangeHttpsURL - Sets URL to use when communicating with Interchange.
 void setInterchangeURL(InterchangeURL url)
          Method setInterchangeURL
 void setName(java.lang.String aName)
          Method setName
 void setOriginalName(java.lang.String anOriginalName)
          Method setOriginalName
 void setOriginalSize(int anOriginalSize)
          Method setOriginalSize
 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 aPath)
          Method setPath
 void setPersistedName(java.lang.String persistedName)
          Sets the name of the document as stored on disk (Inbound Transport).
 void setReceiverId(CompanyId id)
          Method setReceiverId
 void setReceiverId(java.lang.String id)
          Method setReceiverId will set the ediID property of the Receiver CompanyID
 void setReceiverName(java.lang.String name)
          Method setReceiverName
 void setReference(int aReferenceNumber, java.lang.String aReference)
          Method setReference
 void setRefToMessageId(java.lang.String id)
          setRefToMessageId
 void setSecurityLevel(int securityLevel)
          Method setSecurityLevel
 void setSenderId(CompanyId id)
          Method setSenderId
 void setSenderId(java.lang.String id)
          Method setSenderId will set the ediID property of the Sender CompanyID
 void setSenderName(java.lang.String name)
          Method setSenderName same as calling the setName method
 void setSequenceId(int id)
          Method setSequenceId
 void setSigned(boolean isSigned)
          Set if the document is signed or not
 void setSubtype(java.lang.String subtype)
          Method setSubtype
 void setTransport(java.lang.String transport)
          Method setTransport
 void setTransportSize(int aSize)
          Method setTransportSize
 void setType(DocumentType type)
          Method setType
 void setType(java.lang.String type)
          Method setType
 void setUniqueId(java.lang.String aUniqueId)
          Method setUniqueId
 void setUserData(java.util.Properties userProperties)
          Sets additional user defined data that may be used by the packager when constructing the packaged document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDocument

public DefaultDocument()
Method Detail

getSenderId

public CompanyId getSenderId()
Method getSenderId
Specified by:
getSenderId in interface IntegrationDocument
Returns:
 

setSenderId

public void setSenderId(CompanyId id)
Method setSenderId
Specified by:
setSenderId in interface IntegrationDocument
Parameters:
id -  

setSenderId

public void setSenderId(java.lang.String id)
Method setSenderId will set the ediID property of the Sender CompanyID
Parameters:
id -  
See Also:
com.cyclonecommerce.cybervan.api.CompanyId.setEDIId

setSenderName

public void setSenderName(java.lang.String name)
Method setSenderName same as calling the setName method
Parameters:
name -  
See Also:
com.cyclonecommerce.cybervan.api.DefaultDocument.setName

getReceiverId

public CompanyId getReceiverId()
Method getReceiverId
Specified by:
getReceiverId in interface IntegrationDocument
Returns:
 

setReceiverId

public void setReceiverId(CompanyId id)
Method setReceiverId
Specified by:
setReceiverId in interface IntegrationDocument
Parameters:
id -  

setReceiverId

public void setReceiverId(java.lang.String id)
Method setReceiverId will set the ediID property of the Receiver CompanyID
Parameters:
id -  
See Also:
com.cyclonecommerce.cybervan.api.CompanyId.setEDIId

setReceiverName

public void setReceiverName(java.lang.String name)
Method setReceiverName
Parameters:
name -  

getControlId

public java.lang.String getControlId()
Method getControlId
Specified by:
getControlId in interface IntegrationDocument
Returns:
 

setControlId

public void setControlId(java.lang.String aControlId)
Method setControlId
Parameters:
aControlId -  

getUniqueId

public java.lang.String getUniqueId()
Method getUniqueId
Specified by:
getUniqueId in interface IntegrationDocument
Returns:
 

setUniqueId

public void setUniqueId(java.lang.String aUniqueId)
Method setUniqueId
Specified by:
setUniqueId in interface IntegrationDocument
Parameters:
aUniqueId -  

setCorrelationId

public void setCorrelationId(java.lang.String id)
setCorrelationId
Specified by:
setCorrelationId in interface IntegrationDocument
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.

getCorrelationId

public java.lang.String getCorrelationId()
getCorrelationId
Specified by:
getCorrelationId in interface IntegrationDocument
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.

getRefToMessageId

public java.lang.String getRefToMessageId()
getRefToMessageId
Specified by:
getRefToMessageId in interface IntegrationDocument
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)
setRefToMessageId
Specified by:
setRefToMessageId in interface IntegrationDocument
Parameters:
id - The document RefToMessageId. This id can be generated by

getType

public DocumentType getType()
Method getType
Specified by:
getType in interface IntegrationDocument
Returns:
 

setSubtype

public void setSubtype(java.lang.String subtype)
Method setSubtype
Parameters:
subtype -  

setType

public void setType(DocumentType type)
Method setType
Parameters:
type -  

setType

public void setType(java.lang.String type)
Method setType
Parameters:
type -  

setFileExt

public void setFileExt(java.lang.String fileExt)
Parameters:
fileExt -  

getPath

public java.lang.String getPath()
Method getPath
Specified by:
getPath in interface IntegrationDocument
Returns:
 

setPath

public void setPath(java.lang.String aPath)
Method setPath
Specified by:
setPath in interface IntegrationDocument
Parameters:
aPath -  

getDirectory

public java.lang.String getDirectory()
Method getDirectory
Returns:
 

setDirectory

public void setDirectory(java.lang.String aDirectory)
Method setDirectory
Parameters:
aDirectory -  

getName

public java.lang.String getName()
Method getName
Specified by:
getName in interface IntegrationDocument
Returns:
 

setName

public void setName(java.lang.String aName)
Method setName
Parameters:
aName -  

getOriginalName

public java.lang.String getOriginalName()
Method getOriginalName
Specified by:
getOriginalName in interface IntegrationDocument
Returns:
 

setOriginalName

public void setOriginalName(java.lang.String anOriginalName)
Method setOriginalName
Parameters:
anOriginalName -  

getTransportSize

public int getTransportSize()
Method getTransportSize
Specified by:
getTransportSize in interface IntegrationDocument
Returns:
 

setTransportSize

public void setTransportSize(int aSize)
Method setTransportSize
Parameters:
aSize -  

getOriginalSize

public int getOriginalSize()
Method getOriginalSize
Specified by:
getOriginalSize in interface IntegrationDocument
Returns:
 

setOriginalSize

public void setOriginalSize(int anOriginalSize)
Method setOriginalSize
Parameters:
anOriginalSize -  

getReference

public java.lang.String getReference(int aReferenceNumber)
Method getReference
Specified by:
getReference in interface IntegrationDocument
Parameters:
aReferenceNumber -  
Returns:
 

setReference

public void setReference(int aReferenceNumber,
                         java.lang.String aReference)
Method setReference
Specified by:
setReference in interface IntegrationDocument
Parameters:
aReferenceNumber -  
aReference -  

getSecurityLevel

public SecurityLevel getSecurityLevel()
Method getSecurityLevel
Specified by:
getSecurityLevel in interface IntegrationDocument
Returns:
 

setSecurityLevel

public void setSecurityLevel(int securityLevel)
Method setSecurityLevel
Parameters:
securityLevel -  

addSecurityLevel

public void addSecurityLevel(int securityLevel)
Method addSecurityLevel
Parameters:
securityLevel -  

getFingerprint

public java.lang.String getFingerprint()
Method getFingerprint
Specified by:
getFingerprint in interface IntegrationDocument
Returns:
 

setFingerprint

public void setFingerprint(java.lang.String aFingerprint)
Method setFingerprint
Parameters:
aFingerprint -  

getMaxReferences

public int getMaxReferences()
Method getMaxReferences
Specified by:
getMaxReferences in interface IntegrationDocument
Returns:
 

getInterchangeURL

public InterchangeURL getInterchangeURL()
Method getInterchangeURL
Specified by:
getInterchangeURL in interface IntegrationDocument
Returns:
 

setInterchangeURL

public void setInterchangeURL(InterchangeURL url)
Method setInterchangeURL
Specified by:
setInterchangeURL in interface IntegrationDocument
Parameters:
url -  

getInterchangeHttpsURL

public InterchangeURL getInterchangeHttpsURL()
getInterchangeHttpsURL For use by remote clients only
Specified by:
getInterchangeHttpsURL in interface IntegrationDocument
Returns:
Returns the HTTPS URL to use to retreive the raw document content. Returns null if not available

setInterchangeHttpsURL

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

setContent

public void setContent(java.lang.String path)
Method setContent
Specified by:
setContent in interface IntegrationDocument
Parameters:
path -  

setTransport

public void setTransport(java.lang.String transport)
Method setTransport
Parameters:
transport -  

getTransport

public java.lang.String getTransport()
Method getTransport - return the transport the document was received on.
Specified by:
getTransport in interface IntegrationDocument
Returns:
transport

setPersistedName

public void setPersistedName(java.lang.String persistedName)
Sets the name of the document as stored on disk (Inbound Transport).
Parameters:
persistedName - java.lang.String

getPersistedName

public java.lang.String getPersistedName()
Return the name as stored on disk (Inbound Transport). If document sequencing is false, will always return original name.
Specified by:
getPersistedName in interface IntegrationDocument
Returns:
java.lang.String

setSequenceId

public void setSequenceId(int id)
Method setSequenceId
Parameters:
id - int

getSequenceId

public int getSequenceId()
Method getSequenceId
Specified by:
getSequenceId in interface IntegrationDocument
Returns:
int

setEncrypted

public void setEncrypted(boolean isEncrypted)
Set if the document is encrypted
Parameters:
isEncrypted - a boolean

setSigned

public void setSigned(boolean isSigned)
Set if the document is signed or not
Parameters:
isSigned - a boolean

getEbXmlService

public java.lang.String getEbXmlService()
Return the ebXmlService if the document was transfered using ebXml
Specified by:
getEbXmlService in interface IntegrationDocument

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.
Specified by:
setEbXmlService in interface IntegrationDocument

getEbXmlAction

public java.lang.String getEbXmlAction()
Return the ebXmlAction of the document was transfered using ebXml
Specified by:
getEbXmlAction in interface IntegrationDocument

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.
Specified by:
setEbXmlAction in interface IntegrationDocument

getPackagingType

public java.lang.String getPackagingType()
Get the packaging type (AKA: BusinessProtocol) to used transfering sending a document.
Specified by:
getPackagingType in interface IntegrationDocument
Returns:
String

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.
Specified by:
setPackagingType in interface IntegrationDocument
Parameters:
packagingType - The packaging type

getPackagingVersion

public java.lang.String getPackagingVersion()
Get the packaging version (AKA: BusinessProtocol) used when transfering a document.
Specified by:
getPackagingVersion in interface IntegrationDocument
Returns:
String

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.
Specified by:
setPackagingVersion in interface IntegrationDocument
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.
Specified by:
setUserData in interface IntegrationDocument
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.
Specified by:
getUserData in interface IntegrationDocument
Returns:
Additional user data transfered within the headers of a inbound document.