com.businessobjects.dsws.reportengine
Interface RetrieveView

All Known Subinterfaces:
RetrieveBinaryView, RetrieveCharacterView, RetrieveXMLView

public interface RetrieveView

RetrieveView is used to set the format in which a document is retrieved from the Web Services provider.
Note: RetrieveView must not be used on its own. Use interfaces inheriting from RetrieveView such as RetrieveBinaryView.

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);
 

See Also:
ReportEngine, BinaryView, CharacterView, XMLView, ViewSupport, ViewModeType, RetrieveData, RetrieveView, RetrieveBinaryView, RetrieveCharacterView, RetrieveXMLView, OutputFormatType, DocumentInformation

Nested Class Summary
static class RetrieveView.Factory
          A class with methods for creating instances of the RetrieveView type.
 
Field Summary
static org.apache.xmlbeans.SchemaType type
          Internal Use Only.
 
Method Summary
 CallbackOption addNewCallbackOption()
          Appends and returns a new empty value as the last CallbackOption element
 NameValuePair addNewMedia()
          Appends and returns a new empty value as the last Media element
 org.apache.xmlbeans.XmlString addNewReportPartReference()
          Appends and returns a new empty value as the last ReportPartReference element
 ViewSupport addNewViewSupport()
          Appends and returns a new empty ViewSupport element.
 void addReportPartReference(java.lang.String reportPartReference)
          Appends the value as the last ReportPartReference element
 CallbackOption[] getCallbackOptionArray()
          Internal Use Only.
 CallbackOption getCallbackOptionArray(int i)
          Internal Use Only.
 int getChunkSize()
          Internal Use Only.
 NameValuePair[] getMediaArray()
          Internal Use Only.
 NameValuePair getMediaArray(int i)
          Internal Use Only.
 java.lang.String[] getReportPartReferenceArray()
          Returns the ReportPartReference.
 java.lang.String getReportPartReferenceArray(int i)
          Returns the ReportPartReference at index specified.
 java.lang.String getUserAgent()
          Gets the user's browser type.
 ViewSupport getViewSupport()
          Internal Use Only.
 CallbackOption insertNewCallbackOption(int i)
          Inserts and returns a new empty value as the ith CallbackOption element
 NameValuePair insertNewMedia(int i)
          Inserts and returns a new empty value as the ith Media element
 org.apache.xmlbeans.XmlString insertNewReportPartReference(int i)
          Inserts and returns a new empty value as the ith ReportPartReference element
 void insertReportPartReference(int i, java.lang.String reportPartReference)
          Inserts the value as the ith ReportPartReference element
 boolean isNilCallbackOptionArray(int i)
          Checks if the CallbackOption element is nil at the specified index position.
 boolean isNilMediaArray(int i)
          Checks if the Media element is nil at the specified index position.
 boolean isNilReportPartReferenceArray(int i)
          Checks if the ReportPartReference element is nil at the specified index position.
 boolean isNilViewSupport()
          Checks if the ViewSupport element is nil.
 boolean isSetChunkSize()
          Checks if the ChunkSize attribute is set.
 boolean isSetViewSupport()
          Checks if the ViewSupport element is set.
 void removeCallbackOption(int i)
          Removes the CallbackOption element from the specified index position.
 void removeMedia(int i)
          Removes the Media element from the specified index position.
 void removeReportPartReference(int i)
          Removes the ReportPartReference element at the specified index position.
 void setCallbackOptionArray(CallbackOption[] callbackOptionArray)
          Sets the array of CallbackOptions to be used for this view.
 void setCallbackOptionArray(int i, CallbackOption callbackOption)
          Sets a CallbackOption element at the specified index position.
 void setChunkSize(int chunkSize)
          Sets the chunk size measured in kilobytes for binary views or in kilocharacters for other kinds of view.
 void setMediaArray(int i, NameValuePair media)
          Sets the media to the index value, which is set in the NameValuePair object.
 void setMediaArray(NameValuePair[] mediaArray)
          Sets the media to the value, which is set in the NameValuePair object.
 void setNilCallbackOptionArray(int i)
          Sets the CallbackOption element to nil at the specified index position.
 void setNilMediaArray(int i)
          Sets the Media element to nil at the index specified.
 void setNilReportPartReferenceArray(int i)
          Sets the ReportPartReference element at the specified index position.
 void setNilViewSupport()
          Sets the ViewSupport element to nil.
 void setReportPartReferenceArray(int i, java.lang.String reportPartReference)
          Sets the ReportPartReference element at the specified index position.
 void setReportPartReferenceArray(java.lang.String[] reportPartReferenceArray)
          Sets the array of ReportPartReference element.
 void setUserAgent(java.lang.String userAgent)
          Sets the user's browser type.
 void setViewSupport(ViewSupport viewSupport)
          Sets the ViewSupport to be retrieved with a DocumentInformation object.
 int sizeOfCallbackOptionArray()
          Returns the size of the CallbackOption array.
 int sizeOfMediaArray()
          Returns the size of the Media array.
 int sizeOfReportPartReferenceArray()
          Returns the size of the report part reference array.
 void unsetChunkSize()
          Unsets the ChunkSize attribute
 void unsetViewSupport()
          Unsets the ViewSupport element.
 org.apache.xmlbeans.XmlInt xgetChunkSize()
          Internal Use Only.
 org.apache.xmlbeans.XmlString[] xgetReportPartReferenceArray()
          Internal Use Only.
 org.apache.xmlbeans.XmlString xgetReportPartReferenceArray(int i)
          Internal Use Only.
 org.apache.xmlbeans.XmlString xgetUserAgent()
          Internal Use Only.
 void xsetChunkSize(org.apache.xmlbeans.XmlInt chunkSize)
          Internal Use Only.
 void xsetReportPartReferenceArray(int i, org.apache.xmlbeans.XmlString reportPartReference)
          Internal Use Only.
 void xsetReportPartReferenceArray(org.apache.xmlbeans.XmlString[] reportPartReferenceArray)
          Internal Use Only.
 void xsetUserAgent(org.apache.xmlbeans.XmlString userAgent)
          Internal Use Only.
 

