com.plumtree.remote.crawler
Interface IDocumentProvider


public interface IDocumentProvider

An interface that allows the portal to specify documents for retrieval from a backend repository.


Method Summary
 IDocument attachToDocument(java.lang.String documentLocation, java.lang.String locale, java.lang.String signature, DocumentFormat format)
          Returns a specific document for further querying and retrieval.
 void initialize(DataSourceInfo dataInfo, ICrawlerLog logger)
          Sets up any resources required during the execution of the document retrieval.
 void shutdown()
          Cleans up any resources used by the crawler.
 

Method Detail

initialize

public void initialize(DataSourceInfo dataInfo,
                       ICrawlerLog logger)
                throws ServiceException
Sets up any resources required during the execution of the document retrieval.

Parameters:
dataInfo - SCI information set in the Data Source editor. Note: The names in the NamedValues in dataInfo will be uppercase.
logger - an implementation of the ICrawlerLog logging utility object. Save this object to use it later.
Throws:
ServiceException - if an error occurred

attachToDocument

public IDocument attachToDocument(java.lang.String documentLocation,
                                  java.lang.String locale,
                                  java.lang.String signature,
                                  DocumentFormat format)
                           throws ServiceException
Returns a specific document for further querying and retrieval.

Parameters:
documentLocation - the path to the requested document. This could be a UNC path for a file crawler, or an application-specific string for other repositories. In most cases, documentLocation is ChildDocument.getLocation, except when submitting a remote document, in which case the developer supplies the documentLocation. Keep in mind that IDocumentProvider does not have access to CrawlInfo, so any crawler values required in IDocumentProvider.attachToDocument should be added to the location string in ChildDocument to be parsed in attachToDocument.
locale - the user's locale information to pass to the backend
signature - the portal's last known signature (generally a last modified date) for this document
format - the DocumentFormat flag indicating which kind of retrieval to perform. This will only be DISPLAY if using DocFetch during clickthrough. If using the FILE model of clickthrough, DocumentFormat will be INDEX during both crawl and clickthrough.
Returns:
an implementation of the IDocument interface
Throws:
NoLongerExistsException - if the document has been removed. The portal will remove the document if this exception is thrown.
NotAvailableException - if the document is temporarily unavailable. The portal will not remove the document if this exception is thrown.
NotInitializedException - if the IDocumentProvider is in an uninitialized state
AccessDeniedException - if access to this document is denied. The portal will not remove the document if this exception is thrown.
ServiceException - if an error occurred
See Also:
ChildDocument.getLocation()

shutdown

public void shutdown()
              throws ServiceException
Cleans up any resources used by the crawler.

Throws:
ServiceException - if an error occurred


For additional information on the Oracle® WebCenter Interaction Development Kit, including tutorials, blogs, code samples and more, see the Oracle Technology Network (http://www.oracle.com/technology/index.html).

Copyright ©2010 Oracle® Corporation. All Rights Reserved.