com.ibm.cics.server
Class Document

java.lang.Object
  extended by com.ibm.cics.server.Document

public class Document
extends java.lang.Object

Usage:
This Class provides the Java implementation of the CICS DOCUMENT API. This consists of the following CICS DOCUMENT API commands:

The constructor and methods within this class perform the following functions:

Version:
02/12/015
Author:
Ian Shore/Adrian Bull

Field Summary
static int NOTSET
          Consatnt - NOTSET
 
Constructor Summary
Document()
          Usage:
Public default constructor which will create a empty (default) Document object which can have relevant DOCUMENT calls performed on it by relevant methods from this class.
 
Method Summary
 void addSymbol(java.lang.String symbol, java.lang.String value)
          Usage:
Add a symbol and it's value to the symbol table associated with the Document object.
 void appendBinary(byte[] binary)
          Usage:
Append a Java byte array to the Document object.
 void appendBookmark(java.lang.String bookmark)
          Usage:
Append a bookmark to the Document object.
 void appendCRLF()
          Usage:
Append EBCDIC CRLF to the Document object.
 void appendDocument(Document doc)
          Usage:
Append another Document object to the Document object.
 void appendFromDocRetrieve(byte[] from)
          Usage:
Append a retrieved document to the Document object.
 void appendFromTemplate(java.lang.String from)
          Usage:
Append a template to the Document object.
 void appendLine(java.lang.String text, java.lang.String hostCodePage)
          Usage:
Append a line of text to the Document object, including a terminating CRLF.
 void appendSymbol(java.lang.String symbol)
          Usage:
Append the data associated with the symbol in the symbol table to the Document object.
 void appendSymbol(java.lang.String symbol, java.lang.String hostCodePage)
          Usage:
Append the data associated with the symbol in the symbol table to the Document object.
 void appendTemplate(java.lang.String template)
          Usage:
Append the template specified by the document template definition to the Document object.
 void appendTemplate(java.lang.String template, java.lang.String hostCodePage)
          Usage:
Append the template specified by the document template definition to the Document object.
 void appendText(java.lang.String text)
          Usage:
Append text to the Document object.
 void appendText(java.lang.String text, java.lang.String hostCodePage)
          Usage:
Append text to the Document object.
 void createBinary(byte[] binary)
          Usage:
Add a Java byte array to the empty Document object.
 void createFromDoc(Document fromDoc)
          Usage:
Add another Document object to the empty Document object.
 void createFromDocRetrieve(byte[] from)
          Usage:
Add a retrieved document to the empty Document object.
 void createFromTemplate(java.lang.String from)
          Usage:
Add a template to the empty Document object.
 void createTemplate(java.lang.String template)
          Usage:
Add the template specified by the document template definition to the empty Document object.
 void createTemplate(java.lang.String template, java.lang.String hostCodePage)
          Usage:
Add the template specified by the document template definition to the empty Document object.
 void createText(java.lang.String text)
          Usage:
Add text to the empty Document object.
 void createText(java.lang.String text, java.lang.String hostCodePage)
          Usage:
Add text to the empty Document object.
 void delete()
          Usage:
Delete the Document.
 int getDocSize()
          Usage:
Returns the size of the document associated with the Document object.
 byte[] getDocToken()
          Usage:
Returns the document token associated with the Document object.
 void insertBinary(byte[] binary, DocumentLocation locn)
          Usage:
Insert a Java byte array into the Document object.
 void insertBookmark(java.lang.String bookmark, DocumentLocation locn)
          Usage:
Insert a bookmark into the Document object.
 void insertDocument(Document doc, DocumentLocation locn)
          Usage:
Insert a Document object into the Document object.
 void insertFromDocRetrieve(byte[] from, DocumentLocation locn)
          Usage:
Insert a retrieved document into the Document object.
 void insertFromTemplate(java.lang.String from, DocumentLocation locn)
          Usage:
Insert a template into the Document object.
 void insertSymbol(java.lang.String symbol, DocumentLocation locn)
          Usage:
Insert the data associated with the symbol in the symbol table into the Document object.
 void insertSymbol(java.lang.String symbol, java.lang.String hostCodePage, DocumentLocation locn)
          Usage:
Insert the data associated with the symbol in the symbol table into the Document object.
 void insertTemplate(java.lang.String template, DocumentLocation locn)
          Usage:
Insert the template specified by the document template definition into the Document object.
 void insertTemplate(java.lang.String template, java.lang.String hostCodePage, DocumentLocation locn)
          Usage:
Insert the template specified by the document template definition into the Document object.
 void insertText(java.lang.String text, DocumentLocation locn)
          Usage:
Insert text into the Document object.
 void insertText(java.lang.String text, java.lang.String hostCodePage, DocumentLocation locn)
          Usage:
Insert text into the Document object.
 byte[] retrieve()
          Usage:
Return a copy of the Document object in a Java byte array.
 byte[] retrieve(java.lang.String characterset)
          Usage:
Return a copy of the Document object in a Java byte array.
 byte[] retrieve(java.lang.String characterset, boolean dataOnly)
          Usage:
Return a copy of the Document object in a Java byte array.
 void setSymbolList(SymbolList symbolList)
          Usage:
Add a symbol list to the symbol table associated with the Document object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTSET

public static final int NOTSET
Consatnt - NOTSET

See Also:
Constant Field Values
Constructor Detail

Document

public Document()
         throws InvalidRequestException
Usage:
Public default constructor which will create a empty (default) Document object which can have relevant DOCUMENT calls performed on it by relevant methods from this class. This is equivalent to CICS command DOCUMENT CREATE.

Throws:
InvalidRequestException - an INVREQ condition occurred
Method Detail

createFromDocRetrieve

public void createFromDocRetrieve(byte[] from)
                           throws DuplicateRecordException,
                                  InvalidRequestException,
                                  NotAuthorisedException,
                                  RecordNotFoundException,
                                  TemplateErrorException
Usage:
Add a retrieved document to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE FROM.

No checks to ensure that the Document object is empty are made by this method, in fact method appendFromDocRetrieve() can be used instead of this method.

Parameters:
from - is a document that was previously created and retrieved that is to be added
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createFromTemplate

public void createFromTemplate(java.lang.String from)
                        throws DuplicateRecordException,
                               InvalidRequestException,
                               NotAuthorisedException,
                               RecordNotFoundException,
                               TemplateErrorException
Usage:
Add a template to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE FROM.

No checks to ensure that the Document object is empty are made by this method, in fact method appendFromTemplate() can be used instead of this method.

Parameters:
from - contains the template to be added
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createText

public void createText(java.lang.String text)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Add text to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE TEXT.

No checks to ensure that the Document object is empty are made by this method, in fact method appendText() can be used instead of this method.

Parameters:
text - contains the text to be added
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createText

public void createText(java.lang.String text,
                       java.lang.String hostCodePage)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Add text to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE FROM TEXT HOSTCODEPAGE.

No checks to ensure that the Document object is empty are made by this method, in fact method appendText() can be used instead of this method.

Parameters:
text - contains the text to be added
hostCodePage - is the host code page that the data being added is encoded in
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createBinary

public void createBinary(byte[] binary)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Add a Java byte array to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE BINARY

No checks to ensure that the Document object is empty are made by this method, in fact method appendBinary() can be used instead of this method.

Parameters:
binary - contains the data to be added
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createFromDoc

public void createFromDoc(Document fromDoc)
                   throws DuplicateRecordException,
                          InvalidRequestException,
                          NotAuthorisedException,
                          RecordNotFoundException,
                          TemplateErrorException
Usage:
Add another Document object to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE FROMDOC.

No checks to ensure that the Document object is empty are made by this method, in fact method appendFromDoc() can be used instead of this method.

Parameters:
fromDoc - is the document object to be added
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createTemplate

public void createTemplate(java.lang.String template)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Add the template specified by the document template definition to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE FROM TEMPLATE.

No checks to ensure that the Document object is empty are made by this method, in fact method appendTemplate() can be used instead of this method.

Parameters:
template - is the name of the document template definition to be added
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

createTemplate

public void createTemplate(java.lang.String template,
                           java.lang.String hostCodePage)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Add the template specified by the document template definition to the empty Document object. Although CICS API command DOCUMENT INSERT is used to add the data, this can be thought of as equivalent to CICS API command DOCUMENT CREATE TEMPLATE HOSTCODEPAGE.

