public interface AvailableDocumentsInterface
Modifier and Type | Method and Description |
---|---|
ContentHandlerResult |
getAvailableDocumentIds(ContentHandlerInput input)
Returns an array containing the set of document keys available for viewing.
|
ContentHandlerResult getAvailableDocumentIds(ContentHandlerInput input) throws VirtualViewerAPIException
Example:
// This example retrieves all of the filenames in a specific directory as available documents
public ContentHandlerResult getAvailableDocumentIds(ContentHandlerInput input)
throws VirtualViewerAPIException
{
String clientInstanceId = input.getClientInstanceId();
File imgDirectory = new File(gFilePath);
String[] myArray = imgDirectory.list(this);
ContentHandlerResult result = new ContentHandlerResult();
result.put(ContentHandlerResult.KEY_AVAILABLE_DOCUMENT_IDS, myArray);
return result;
}
input
- ContentHandlerInput containing the following values:
Key | Type | Description |
---|---|---|
KEY_CLIENT_INSTANCE_ID | java.lang.String | Custom configurable value used to pass data from client to content handler. If not set then will be
the session ID. Can be retrieved with
|
KEY_HTTP_SERVLET_REQUEST | javax.servlet.http.HttpServletRequest | Request that called this method. Can be retrieved with
|
Key | Type | Description |
---|---|---|
KEY_AVAILABLE_DOCUMENT_IDS | java.lang.String[] | Array of keys for available documents |
VirtualViewerAPIException
- if content handler throws exceptionCopyright © 2019 Snowbound Software Corporation. All rights reserved.