Field Detail

type

static final org.apache.xmlbeans.SchemaType type

Internal Use Only.

Method Detail

getViewSupport

ViewSupport getViewSupport()

Internal Use Only.


isNilViewSupport

boolean isNilViewSupport()
Checks if the ViewSupport element is nil.

Returns:
true if the ViewSupport element is nil, otherwise false

isSetViewSupport

boolean isSetViewSupport()
Checks if the ViewSupport element is set.

Returns:
true if the ViewSupport element is set, otherwise false

setViewSupport

void setViewSupport(ViewSupport viewSupport)
Sets the ViewSupport to be retrieved with a DocumentInformation object.
ViewSupport objects are used to control the format in which a document View is retrieved from the Web Services provider.
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.
For an example of how to use this function see ViewSupport.

Parameters:
viewSupport - a ViewSupport object.

addNewViewSupport

ViewSupport addNewViewSupport()
Appends and returns a new empty ViewSupport element.

Returns:
a new empty ViewSupport element.

setNilViewSupport

void setNilViewSupport()
Sets the ViewSupport element to nil.


unsetViewSupport

void unsetViewSupport()
Unsets the ViewSupport element.


getCallbackOptionArray

CallbackOption[] getCallbackOptionArray()

Internal Use Only.


getCallbackOptionArray

CallbackOption getCallbackOptionArray(int i)

Internal Use Only.


isNilCallbackOptionArray

boolean isNilCallbackOptionArray(int i)
Checks if the CallbackOption element is nil at the specified index position.

Parameters:
i - the index of the CallbackOption element
Returns:
true if the CallbackOption element is nil, otherwise false

sizeOfCallbackOptionArray

int sizeOfCallbackOptionArray()
Returns the size of the CallbackOption array.

Returns:
the size of the CallbackOption array.

setCallbackOptionArray

