package examples.xml.biztalk;
/**
 * Interface describing a Biztalk document that is intended as a response to 
 * a received document. 
 *
 * @author Copyright (c) 2000 by BEA Systems, Inc. All Rights Reserved.
 */

public interface OutgoingMessage {
  

  /**
   * returns namespace designation
   *
   * @return namespace of this document
   */
  public String getNameSpace();

  /**
   * returns the return address for this doc
   *
   * @return senders address
   */
  public String getFromAddress();

  /**
   * returns senders reference ID
   *
   * @return senders reference ID
   */
  public String getFromReferenceID();

  /**
   * returns sender's process value
   *
   * @return sender's process value
   */
  public String getFromProcess();

  /**
   * returns senders handle
   *
   * @return senders handle
   */
  public String getFromHandle();

  /**
   * returns recipient's address
   *
   * @return recipient's address
   */
  public String getToAddress();

  /**
   * returns recipient's reference ID
   *
   * @return recipient's reference ID
   */
  public String getToReferenceID();

  /**
   * returns recipient's process
   *
   * @return recipient's process
   */
  public String getToProcess();

  /**
   * returns recipient's handle
   *
   * @return recipient's handle
   */
  public String getToHandle();

  /**
   * returns XML doc of the payload
   *
   * @return XML doc of the payload
   */
  public String getBodyAsXML();

  /**
   * returns Document name
   *
   * @return Document name
   */
  public String getDocName();

  /**
   * returns a description of the document
   *
   * @return a description of the document
   */
  public String getDocDesc();

  /**
   * returns document's message ID
   *
   * @return document's message ID
   */
  public String getMsgID();
     
  /**
   * returns text description of document
   *
   * @return text description of document
   */
  public String getMsgSubject();

  /**
   * returns time message created/sent
   *
   * @return time message created/sent
   */
  public String getTimeStamp() ;
  /**
   * Sets the document type for this document.
   *
   * @param type The name to be used as a document type.
   */
  public void setType(String type);  

  /**
   * Sets the name space associated with the payload. The name space
   * identifies the schema associated with the payload (body) of the
   * document.
   *
   * @param space Envelope name space.
   */
  public void setNameSpace();

  /**
   * Sets address of sender. The address is a Universal Resource Identifier 
   * (URI) describing the logical address of the sending or receiving system.  
   * It is resolved to a transport-specific system address by the BizTalk 
   * server.  This transport-specific address is transparent to the applications.  
   *
   * @param id URI of sender.
   */
  public void setFromAddress(String id);
  /**
   * Sets the reference ID of sender.   A reference ID is a unique identifier 
   * or cookie used to reference which interchange this document is 
   * associated with.  The reference ID for the document interchange 
   * would typically be unique for an instance of a particular business process.
   *
   * @param id Sender reference ID.
   */
  public void setFromReferenceID(String id);
  /**
   * Sets state info set for the sender. Process may be used to again 
   * refine the state of the interchange, by identifying the user account, 
   * process, or security context where the document originated, or is intended 
   * to be sent.  This is a further refinement of the <I>handle</I>.
   *
   * @param process Process value.
   */
  public void setFromProcess(String process);
  /**
   * Sets state info set for the sender. Handle provides additional 
   * handling or processing information that may be required by the 
   * application.  An example would be the handle for a functional 
   * module or step within a business process.  The handle is used as 
   * a further refinement of the reference ID.
   *
   * @param handle Handle value.
   */
  public void setFromHandle(String handle);

  /**
   * Sets address of receiver. The address is a Universal Resource 
   * Identifier (URI) describing the logical address of the sending or 
   * receiving system.  It is resolved to a transport-specific system 
   * address by the BizTalk server.  This transport-specific address is 
   * transparent to the applications.  
   *
   * @param path URI of message recipient.
   */
  public void setToAddress(String path);
  /**
   * Sets the reference ID for the recipient.   A reference ID is a unique 
   * identifier or cookie used to reference which interchange this document 
   * is associated with.  The reference ID for the document interchange would 
   * typically be unique for an instance of a particular business process.
   *
   * @param id Recipient reference ID.
   */
  public void setToReferenceID(String id);
  /**
   * Sets state info for the recipient. Process may be used to again 
   * refine the state of the interchange, by identifying the user account, 
   * process, or security context where the document originated, or is 
   * intended to be sent.  This is a further refinement of the <I>handle</I>.
   *
   * @param process Process value.
   */
  public void setToProcess(String process);
  /**
   * Sets state info set for the recipient. Handle provides additional 
   * handling or processing information that may be required by the 
   * application.  An example would be the handle for a functional module 
   * or step within a business process.  The handle is used as a further 
   * refinement of the reference ID.
   *
   * @param handle Handle value.
   */
  public void setToHandle(String handle);

  
  /**
   * Provides an XML documwent fragment representing the document body of
   * the response.
   *
   * @param body XML fragment for document body.
   */
  public void setBodyAsXML(String body);

  /**
   * returns Biztalk XML string representation of this object
   *
   * @return XML string
   */
  public String toString();  

  /**
   * convert object to XML fragment to use as document body
   *
   * @param obj Object to convert to XML
   */
  public void setBodyAsObject(Object obj);  

  /**
   * Sets the message subject for the document.
   * 
   * @param subject description of the message
   */
  public void setMsgSubject(String subject);  
  /**
   * Sets the document name.
   * 
   * @param doc a descriptive name for the document.
   */
  public void setDocName(String doc);  
  /**
   * Provides a descripion of the document
   * 
   * @param desc a descriptive statement about the payload.
   */
  public void setDocDesc(String desc);  
  /**
   * Sets the message ID for the message.  It may be used for logging, 
   * tracking, error handling, or other message processing/reprocessing 
   * requirements.  Generation of the message numbers or GUIDs is 
   * customer or implementation specific at this time.  This value may 
   * be generated either by the business application/adapter, or by the 
   * BizTalk server transmitting the message
   * 
   * @param msgid a message identifier.
   */
  public void setMsgID(String msgid);  
  /**
   * Sets the sending timestamp of the message to the time of the method call.
   * This is formatted according to ISO 8601 format.  
   * 
   * @param time ISO 8601 time stamp value
   */
  public void setTimeStamp();  
}
