com.plumtree.server
Interface IPTDataSource

All Superinterfaces:
IPTLocalizable, IPTObject, IPTUnknown

public interface IPTDataSource
extends IPTObject


Method Summary
 void AttachDataSourceProvider(IPTCard pCard, IPTDataSourceProvider pProvider)
          AttachDataSourceProvider Use this method to attach an instantiated Data Source Provider.
 void DownloadDocument(IPTDocumentType pDocumentType, IPTCard pCard, IPTDataSourceProvider pProvider)
          Downloads a temporary copy of the source document for the given card
 java.lang.String GetDataSourceBrowserCLSID()
          Returns a String used to identify the browsing object for the provider on which this Data Source is based.
 IPTDataSourceProvider GetDataSourceProvider()
          DataSourceProvider Use this method to get an instantiated Data Source Provider for this Data Source which has been Intialized using the RepositoryInfo bag.
 java.lang.String GetDataSourceProviderCLSID()
          Returns a String used to identify the provider object for this Data Source.
 java.lang.String GetGeneratedURLPrefix()
          Retrieves a 4.x style URL prefix String
 com.plumtree.openfoundation.util.IXPPropertyBag GetRepositoryInfo()
          Returns a provider specific format of configuration and connection parameters for this Data Source.
 int GetURLType()
          Returns the type of URL that is generated for opening documents for cards built on this Data Source.
 int GetWebServiceID()
          Retrieves the Web Service ID from which this Data Source was based
 void ImportDocument(com.plumtree.openfoundation.util.IXPPropertyBag vDocumentLocationBagAsXML, int lDocumentTypeID, IPTCard pCard, boolean bSummarize, IPTDataSourceProvider pProvider)
          Import Document Takes init info for the Data Source Provider, ID of the Document Type to use, and a fresh Card which will be populated with Properties, have its indexing file property set, and be given a Signature.
 void ImportDocument(java.lang.String vDocumentLocationBagAsXML, int lDocumentTypeID, IPTCard pCard, boolean bSummarize, IPTDataSourceProvider pProvider)
          Import Document Takes init info for the Data Source Provider, ID of the Document Type to use, and a fresh Card which will be populated with Properties, have its indexing file property set, and be given a Signature.
 void ImportDocumentEx(com.plumtree.openfoundation.util.IXPPropertyBag vDocumentLocationBagAsXML, IPTDocumentType pDocumentType, IPTCard pCard, boolean bSummarize, IPTDataSourceProvider pProvider)
          Same as ImportDocument only takes Document Type object in lieu of its ID
 void ImportDocumentEx(java.lang.String vDocumentLocationBagAsXML, IPTDocumentType pDocumentType, IPTCard pCard, boolean bSummarize, IPTDataSourceProvider pProvider)
          Same as ImportDocument only takes Document Type object in lieu of its ID
 void Initialize(java.lang.String bstrDataSourceProviderCLSID)
          Initializes newly created Data Source.
 void RefreshCard(int lCardID, boolean bForceRefresh, IPTDataSourceProvider pProvider)
          Refreshes a Card's Properties and serializes the results May be called when a Card is due for automatic refresh or by a Content Admin.
 void RefreshCardInMemory(IPTCard pCard, boolean bSummarize, boolean bForceRefresh, IPTDataSourceProvider pProvider)
          RefreshCardInMemory Similar method but takes an instantiated Card, which must be already locked.
 void SetGeneratedURLPrefix(java.lang.String Value)
          Sets a 4.x style URL prefix String
 void SetRepositoryInfo(com.plumtree.openfoundation.util.IXPPropertyBag Value)
          Sets a provider specific format of configuration and connection parameters for this Data Source.
 void SetRepositoryInfo(java.lang.String Value)
          Sets a provider specific format of configuration and connection parameters for this Data Source.
 void SetURLType(int Value)
          Sets the type of URL that is generated for opening documents for cards built on this Data Source.
 void SetWebServiceID(int Value)
          Sets the Web Service ID from which this Data Source was based
 
Methods inherited from interface com.plumtree.server.IPTObject
GetAdminFolderID, GetClassID, GetCreated, GetImageUUID, GetLastModified, GetObjectProperties, SetAdminFolderID, SetImageUUID, SetLastModified
 
Methods inherited from interface com.plumtree.server.IPTLocalizable
GetDescription, GetIsLocalized, GetLocalizedDescription, GetLocalizedDescriptions, GetLocalizedName, GetLocalizedNames, GetName, GetPrimaryLang, GetSupportsLocalization, SetDescription, SetIsLocalized, SetLocalizedDescriptions, SetLocalizedNames, SetName, SetPrimaryLang
 
Methods inherited from interface com.plumtree.server.IPTUnknown
GetInterfaces
 

Method Detail

Initialize

public void Initialize(java.lang.String bstrDataSourceProviderCLSID)
Initializes newly created Data Source. This is only necessary if the Data Source object is being created for the first time (not pre-existing).
Parameters:
bstrDataSourceProviderCLSID - A String which uniquely identifies the Data Source Provider (web or soap) for this Data Source