void setCallbackOptionArray(CallbackOption[] callbackOptionArray)
Sets the array of CallbackOptions to be used for this view. A CallbackOption sets a script that is to be called each time an action or object of a certain type is retrieved with a document View.
Note: If your Web Services consumer application uses HTML frames, it is possible to set the frame in which the callback script will be run.

Parameters:
callbackOptionArray - the array of CallbackOption instances
See Also:
View, DrillOption, EmbeddedCallbackOption, ImageManagement, RetrieveView, RetrieveData, ReportEngine, DocumentInformation

setCallbackOptionArray

void setCallbackOptionArray(int i,
                            CallbackOption callbackOption)
Sets a CallbackOption element at the specified index position.

Note: Before using this function, #setCallbackOption(com.businessobjects.dsws.reportengine.CallbackOption[] callbackOption) has to be called to initialize the array.

Parameters:
i - The index of the CallbackOption to be set.
callbackOption - a single CallbackOption instance.

setNilCallbackOptionArray

void setNilCallbackOptionArray(int i)
Sets the CallbackOption element to nil at the specified index position.

Parameters:
i - the index of the CallbackOption element

insertNewCallbackOption

CallbackOption insertNewCallbackOption(int i)
Inserts and returns a new empty value as the ith CallbackOption element

Parameters:
i - the index of the CallbackOption element
Returns:
a new empty value as the ith CallbackOption element

addNewCallbackOption

CallbackOption addNewCallbackOption()
Appends and returns a new empty value as the last CallbackOption element

Returns:
a new empty value as the last CallbackOption element

removeCallbackOption

void removeCallbackOption(int i)
Removes the CallbackOption element from the specified index position.

Parameters:
i - the index of the CallbackOption element

getMediaArray

NameValuePair[] getMediaArray()

Internal Use Only.


getMediaArray

NameValuePair getMediaArray(int i)

Internal Use Only.


isNilMediaArray

boolean isNilMediaArray(int i)
Checks if the Media element is nil at the specified index position.

Parameters:
i - the index of the Media element
Returns:
true if the Media element is nil, otherwise false

sizeOfMediaArray

int sizeOfMediaArray()
Returns the size of the Media array.

Returns:
the size of the Media array.

setMediaArray

void setMediaArray(NameValuePair[] mediaArray)
Sets the media to the value, which is set in the NameValuePair object.

Parameters:
mediaArray - - The array of NameValuePair objects

setMediaArray

void setMediaArray(int i,
                   NameValuePair media)
Sets the media to the index value, which is set in the NameValuePair object.

Parameters:
i - the index of the NameValuePair object
media - - The NameValuePair object

setNilMediaArray

void setNilMediaArray(int i)
Sets the Media element to nil at the index specified.

Parameters:
i - the index of the Media element

insertNewMedia

NameValuePair insertNewMedia(int i)
Inserts and returns a new empty value as the ith Media element

Parameters:
i - the index of the Media element
Returns:
a new empty value as the ith Media element

addNewMedia

NameValuePair addNewMedia()
Appends and returns a new empty value as the last Media element

Returns:
a new empty value as the last Media element

removeMedia

void removeMedia(int i)
Removes the Media element from the specified index position.

Parameters:
i - the index of the Media element

getReportPartReferenceArray

java.lang.String[] getReportPartReferenceArray()
Returns the ReportPartReference.

Returns:
the array of the report part references

getReportPartReferenceArray

java.lang.String getReportPartReferenceArray(int i)
Returns the ReportPartReference at index specified.

Parameters:
i - the index of the ReportPartReference element
Returns:
the report part reference

xgetReportPartReferenceArray

org.apache.xmlbeans.XmlString[] xgetReportPartReferenceArray()

Internal Use Only.


xgetReportPartReferenceArray

org.apache.xmlbeans.XmlString xgetReportPartReferenceArray(int i)

Internal Use Only.


isNilReportPartReferenceArray

boolean isNilReportPartReferenceArray(int i)
Checks if the ReportPartReference element is nil at the specified index position.

Parameters:
i - the index of the ReportPartReference element
Returns:
true if the ReportPartReference element is nil, otherwise false