No checks to ensure that the Document object is empty are made by this method, in fact method appendTemplate() can be used instead of this method.

Parameters:
template - contains the document template definition name that is to be added
hostCodePage - is the host code page that the data being added is encoded in
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

getDocToken

public byte[] getDocToken()
                   throws RecordNotFoundException
Usage:
Returns the document token associated with the Document object.

Returns:
The document token
Throws:
RecordNotFoundException - a NOTFND condition occurred

getDocSize

public int getDocSize()
               throws RecordNotFoundException
Usage:
Returns the size of the document associated with the Document object. This is the maximum size of the buffer required to retrieve the document

Returns:
The document size
Throws:
RecordNotFoundException - a NOTFND condition occurred

appendFromDocRetrieve

public void appendFromDocRetrieve(byte[] from)
                           throws DuplicateRecordException,
                                  InvalidRequestException,
                                  NotAuthorisedException,
                                  RecordNotFoundException,
                                  TemplateErrorException
Usage:
Append a retrieved document to the Document object. This is equivalent to CICS command DOCUMENT INSERT FROM.

Parameters:
from - contains the retrieved document that is to be appended
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendFromTemplate

public void appendFromTemplate(java.lang.String from)
                        throws DuplicateRecordException,
                               InvalidRequestException,
                               NotAuthorisedException,
                               RecordNotFoundException,
                               TemplateErrorException
Usage:
Append a template to the Document object. This is equivalent to CICS command DOCUMENT INSERT FROM.

Parameters:
from - contains the template that is to be appended
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendBinary

public void appendBinary(byte[] binary)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Append a Java byte array to the Document object. This is equivalent to CICS command DOCUMENT INSERT BINARY.

Parameters:
binary - contains the data to be appended
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendText

public void appendText(java.lang.String text)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Append text to the Document object. This is equivalent to CICS command DOCUMENT INSERT TEXT.

Parameters:
text - contains the text to be appended
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendText

public void appendText(java.lang.String text,
                       java.lang.String hostCodePage)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Append text to the Document object. This is equivalent to CICS command DOCUMENT INSERT TEXT HOSTCODEPAGE.

Parameters:
text - contains the text to be appended
hostCodePage - is the host code page that the data being added is encoded in
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendLine

public void appendLine(java.lang.String text,
                       java.lang.String hostCodePage)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Append a line of text to the Document object, including a terminating CRLF. This is equivalent to CICS command DOCUMENT INSERT TEXT HOSTCODEPAGE.

Parameters:
text - contains the text to be appended
hostCodePage - is the host code page that the data being added is encoded in
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendCRLF

public void appendCRLF()
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Append EBCDIC CRLF to the Document object. This is equivalent to CICS command DOCUMENT INSERT TEXT where the text to be appended is X'0D25'.

Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendSymbol

public void appendSymbol(java.lang.String symbol)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Append the data associated with the symbol in the symbol table to the Document object. This is equivalent to CICS command DOCUMENT INSERT SYMBOL.

Parameters:
symbol - contains the name of the symbol
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendSymbol

public void appendSymbol(java.lang.String symbol,
                         java.lang.String hostCodePage)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Append the data associated with the symbol in the symbol table to the Document object. This is equivalent to CICS command DOCUMENT INSERT SYMBOL HOSTCODEPAGE.

Parameters:
symbol - contains the name of the symbol
hostCodePage - is the host code page that the data being added is encoded in
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendTemplate

public void appendTemplate(java.lang.String template)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Append the template specified by the document template definition to the Document object. This is equivalent to CICS command DOCUMENT INSERT TEMPLATE.

Parameters:
template - contains the document template definition name
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendTemplate

public void appendTemplate(java.lang.String template,
                           java.lang.String hostCodePage)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Append the template specified by the document template definition to the Document object. This is equivalent to CICS command DOCUMENT INSERT TEMPLATE.

Parameters:
template - contains the document template definition name
hostCodePage - is the host code page that the data being added is encoded in
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendDocument

public void appendDocument(Document doc)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Append another Document object to the Document object. This is equivalent to CICS command DOCUMENT INSERT FROMDOC.

Parameters:
doc - is the Document object to be appended
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

appendBookmark

public void appendBookmark(java.lang.String bookmark)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Append a bookmark to the Document object. This is equivalent to CICS command DOCUMENT INSERT BOOKMARK.