GetDataSourceBrowserCLSID

public java.lang.String GetDataSourceBrowserCLSID()
Returns a String used to identify the browsing object for the provider on which this Data Source is based.
Returns:
An identifying browser object string

GetDataSourceProviderCLSID

public java.lang.String GetDataSourceProviderCLSID()
Returns a String used to identify the provider object for this Data Source.
Returns:
a String identifying the Data Source Provider

GetRepositoryInfo

public com.plumtree.openfoundation.util.IXPPropertyBag GetRepositoryInfo()
Returns a provider specific format of configuration and connection parameters for this Data Source.
Returns:
a String of configuration and connection parameters

SetRepositoryInfo

public void SetRepositoryInfo(java.lang.String Value)
Sets a provider specific format of configuration and connection parameters for this Data Source.
Parameters:
Value - a String of configuration and connection parameters

SetRepositoryInfo

public void SetRepositoryInfo(com.plumtree.openfoundation.util.IXPPropertyBag Value)
Sets a provider specific format of configuration and connection parameters for this Data Source.
Parameters:
Value - a property bag of configuration and connection parameters

GetURLType

public int GetURLType()
Returns the type of URL that is generated for opening documents for cards built on this Data Source. The value will map to one of the following settings: PT_URL_TYPES.PT_URL_TYPE_SIMPLE_FIELD_MAPPING = 0 PT_URL_TYPES.PT_URL_TYPE_DATASOURCE_GENERATED = 1 If the value is zero then the click thru URL will not be gatewayed and the "raw" URL will be used.
Returns:
an int determining URL generation

SetURLType

public void SetURLType(int Value)
Sets the type of URL that is generated for opening documents for cards built on this Data Source. The value must map to one of the following settings: PT_URL_TYPES.PT_URL_TYPE_SIMPLE_FIELD_MAPPING = 0 PT_URL_TYPES.PT_URL_TYPE_DATASOURCE_GENERATED = 1 If the value is zero then the click thru URL will not be gatewayed and the "raw" URL will be used.
Parameters:
Value - an int determining URL generation

GetGeneratedURLPrefix

public java.lang.String GetGeneratedURLPrefix()
Retrieves a 4.x style URL prefix String
Returns:
A String prepended to URLs in earlier versions (pre-5.0)

SetGeneratedURLPrefix

public void SetGeneratedURLPrefix(java.lang.String Value)
Sets a 4.x style URL prefix String
Parameters:
Value - A String prepended to URLs in earlier versions (pre-5.0)

ImportDocument

public void ImportDocument(java.lang.String vDocumentLocationBagAsXML,
                           int lDocumentTypeID,
                           IPTCard pCard,
                           boolean bSummarize,
                           IPTDataSourceProvider pProvider)
Import Document Takes init info for the Data Source Provider, ID of the Document Type to use, and a fresh Card which will be populated with Properties, have its indexing file property set, and be given a Signature. Indexing will be done when the card is placed in the Catalog. The PropBagDocumentLocation is in a Data Source Provider specific format. The optional Summarize flag will, if set to TRUE, specify that the document should be summarized now, as opposed to waiting for the indexing which occurs when the card is stored. Asking the Data Source to do this extra work will slow down this call significantly and should only be done if it it is important to have the summary available for editing before the store. The optional DataSourceProvider argument allows the caller to pass in an instantiated and initialized Provider to be used in importing the document. In general this argument should be left NULL but some specialized clients of the DataSource (such as the Crawler object) may be able to use this argument to improve performance.
Parameters:
vDocumentLocationBagAsXML - An XML String of a provider specific document location
lDocumentTypeID - The ID of the Document Type used for mapping property values
pCard - a Card object that will be populated with the document attributes
bSummarize - Force summarization
pProvider - The Data Source Provider object used to connect to the document

ImportDocument

public void ImportDocument(com.plumtree.openfoundation.util.IXPPropertyBag vDocumentLocationBagAsXML,
                           int lDocumentTypeID,
                           IPTCard pCard,
                           boolean bSummarize,
                           IPTDataSourceProvider pProvider)
Import Document Takes init info for the Data Source Provider, ID of the Document Type to use, and a fresh Card which will be populated with Properties, have its indexing file property set, and be given a Signature. Indexing will be done when the card is placed in the Catalog. The PropBagDocumentLocation is in a Data Source Provider specific format. The optional Summarize flag will, if set to TRUE, specify that the document should be summarized now, as opposed to waiting for the indexing which occurs when the card is stored. Asking the Data Source to do this extra work will slow down this call significantly and should only be done if it it is important to have the summary available for editing before the store. The optional DataSourceProvider argument allows the caller to pass in an instantiated and initialized Provider to be used in importing the document. In general this argument should be left NULL but some specialized clients of the DataSource (such as the Crawler object) may be able to use this argument to improve performance.
Parameters:
vDocumentLocationBagAsXML - An IXPPropertyBag of a provider specific document location
lDocumentTypeID - The ID of the Document Type used for mapping property values
pCard - a Card object that will be populated with the document attributes
bSummarize - Force summarization
pProvider - The Data Source Provider object used to connect to the document