sizeOfReportPartReferenceArray

int sizeOfReportPartReferenceArray()
Returns the size of the report part reference array.

Returns:
the size of the report part reference array.

setReportPartReferenceArray

void setReportPartReferenceArray(java.lang.String[] reportPartReferenceArray)
Sets the array of ReportPartReference element.

Parameters:
reportPartReferenceArray - - The array of ReportPartReference elements

setReportPartReferenceArray

void setReportPartReferenceArray(int i,
                                 java.lang.String reportPartReference)
Sets the ReportPartReference element at the specified index position.

Parameters:
i - the index of the ReportPartReference element
reportPartReference - the report part reference

xsetReportPartReferenceArray

void xsetReportPartReferenceArray(org.apache.xmlbeans.XmlString[] reportPartReferenceArray)

Internal Use Only.


xsetReportPartReferenceArray

void xsetReportPartReferenceArray(int i,
                                  org.apache.xmlbeans.XmlString reportPartReference)

Internal Use Only.


setNilReportPartReferenceArray

void setNilReportPartReferenceArray(int i)
Sets the ReportPartReference element at the specified index position.

Parameters:
i - the index of the ReportPartReference element

insertReportPartReference

void insertReportPartReference(int i,
                               java.lang.String reportPartReference)
Inserts the value as the ith ReportPartReference element

Parameters:
i - the index of the ReportPartReference element
reportPartReference - the report part reference

addReportPartReference

void addReportPartReference(java.lang.String reportPartReference)
Appends the value as the last ReportPartReference element

Parameters:
reportPartReference - The report part reference element

insertNewReportPartReference

org.apache.xmlbeans.XmlString insertNewReportPartReference(int i)
Inserts and returns a new empty value as the ith ReportPartReference element

Parameters:
i - the index of the ReportPartReference element
Returns:
a new empty value (as xml) as the ith ReportPartReference element

addNewReportPartReference

org.apache.xmlbeans.XmlString addNewReportPartReference()
Appends and returns a new empty value as the last ReportPartReference element

Returns:
a new empty value as the last ReportPartReference element

removeReportPartReference

void removeReportPartReference(int i)
Removes the ReportPartReference element at the specified index position.

Parameters:
i - the index of the ReportPartReference element

getUserAgent

java.lang.String getUserAgent()
Gets the user's browser type.

Returns:
the user's browser type.

xgetUserAgent

org.apache.xmlbeans.XmlString xgetUserAgent()

Internal Use Only.


setUserAgent

void setUserAgent(java.lang.String userAgent)
Sets the user's browser type. Setting the user's browser type permits Web Services to send HTML enhanced for a particular browser.

Example: Set the user agent.

RetrieveView.setUserAgent("MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322");

Parameters:
userAgent - the browser type.

xsetUserAgent

void xsetUserAgent(org.apache.xmlbeans.XmlString userAgent)

Internal Use Only.


getChunkSize

int getChunkSize()

Internal Use Only.


xgetChunkSize

org.apache.xmlbeans.XmlInt xgetChunkSize()

Internal Use Only.


isSetChunkSize

boolean isSetChunkSize()
Checks if the ChunkSize attribute is set.

Returns:
true if the ChunkSize element is set, otherwise false

setChunkSize

void setChunkSize(int chunkSize)
Sets the chunk size measured in kilobytes for binary views or in kilocharacters for other kinds of view. Setting the chunk size to 0 indicates Web Services not to chunk the document view. If the view is not chunkable, the chunk size will be ignored.

Example: Set the chunk size to 128 kilobytes for a binary view.

// Send view content, one 128 KB chunk after another
RetrieveView.setChunkSize(128);

Parameters:
chunkSize - the requested number of kilobytes or kilocharacters for the document view chunk, 0 to prevent the view from chunking.

xsetChunkSize

void xsetChunkSize(org.apache.xmlbeans.XmlInt chunkSize)

Internal Use Only.


unsetChunkSize

void unsetChunkSize()
Unsets the ChunkSize attribute