public class Document extends API
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:
com.ibm.cics.server.API
for general restrictions on using the JCICS API.
Modifier and Type | Field and Description |
---|---|
static int |
NOTSET
Constant - NOTSET
|
Constructor and Description |
---|
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. |
Document(byte[] docToken)
Usage:
Constructor which accepts a document token as input, to allow access to an existing document. |
Modifier and Type | Method and Description |
---|---|
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. |
public static final int NOTSET
public Document() throws InvalidRequestException
InvalidRequestException
- an INVREQ condition occurredpublic Document(byte[] docToken)
docToken
- the token of the document to be operated on.public void createFromDocRetrieve(byte[] from) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
from
- is a document that was previously created and retrieved that is
to be addedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createFromTemplate(java.lang.String from) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
from
- contains the template to be addedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createText(java.lang.String text) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
text
- contains the text to be addedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createText(java.lang.String text, java.lang.String hostCodePage) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
text
- contains the text to be addedhostCodePage
- is the host code page that the data being added is encoded inDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createBinary(byte[] binary) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
binary
- contains the data to be addedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createFromDoc(Document fromDoc) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
fromDoc
- is the document object to be addedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createTemplate(java.lang.String template) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
template
- is the name of the document template definition to be addedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void createTemplate(java.lang.String template, java.lang.String hostCodePage) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
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.
template
- contains the document template definition name that is to be
addedhostCodePage
- is the host code page that the data being added is encoded inDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic byte[] getDocToken() throws RecordNotFoundException
RecordNotFoundException
- a NOTFND condition occurredpublic int getDocSize() throws RecordNotFoundException
RecordNotFoundException
- a NOTFND condition occurredpublic void appendFromDocRetrieve(byte[] from) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
from
- contains the retrieved document that is to be appendedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendFromTemplate(java.lang.String from) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
from
- contains the template that is to be appendedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendBinary(byte[] binary) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
binary
- contains the data to be appendedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendText(java.lang.String text) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
text
- contains the text to be appendedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendText(java.lang.String text, java.lang.String hostCodePage) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
text
- contains the text to be appendedhostCodePage
- is the host code page that the data being added is encoded inDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendLine(java.lang.String text, java.lang.String hostCodePage) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
text
- contains the text to be appendedhostCodePage
- is the host code page that the data being added is encoded inDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendCRLF() throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
DuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendSymbol(java.lang.String symbol) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
symbol
- contains the name of the symbolDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendSymbol(java.lang.String symbol, java.lang.String hostCodePage) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
symbol
- contains the name of the symbolhostCodePage
- is the host code page that the data being added is encoded inDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendTemplate(java.lang.String template) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
template
- contains the document template definition nameDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendTemplate(java.lang.String template, java.lang.String hostCodePage) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
template
- contains the document template definition namehostCodePage
- is the host code page that the data being added is encoded inDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendDocument(Document doc) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
doc
- is the Document object to be appendedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void appendBookmark(java.lang.String bookmark) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
bookmark
- contains the name of the bookmark to be appendedDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertFromDocRetrieve(byte[] from, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
from
- contains the retrieved document to be insertedlocn
- is a DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertFromTemplate(java.lang.String from, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
from
- contains the template to be insertedlocn
- is a DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertBinary(byte[] binary, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
binary
- contains the data to be insertedlocn
- is a DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertText(java.lang.String text, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
text
- contains the text to be insertedlocn
- is a DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertText(java.lang.String text, java.lang.String hostCodePage, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
text
- contains the text to be insertedhostCodePage
- is the host code page that the data being added is encoded inlocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertSymbol(java.lang.String symbol, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
symbol
- contains the name of the symbollocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertSymbol(java.lang.String symbol, java.lang.String hostCodePage, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
symbol
- contains the name of the symbolhostCodePage
- is the host code page that the data being added is encoded inlocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertTemplate(java.lang.String template, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
template
- contains the document template definition namelocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertTemplate(java.lang.String template, java.lang.String hostCodePage, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
template
- contains the document template definition namehostCodePage
- is the host code page that the data being added is encoded inlocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertDocument(Document doc, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
doc
- is the Document object to be insertedlocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic void insertBookmark(java.lang.String bookmark, DocumentLocation locn) throws DuplicateRecordException, InvalidRequestException, NotAuthorisedException, RecordNotFoundException, TemplateErrorException
bookmark
- contains the name of the bookmarklocn
- is the DocumentLocation objectDuplicateRecordException
- a DUPREC condition occurredInvalidRequestException
- a INVREQ condition occurredNotAuthorisedException
- a NOTAUTH condition occurredRecordNotFoundException
- a NOTFND condition occurredTemplateErrorException
- a TEMPLATERR condition occurredpublic byte[] retrieve() throws InvalidRequestException, RecordNotFoundException
InvalidRequestException
- a INVREQ condition occurredRecordNotFoundException
- a NOTFND condition occurredpublic byte[] retrieve(java.lang.String characterset) throws InvalidRequestException, RecordNotFoundException
characterset
- is the character-set code page to which the data should be convertedInvalidRequestException
- a INVREQ condition occurredRecordNotFoundException
- a NOTFND condition occurredpublic byte[] retrieve(java.lang.String characterset, boolean dataOnly) throws InvalidRequestException, RecordNotFoundException
characterset
- is the character-set code page to which the data should be converteddataOnly
- is a indicator specifying whether retrieved data is DATAONLY
or notInvalidRequestException
- a INVREQ condition occurredRecordNotFoundException
- a NOTFND condition occurredpublic void addSymbol(java.lang.String symbol, java.lang.String value) throws InvalidRequestException, RecordNotFoundException, SymbolErrorException, LengthErrorException
symbol
- contains the symbol namevalue
- contains the symbol valueInvalidRequestException
- a INVREQ condition occurredRecordNotFoundException
- a NOTFND condition occurredSymbolErrorException
- a SYMBOLERR condition occurredLengthErrorException
- a LENGERR condition occurredpublic void setSymbolList(SymbolList symbolList) throws InvalidRequestException, RecordNotFoundException, SymbolErrorException, LengthErrorException
symbolList
- is the SymbolList object to be added to the Document objects
symbol tableInvalidRequestException
- a INVREQ condition occurredRecordNotFoundException
- a NOTFND condition occurredSymbolErrorException
- a SYMBOLERR condition occurredLengthErrorException
- a LENGERR condition occurredpublic void delete() throws RecordNotFoundException
RecordNotFoundException
- a NOTFND condition occurred