com.plumtree.server
Interface IPTDataSourceProvider


public interface IPTDataSourceProvider

Version:
$Revision$
Author:
Mike Sample IPTDataSourceProvider is used to retrieve fields for a given document stored in a given repository

Method Summary
 void AttachToDocument(com.plumtree.openfoundation.util.IXPPropertyBag pBagDocumentLocation, java.lang.String AccessorID)
          Attach to Document (requires that Initialize has been successfully called already) Takes the Document Location Information (where the Document is located inside the Repository) and the Accessor to be used (the ID of which is taken from the Document Type).
 java.lang.String DocumentSummary()
          Returns a suggested description field for this document if the Provider is equipped to deliver one.
 java.lang.Object[][] GetCommonFields()
          Retrieve the common fields and descriptions for this Provider
 java.lang.String GetDataSourceBrowserCLSID()
          Returns a unique identifier string used by the server to instantiate the browsing class for this provider
 java.lang.String GetDataSourceCrawlProviderCLSID()
          Returns a unique identifier string used by the server to instantiate the crawling class for this provider
 java.lang.String GetDataSourceProviderCLSID()
          Returns a unique idenifier string used by the server to instantiate the provider
 java.lang.String GetDescription()
          Returns a human readable description for this Data Source Provider
 java.lang.String GetDocumentImageUUID()
          Returns a String used to build the image URL for this card
 java.lang.String GetDocumentSignature()
          Returns a provider specific string identifying the "state" of the attached document
 java.lang.Object[][] GetDocumentTypeMapSections()
          This is used to retrieve a list of sections that should appear in the Document Type Map along with descriptions, etc.
 java.lang.Object[][] GetFields()
          Retrieves the fields from the document and repository The provider must have already been attached.
 java.lang.String GetFileExtension()
          Returns the .extension for the attached document
 int GetGatewayClassID()
          Returns the Class ID used within the Click Thru URL
 java.lang.String GetGatewayURL()
          Returns the click thru URL for the attached document using the gateway prefix
 java.lang.String GetImageUUID()
          Returns the image string for this provider type.
 java.lang.String GetName()
          Returns the human readable name of this Data Source Provider
 java.lang.String GetSuggestedCardName()
          Returns the provider determined name for this document
 java.lang.Object[][] GetSuggestedDocumentTypeMapEntries()
          SuggestedDocumentTypeMapEntries returns a SafeArray of suggested Document Type Map entries.
 void Initialize(com.plumtree.openfoundation.util.IXPPropertyBag pBagRepositoryInfo, IPTSession pSession, int lWebServiceID)
          Initialization of a Data Source Provider requires Repository specific Information (passwd, logon, preferences, etc.) Initialization causes the DataSourceProvider to connect to the Repository in 5.0, client should pass in the WSID on the data source
 int QueryCapability(int QueryCapability)
          Allows for determination of Provider capabilities
 void Shutdown()
          Called by the server just before dispensing of the provider.
 java.lang.String SpecificDataSourceDescription(com.plumtree.openfoundation.util.IXPPropertyBag pbagConfigurationInfo)
          Retrieve a Data Source Provider specific description of the current configuration info
 void WriteIndexingFile(java.lang.String bstrFullFilePath)
          Copies the document stream of the attached document to the path provided
 

Method Detail

Initialize

void Initialize(com.plumtree.openfoundation.util.IXPPropertyBag pBagRepositoryInfo,
                IPTSession pSession,
                int lWebServiceID)
Initialization of a Data Source Provider requires Repository specific Information (passwd, logon, preferences, etc.) Initialization causes the DataSourceProvider to connect to the Repository in 5.0, client should pass in the WSID on the data source

Parameters:
pBagRepositoryInfo - Provider specific repository connection parameters
pSession - a Plumtree user session
lWebServiceID - The Web Service ID for this provider

AttachToDocument

void AttachToDocument(com.plumtree.openfoundation.util.IXPPropertyBag pBagDocumentLocation,
                      java.lang.String AccessorID)
Attach to Document (requires that Initialize has been successfully called already) Takes the Document Location Information (where the Document is located inside the Repository) and the Accessor to be used (the ID of which is taken from the Document Type). Using this, the document is located, the Accessor is initialized (after doing a sanity check on Data Format) and the Fields are retrieved (and resolved). Attaches the DataSourceProvider to a specific Document in the Repository