ImportDocumentEx

public void ImportDocumentEx(java.lang.String vDocumentLocationBagAsXML,
                             IPTDocumentType pDocumentType,
                             IPTCard pCard,
                             boolean bSummarize,
                             IPTDataSourceProvider pProvider)
Same as ImportDocument only takes Document Type object in lieu of its ID
Parameters:
vDocumentLocationBagAsXML -  
pDocumentType -  
pCard -  
bSummarize -  
pProvider -  

ImportDocumentEx

public void ImportDocumentEx(com.plumtree.openfoundation.util.IXPPropertyBag vDocumentLocationBagAsXML,
                             IPTDocumentType pDocumentType,
                             IPTCard pCard,
                             boolean bSummarize,
                             IPTDataSourceProvider pProvider)
Same as ImportDocument only takes Document Type object in lieu of its ID
Parameters:
vDocumentLocationBagAsXML -  
pDocumentType -  
pCard -  
bSummarize -  
pProvider -  

RefreshCard

public void RefreshCard(int lCardID,
                        boolean bForceRefresh,
                        IPTDataSourceProvider pProvider)
Refreshes a Card's Properties and serializes the results May be called when a Card is due for automatic refresh or by a Content Admin. The Document Type referenced in the Card is the one used in refreshing. The optional argument specifies if the Card is to be refreshed regardless of whether the Card is marked dirty or the document has changed. If no argument is given, a refresh will be forced. Refresh involves accessing the original document, repopulating the Card with properties, updating the Document Signature, etc. This function may fail if it is not possible to get a lock on the Card. If there are no problems getting the lock, than this function will store the Card to save the Refresh changes. If bForceRefresh is TRUE, then the Card will always be Refreshed. If bForceRefresh is FALSE, then the Signature of the Card and Document will be compared, with the Card being Refreshed only if the Signatures are different.
Parameters:
lCardID - ID of an existing card
bForceRefresh - if True, forces refresh irrespective of need
pProvider - Necessary Provider object

RefreshCardInMemory

public void RefreshCardInMemory(IPTCard pCard,
                                boolean bSummarize,
                                boolean bForceRefresh,
                                IPTDataSourceProvider pProvider)
RefreshCardInMemory Similar method but takes an instantiated Card, which must be already locked. Upon return of this function, the Card must be stored in order for the effects of the Refresh to be saved. (So cancel functionality on Refresh can be implemented usingn this method.) If bForceRefresh is TRUE, then the Card will always be Refreshed. If bForceRefresh is FALSE, then the Signature of the Card and Document will be compared, with the Card being Refreshed only if the Signatures are different. The optional Summarize flag will, if set to TRUE, specify that the document should be summarized now, as opposed to waiting for the indexing which occurs when the card is stored. Asking the Data Source to do this extra work will slow down this call significantly and should only be done if it it is important to have the summary available for editing before the store. The use of the optional DataSourceProvider argument is identical to that described in ImportDocument, above.
Parameters:
pCard - an Existing card object to be refreshed
bSummarize - Forces description generation if True
bForceRefresh - if True, forces refresh irrespective of need
pProvider - Necessary Provider object

GetDataSourceProvider

public IPTDataSourceProvider GetDataSourceProvider()
DataSourceProvider Use this method to get an instantiated Data Source Provider for this Data Source which has been Intialized using the RepositoryInfo bag. For use by the specialized clients of the Data Source object (like the Crawler and Card Refresh Agent) which use the option DataSourceProvider argument on the three methods above.
Returns:
Data Source Provider object underlying this Data Source

AttachDataSourceProvider

public void AttachDataSourceProvider(IPTCard pCard,
                                     IPTDataSourceProvider pProvider)
AttachDataSourceProvider Use this method to attach an instantiated Data Source Provider. For use by the specialized clients of the Data Source object (like the Crawler and Card Refresh Agent). Can be used to test the validity of a card's link.
Parameters:
pCard - Existing card object whose parameters will be used for attaching to the source document
pProvider - an initialized provider

DownloadDocument

public void DownloadDocument(IPTDocumentType pDocumentType,
                             IPTCard pCard,
                             IPTDataSourceProvider pProvider)
Downloads a temporary copy of the source document for the given card
Parameters:
pDocumentType - an instantiated DocumentType for this card
pCard - an instantiated Card object
pProvider - an initialized provider

GetWebServiceID

public int GetWebServiceID()
Retrieves the Web Service ID from which this Data Source was based
Returns:
a Web Service ID

SetWebServiceID

public void SetWebServiceID(int Value)
Sets the Web Service ID from which this Data Source was based
Parameters:
Value - an int value for the Web Service ID


Copyright © 2003 Plumtree Software Inc. All Rights Reserved.