|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ViewSupport
ViewSupport objects are used to control the format in which a document is retrieved from
the Web Services Server.
By default, when a DocumentInformation object is returned with data included, it is as a
report page in character HTML format.
To retrieve a document view in another format such as PDF,
the ViewSupport must be set explicitly.
Example: Retrieve a document's contents in binary PDF format
ViewSupport pdfViewSupport = ViewSupport.Factory.newInstance();
pdfViewSupport.setOutputFormat(OutputFormatType.PDF);
pdfViewSupport.setViewType(ViewType.BINARY);
pdfViewSupport.setViewMode(ViewModeType.DOCUMENT);
RetrieveBinaryView retBinView = RetrieveBinaryView.Factory.newInstance();
retBinView.setViewSupport(pdfViewSupport);
RetrieveData retBOData = RetrieveData.Factory.newInstance();
retBOData.setRetrieveView(retBinView);
DocumentInformation docInfo = boRepEng.getDocumentInformation(strDocid,null,null,null,retBOData);
BinaryView myBinView = (BinaryView) docInfo.getView();
OutputStream outputStream = response.getOutputStream();
response.setContentType("application/pdf");
response.setHeader("Content-Type","application/pdf");
response.setDateHeader("expires", 0);
byte[] abyBinaryContent = myBinView.getContent();
//output the binary stream via the response object
outputStream.write(abyBinaryContent);
Note: When using a ViewSupport object, OutputFormatType, ViewType and ViewMode
have to be set to ensure the document is retrieved correctly.
ReportEngine,
BinaryView,
CharacterView,
XMLView,
ViewModeType,
RetrieveData,
RetrieveView,
OutputFormatType,
DocumentInformation| Nested Class Summary | |
|---|---|
static class |
ViewSupport.Factory
A class with methods for creating instances of the ViewSupport type. |
| Field Summary | |
|---|---|
static org.apache.xmlbeans.SchemaType |
type
Internal Use Only. |
| Method Summary | |
|---|---|
OutputFormatType.Enum |
getOutputFormat()
Returns the OutputFormatType assigned to this object. |
ViewModeType.Enum |
getViewMode()
Returns the ViewModeType assigned to this object. |
ViewType.Enum |
getViewType()
Returns the ViewType assigned to this object. |
void |
setOutputFormat(OutputFormatType.Enum outputFormat)
Sets the OutputFormatType of the document to be retrieved from the server. |
void |
setViewMode(ViewModeType.Enum viewMode)
Sets the ViewModeType of the document to be retrieved from the server. |
void |
setViewType(ViewType.Enum viewType)
Sets the ViewType of the document to be retrieved from the server. |
OutputFormatType |
xgetOutputFormat()
Internal Use Only. |
ViewModeType |
xgetViewMode()
Internal Use Only. |
ViewType |
xgetViewType()
Internal Use Only. |
void |
xsetOutputFormat(OutputFormatType outputFormat)
Internal Use Only. |
void |
xsetViewMode(ViewModeType viewMode)
Internal Use Only. |
void |
xsetViewType(ViewType viewType)
Internal Use Only. |
| Field Detail |
|---|
static final org.apache.xmlbeans.SchemaType type
Internal Use Only.
| Method Detail |
|---|
ViewModeType.Enum getViewMode()
ViewModeType for a
list of possible document view modes.
Note: The following table shows the relationship between ViewModeType and OutputFormatType.
Crystal documents
| BINARY_CONTENT | EXCEL | RTF | XML | HTML | ||
| DOCUMENT | Y | Y | Y | Y |   |   |
| REPORT |   |   |   |   |   |   |
| REPORT_PAGE |   | Y | Y | Y |   | Y |
| ALL_DATA_PROVIDERS |   |   |   |   |   |   |
Web Intelligence documents
| BINARY_CONTENT | EXCEL | RTF | XML | HTML | ||
| DOCUMENT |   | Y | Y |   |   |   |
| REPORT |   | Y | Y |   | Y | Y |
| REPORT_PAGE |   | Y | Y |   | Y | Y |
| REPORT_PART |   | Y | Y |   | Y |   |
| ALL_DATA_PROVIDERS |   |   |   |   | Y |   |
| QUICK_REPORT_PAGE |   | Y | Y |   | Y | Y |
ViewModeTypeViewModeType xgetViewMode()
Internal Use Only.
void setViewMode(ViewModeType.Enum viewMode)
ViewModeType for a
list of possible types.
here.
viewMode - The ViewModeType to be assigned to the document.ViewModeType,
ReportEngine.getDocumentInformation(String documentReference, RetrieveMustFillInfo retrieveMustFillInfo, Action[] actions, Navigate navigate, RetrieveData retrieveData)void xsetViewMode(ViewModeType viewMode)
Internal Use Only.
OutputFormatType.Enum getOutputFormat()
OutputFormatType for a
list of possible document output formats.
OutputFormatTypeOutputFormatType xgetOutputFormat()
Internal Use Only.
void setOutputFormat(OutputFormatType.Enum outputFormat)
OutputFormatType for a
list of possible document output formats.
here.
outputFormat - The output format to be assigned to the documentOutputFormatTypevoid xsetOutputFormat(OutputFormatType outputFormat)
Internal Use Only.
ViewType.Enum getViewType()
ViewType for a
list of possible document view types.
Note: The following table shows the relationship between ViewType and OutputFormatType.
| BINARY_CONTENT | EXCEL | RTF | XML | HTML | ||
| CHARACTER |   |   |   |   | Y | Y |
| XML |   |   |   |   | Y |   |
| BINARY | Y | Y | Y | Y |   |   |
ViewTypeViewType xgetViewType()
Internal Use Only.
void setViewType(ViewType.Enum viewType)
ViewType for a
list of possible document view types.
here.
viewType - the view type to be assigned to this objectvoid xsetViewType(ViewType viewType)
Internal Use Only.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||