Parameters:
pBagDocumentLocation - a Provider specific document node property bag
AccessorID - a String identifying the appropriate accessor to be used for this document

SpecificDataSourceDescription

java.lang.String SpecificDataSourceDescription(com.plumtree.openfoundation.util.IXPPropertyBag pbagConfigurationInfo)
Retrieve a Data Source Provider specific description of the current configuration info

Parameters:
pbagConfigurationInfo - A property bag containing the Data Source configuration info
Returns:
A human readable String summarizing the Data Source configuration info

GetFields

java.lang.Object[][] GetFields()
Retrieves the fields from the document and repository The provider must have already been attached.

Returns:
an Object array of field names and values returned for this document node

GetSuggestedCardName

java.lang.String GetSuggestedCardName()
Returns the provider determined name for this document

Returns:
a String that can be used for a card name.

DocumentSummary

java.lang.String DocumentSummary()
Returns a suggested description field for this document if the Provider is equipped to deliver one.

Returns:
A brief description or summary collected from the attached document

GetDocumentSignature

java.lang.String GetDocumentSignature()
Returns a provider specific string identifying the "state" of the attached document

Returns:
A string used by the Refresh Agent to determine changes in the source document

GetDocumentImageUUID

java.lang.String GetDocumentImageUUID()
Returns a String used to build the image URL for this card

Returns:
A String used to build the image URL for this card

GetFileExtension

java.lang.String GetFileExtension()
Returns the .extension for the attached document

Returns:
A String containing the attached documents file extension

WriteIndexingFile

void WriteIndexingFile(java.lang.String bstrFullFilePath)
Copies the document stream of the attached document to the path provided

Parameters:
bstrFullFilePath - The path to which a copy of the document will be made

GetGatewayURL

java.lang.String GetGatewayURL()
Returns the click thru URL for the attached document using the gateway prefix

Returns:
A String containing the click thru URL for the attached document

GetGatewayClassID

int GetGatewayClassID()
Returns the Class ID used within the Click Thru URL

Returns:
a PT_CLASSID used within the Click Thru URL

GetName

java.lang.String GetName()
Returns the human readable name of this Data Source Provider

Returns:
a String containing the name of this Data Source Provider

GetDescription

java.lang.String GetDescription()
Returns a human readable description for this Data Source Provider

Returns:
A String containing a description for this Data Source Provider

GetDataSourceProviderCLSID

java.lang.String GetDataSourceProviderCLSID()
Returns a unique idenifier string used by the server to instantiate the provider

Returns:
a unique identifier String for this provider

GetDataSourceBrowserCLSID

java.lang.String GetDataSourceBrowserCLSID()
Returns a unique identifier string used by the server to instantiate the browsing class for this provider

Returns:
a unique String identifying the brower class of this provider

GetDataSourceCrawlProviderCLSID

java.lang.String GetDataSourceCrawlProviderCLSID()
Returns a unique identifier string used by the server to instantiate the crawling class for this provider

Returns:
a unique String identifying the crawling class of this provider

QueryCapability

int QueryCapability(int QueryCapability)
Allows for determination of Provider capabilities

Parameters:
QueryCapability - a PT_DSPROVIDER_CAPABILITIES type
Returns:
an int carrying the value for the requested capability

GetCommonFields

java.lang.Object[][] GetCommonFields()
Retrieve the common fields and descriptions for this Provider

Returns:
Returns the fields available from an attached document.

GetImageUUID

java.lang.String GetImageUUID()
Returns the image string for this provider type.

Returns:
A String used to build an image URL used for this provider.

GetDocumentTypeMapSections

java.lang.Object[][] GetDocumentTypeMapSections()
This is used to retrieve a list of sections that should appear in the Document Type Map along with descriptions, etc. of the sections. See the PT_PROVIDER_DOC_TYPE_MAP_SECTIONS enumeration.

Returns:
An Object array containing the Document Type Map Sections

GetSuggestedDocumentTypeMapEntries

java.lang.Object[][] GetSuggestedDocumentTypeMapEntries()
SuggestedDocumentTypeMapEntries returns a SafeArray of suggested Document Type Map entries. For examples, the File provider might suggest that "*.txt" should be in the File section of the map. See the PT_SUGG_DOC_TYPE_MAP_ENTRIES_INDICES enumeration

Returns:
an Object array of suggested Document Type mappings

Shutdown

void Shutdown()
Called by the server just before dispensing of the provider. This ensures connection and file resources are appropriately cleaned up after use.