Parameters:
bookmark - contains the name of the bookmark to be appended
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertFromDocRetrieve

public void insertFromDocRetrieve(byte[] from,
                                  DocumentLocation locn)
                           throws DuplicateRecordException,
                                  InvalidRequestException,
                                  NotAuthorisedException,
                                  RecordNotFoundException,
                                  TemplateErrorException
Usage:
Insert a retrieved document into the Document object. This is equivalent to CICS command DOCUMENT INSERT FROMDOC AT or DOCUMENT INSERT FROMDOC AT TO.

Parameters:
from - contains the retrieved document to be inserted
locn - is a DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertFromTemplate

public void insertFromTemplate(java.lang.String from,
                               DocumentLocation locn)
                        throws DuplicateRecordException,
                               InvalidRequestException,
                               NotAuthorisedException,
                               RecordNotFoundException,
                               TemplateErrorException
Usage:
Insert a template into the Document object. This is equivalent to CICS command DOCUMENT INSERT FROM AT or DOCUMENT INSERT FROM AT TO.

Parameters:
from - contains the template to be inserted
locn - is a DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertBinary

public void insertBinary(byte[] binary,
                         DocumentLocation locn)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Insert a Java byte array into the Document object. This is equivalent to CICS command DOCUMENT INSERT BINARY AT or DOCUMENT INSERT BINARY AT TO.

Parameters:
binary - contains the data to be inserted
locn - is a DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertText

public void insertText(java.lang.String text,
                       DocumentLocation locn)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Insert text into the Document object. This is equivalent to CICS command DOCUMENT INSERT TEXT AT or DOCUMENT INSERT TEXT AT TO.

Parameters:
text - contains the text to be inserted
locn - is a DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertText

public void insertText(java.lang.String text,
                       java.lang.String hostCodePage,
                       DocumentLocation locn)
                throws DuplicateRecordException,
                       InvalidRequestException,
                       NotAuthorisedException,
                       RecordNotFoundException,
                       TemplateErrorException
Usage:
Insert text into the Document object. This is equivalent to CICS command DOCUMENT INSERT TEXT HOSTCODEPAGE AT or DOCUMENT INSERT TEXT HOSTCODEPAGE AT TO.

Parameters:
text - contains the text to be inserted
hostCodePage - is the host code page that the data being added is encoded in
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertSymbol

public void insertSymbol(java.lang.String symbol,
                         DocumentLocation locn)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Insert the data associated with the symbol in the symbol table into the Document object. This is equivalent to CICS command DOCUMENT INSERT SYMBOL AT or DOCUMENT INSERT SYMBOL AT TO.

Parameters:
symbol - contains the name of the symbol
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertSymbol

public void insertSymbol(java.lang.String symbol,
                         java.lang.String hostCodePage,
                         DocumentLocation locn)
                  throws DuplicateRecordException,
                         InvalidRequestException,
                         NotAuthorisedException,
                         RecordNotFoundException,
                         TemplateErrorException
Usage:
Insert the data associated with the symbol in the symbol table into the Document object. This is equivalent to CICS command DOCUMENT INSERT SYMBOL HOSTCODEPAGE AT or DOCUMENT INSERT SYMBOL HOSTCODEPAGE AT TO.

Parameters:
symbol - contains the name of the symbol
hostCodePage - is the host code page that the data being added is encoded in
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertTemplate

public void insertTemplate(java.lang.String template,
                           DocumentLocation locn)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Insert the template specified by the document template definition into the Document object. This is equivalent to CICS command DOCUMENT INSERT TEMPLATE AT or DOCUMENT INSERT TEMPLATE AT TO.

Parameters:
template - contains the document template definition name
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertTemplate

public void insertTemplate(java.lang.String template,
                           java.lang.String hostCodePage,
                           DocumentLocation locn)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Insert the template specified by the document template definition into the Document object. This is equivalent to CICS command DOCUMENT INSERT TEMPLATE HOSTCODEPAGE AT or DOCUMENT INSERT TEMPLATE HOSTCODEPAGE AT TO.

Parameters:
template - contains the document template definition name
hostCodePage - is the host code page that the data being added is encoded in
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertDocument

public void insertDocument(Document doc,
                           DocumentLocation locn)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Insert a Document object into the Document object. This is equivalent to CICS command DOCUMENT INSERT FROMDOC AT or DOCUMENT INSERT FROMDOC AT TO.

Parameters:
doc - is the Document object to be inserted
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

insertBookmark

public void insertBookmark(java.lang.String bookmark,
                           DocumentLocation locn)
                    throws DuplicateRecordException,
                           InvalidRequestException,
                           NotAuthorisedException,
                           RecordNotFoundException,
                           TemplateErrorException
Usage:
Insert a bookmark into the Document object. This is equivalent to CICS command DOCUMENT INSERT BOOKMARK AT.

Parameters:
bookmark - contains the name of the bookmark
locn - is the DocumentLocation object
Throws:
DuplicateRecordException - a DUPREC condition occurred
InvalidRequestException - a INVREQ condition occurred
NotAuthorisedException - a NOTAUTH condition occurred
RecordNotFoundException - a NOTFND condition occurred
TemplateErrorException - a TEMPLATERR condition occurred

retrieve

public byte[] retrieve()
                throws InvalidRequestException,
                       RecordNotFoundException
Usage:
Return a copy of the Document object in a Java byte array. This is equivalent to CICS command DOCUMENT RETRIVE.

Returns:
The retrieved document
Throws:
InvalidRequestException - a INVREQ condition occurred
RecordNotFoundException - a NOTFND condition occurred

retrieve

public byte[] retrieve(java.lang.String characterset)
                throws InvalidRequestException,
                       RecordNotFoundException
Usage:
Return a copy of the Document object in a Java byte array. This is equivalent to CICS command DOCUMENT RETRIEVE CHARACTERSET.

Parameters:
characterset - is the character-set code page to which the data should be converted
Returns:
The retrieved document
Throws:
InvalidRequestException - a INVREQ condition occurred
RecordNotFoundException - a NOTFND condition occurred

retrieve

public byte[] retrieve(java.lang.String characterset,
                       boolean dataOnly)
                throws InvalidRequestException,
                       RecordNotFoundException
Usage:
Return a copy of the Document object in a Java byte array. This is equivalent to CICS command DOCUMENT RETRIEVE CHARACTERSET or DOCUMENT RETRIEVE CHARACTERSET DATAONLY.

Parameters:
characterset - is the character-set code page to which the data should be converted
dataOnly - is a indicator specifying whether retrieved data is DATAONLY or not
Returns:
The retrieved document
Throws:
InvalidRequestException - a INVREQ condition occurred
RecordNotFoundException - a NOTFND condition occurred

addSymbol

public void addSymbol(java.lang.String symbol,
                      java.lang.String value)
               throws InvalidRequestException,
                      RecordNotFoundException,
                      SymbolErrorException,
                      LengthErrorException
Usage:
Add a symbol and it's value to the symbol table associated with the Document object. If the symbol already exists in the table, it is replaced by the new definition. This is equivalent to CICS command DOCUMENT SET SYMBOL VALUE.

Parameters:
symbol - contains the symbol name
value - contains the symbol value
Throws:
InvalidRequestException - a INVREQ condition occurred
RecordNotFoundException - a NOTFND condition occurred
SymbolErrorException - a SYMBOLERR condition occurred
LengthErrorException - a LENGERR condition occurred

setSymbolList

public void setSymbolList(SymbolList symbolList)
                   throws InvalidRequestException,
                          RecordNotFoundException,
                          SymbolErrorException,
                          LengthErrorException
Usage:
Add a symbol list to the symbol table associated with the Document object. If any symbols already exists in the table, they area replaced by the new definition. This is equivalent to CICS command DOCUMENT SET SYMBOLLIST

Parameters:
symbolList - is the SymbolList object to be added to the Document objects symbol table
Throws:
InvalidRequestException - a INVREQ condition occurred
RecordNotFoundException - a NOTFND condition occurred
SymbolErrorException - a SYMBOLERR condition occurred
LengthErrorException - a LENGERR condition occurred

delete

public void delete()
            throws RecordNotFoundException
Usage:
Delete the Document. This is equivalent to CICS API command DOCUMENT DELETE.

Throws:
RecordNotFoundException - a NOTFND condition occurred