|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface that allows remote services to create new documents in the portal Knowledge Directory.
Method Summary | |
void |
addDocuments(int documentID,
int[] destinationFolderIDs)
Adds a document to the portal. Note: This does not duplicate the document file itself, only links to the document in the portal. Note: Since this method performs multiple operations, any exception thrown relating to these will have details of each failure. |
IDocumentQuery |
createQuery(int folderID)
Factory method to create a document query on a specified document folder. |
IRemoteDocument |
createRemoteDocument(int[] folderIDs,
int dataSourceID,
java.lang.String location,
boolean mergeACLs)
Creates a new remote document. |
IRemoteDocument |
createRemoteDocument(int parentFolderID,
int dataSourceID,
java.lang.String location)
Creates a new remote document. |
IWebLinkDocument |
createWebLinkDocument(int[] folderIDs,
int dataSourceID,
java.lang.String link,
boolean mergeACLs)
Creates a new Web link document. |
IWebLinkDocument |
createWebLinkDocument(int parentFolderID,
int dataSourceID,
java.lang.String link)
Creates a new Web link document. |
IACL |
queryACL(int documentID)
Retrieves an ACL (Access Control List) for managing the security for a document. |
IObjectQuery |
queryContainingFolders(int documentID)
Queries for all folders which contain a specific document |
IDocumentProperties |
queryDocumentProperties(int documentID)
Queries the properties of a document. |
void |
removeDocuments(int[] documentIDs)
Removes documents from the portal. Note: This does not remove the document file itself, only the link to the document from the portal. Note: Since this method performs multiple operations, any exception thrown will have details of each failure. |
void |
setBrokenLinkDeletionTime(int documentID,
TimeInterval deletionTime)
Sets the time interval after which a document with a broken link will be deleted. |
void |
setExpirationDate(int documentID,
java.util.Date expires)
Sets the date on which to expire this document. |
void |
setNeverExpires(int documentID)
Sets a document to never be expired. |
void |
setRefreshRate(int documentID,
TimeInterval refreshInterval,
boolean doNotRefreshProperties)
Sets the document refresh rate, which determines how often a document and its properties will get refreshed. |
void |
updateACL(int documentID,
IACL acl)
Updates the ACL (Access Control List) for a document. |
void |
updateDocumentProperties(int documentID,
IDocumentProperties properties)
Updates the properties of a document. |
Method Detail |
public IRemoteDocument createRemoteDocument(int parentFolderID, int dataSourceID, java.lang.String location)
save()
method is
called on the IDocument
object.
parentFolderID
- the ID of the directory folder in which to create the new documentdataSourceID
- the ID of the Data Source associated with the new documentlocation
- the location string that will be passed to the
remote crawler to indicate which document to retrieve
Note: This is the same value that would be returned in the location field of
com.plumtree.remote.crawler.ChildDocument
and then passed to
the Data Source in com.plumtree.remote.crawler.IDocumentProvider#attachToDocument
.
The location string can be a full path for a file crawler; a concatenation of schema, table name, and primary key for a database crawler;
a concatenation of database name, view name, and document unique ID for a Notes crawler; or a application-specific string
for a custom crawler.
//get the document manager..... int folderID = 20; //get from the query string from mousing over the directory folder in the ui int dataSourceID = 30; //get from the query string from mousing over the data source in the ui //location of a file; the format of the location string is data-source specific String location = "\\\\MyServer\\share\\Portlet FAQ and Price list.doc" ; IRemoteDocument doc = documentManager.createRemoteDocument(folderID, dataSourceID, location); //set the override name and description- otherwise the value would be taken from the accessor doc.setOverrideName("Portlet Price List"); doc.setOverrideDescription("Portlet Prices and FAQs"); //set the type- in this case, a word doc in the MIME namespace doc.setType("http://www.plumtree.com/dtm/mime", "application/msword"); //set the docID to a negative number to check for failure int docID = -1; try } docID = documentManager.save(); } catch (MalformedURLException e) { //if the query interface URL was not valid e.printStackTrace(); } catch (PortalException pe) { //if the operation resulted in an error in the portal pe.printStackTrace(); } catch (RemoteException re) { //if there was a communication problem during the execution of the remote method call re.printStackTrace(); } //process docID as desired......
public IWebLinkDocument createWebLinkDocument(int parentFolderID, int dataSourceID, java.lang.String link)
save()
method is
called on the Document
object.
parentFolderID
- the ID of the directory folder in which to create the new documentdataSourceID
- the ID of the Data Source associated with the new documentlink
- the Web location of the new document; must be a URL
public IRemoteDocument createRemoteDocument(int[] folderIDs, int dataSourceID, java.lang.String location, boolean mergeACLs)
save()
method is
called on the IDocument
object.
folderIDs
- the IDs of the directory folders in which to add the new documentdataSourceID
- the ID of the Data Source associated with the new documentlocation
- the location string that will be passed to the
remote crawler to indicate which document to retrieve; can be a URLmergeACLs
- true to use the merged ACLs of the parent folders, false to use the default ACL
Note: This is the same value that would be returned in the location field of
com.plumtree.remote.crawler.ChildDocument
and then passed to
the DataSource in com.plumtree.remote.crawler.IDocumentProvider#attachToDocument
.
The location string can be a full path for a file crawler; a concatenation of schema, table name, and primary key for a database crawler;
a concatenation of database name, view name, and document unique ID for a Notes crawler; or a application-specific string
for a custom crawler.
//get the document manager..... int[] folderIDs = {20,25,20}; //get from the query string from mousing over the directory folders in the ui int dataSourceID = 30; //get from the query string from mousing over the data source in the ui //location of a file; the format of the location string is data-source specific String location = "\\\\MyServer\\share\\Portlet FAQ and Price list.doc" ; IRemoteDocument doc = documentManager.createRemoteDocument(folderIDs, dataSourceID, location, true); //set the override name and description- otherwise the value would be taken from the accessor doc.setOverrideName("Portlet Price List"); doc.setOverrideDescription("Portlet Prices and FAQs"); //set the type- in this case, a word doc in the MIME namespace doc.setType("http://www.plumtree.com/dtm/mime", "application/msword"); //set the docID to a negative number to check for failure int docID = -1; try } docID = documentManager.save(); } catch (MalformedURLException e) { //if the query interface URL was not valid e.printStackTrace(); } catch (PortalException pe) { //if the operation resulted in an error in the portal pe.printStackTrace(); } catch (RemoteException re) { //if there was a communication problem during the execution of the remote method call re.printStackTrace(); } //process docID as desired......
public IWebLinkDocument createWebLinkDocument(int[] folderIDs, int dataSourceID, java.lang.String link, boolean mergeACLs)
save()
method is
called on the Document
object.
folderIDs
- the IDs of the directory folders in which to add the new documentdataSourceID
- the ID of the Data Source associated with the new documentlink
- the Web location of the new document; must be a URLmergeACLs
- true to use the merged ACLs of the parent folders, false to use the default ACL
public IDocumentProperties queryDocumentProperties(int documentID) throws PortalException, java.rmi.RemoteException
documentID
- the document ID of the document to query
PortalException
- if the operation resulted in an error in the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic void updateDocumentProperties(int documentID, IDocumentProperties properties) throws PortalException, java.rmi.RemoteException
documentID
- the document ID of the document to updateproperties
- the properties to update the document with. If any intrinsic properties have been deleted from the portal,
the corresponding property must be removed from the DocumentTypeMap or the update will fail
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
PortalException
- if the operation resulted in an error on the portal
java.lang.NullPointerException
- if the properties set is public void setRefreshRate(int documentID, TimeInterval refreshInterval, boolean doNotRefreshProperties) throws PortalException, java.rmi.RemoteException
doNotRefreshProperties
is set to true
,
only the validity of the link to this document will be confirmed and no document properties
will be refreshed.
IllegalArgumentException
will be thrown.
refreshInterval
to TimeInterval.INFINITE
will set the document to never be refreshed.
documentID
- the ID of the document to set refresh rate; cannot be negativerefreshInterval
- the time interval specifying the refresh interval value and unit.
The numeric component must be between 1 and 999, otherwise an
IllegalArgumentException
will be thrown.
Setting the refreshInterval
to TimeInterval.INFINITE
will cause the document to never be refreshed.doNotRefreshProperties
- true
if only the link to the document should be confirmed,
and no document properties should be refreshed, otherwise false
PortalException
- if the document ID is invalid or the operation resulted in an error on the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
java.lang.IllegalArgumentException
- if the documentID is negative or the numeric component of the refreshInterval is not between 1 and 999
java.lang.NullPointerException
- if the timeInterval or the unit
component of the timeInterval is null
public void setBrokenLinkDeletionTime(int documentID, TimeInterval deletionTime) throws PortalException, java.rmi.RemoteException
TimeInterval.INFINITE
will cause a broken link document to never be deleted.
IllegalArgumentException
will be thrown.
documentID
- the ID of the document to set broken link deletion time; cannot be negativedeletionTime
- the time interval after which a missing document will be deleted.
The numeric component must be between 1 and 999, otherwise an
IllegalArgumentException
will be thrown. Setting
the deletionTime to TimeInterval.INFINITE
will cause the document to never be deleted.
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
PortalException
- if the document ID is invalid or the operation resulted in an error in the portal
java.lang.IllegalArgumentException
- if the documentID is negative or the numeric
component of the refreshInterval is not between 1 and 999
java.lang.NullPointerException
- if the deletionTime or the unit
component of the deletionTime is null
public void setExpirationDate(int documentID, java.util.Date expires) throws PortalException, java.rmi.RemoteException
documentID
- the ID of the document to set an expiration date forexpires
- the time at which the document is set to expire.
Cannot be null
.
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
PortalException
- if the document ID is invalid or the operation resulted in an error on the portal
java.lang.IllegalArgumentException
- if the documentID is negativepublic void setNeverExpires(int documentID) throws PortalException, java.rmi.RemoteException
documentID
- the ID of the document to disable expiration for
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
PortalException
- if the document ID is invalid or the operation resulted in an error in the portal
java.lang.IllegalArgumentException
- if the documentID is negativepublic void removeDocuments(int[] documentIDs) throws PortalException, java.rmi.RemoteException
documentIDs
- the IDs of the documents to remove
PortalException
- if the operation resulted in an error in the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic void addDocuments(int documentID, int[] destinationFolderIDs) throws PortalException, java.rmi.RemoteException
documentID
- the ID of the document to adddestinationFolderIDs
- the IDs of the folders to which to add the document
PortalException
- if the operation resulted in an error in the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic IDocumentQuery createQuery(int folderID)
folderID
- thefolder ID to query
public IObjectQuery queryContainingFolders(int documentID) throws PortalException, java.rmi.RemoteException
documentID
- the ID of the document to query for
PortalException
- if the operation resulted in an error on the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
java.lang.IllegalArgumentException
- if passed an invalid document IDpublic IACL queryACL(int documentID) throws java.net.MalformedURLException, PortalException, java.rmi.RemoteException
documentID
- the document ID of the object for which to retrieve the ACL
java.net.MalformedURLException
- if the query interface URL is not valid
java.lang.IllegalArgumentException
- if an invalid document ID was passed
PortalException
- if the operation resulted in an error in the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method callpublic void updateACL(int documentID, IACL acl) throws java.net.MalformedURLException, PortalException, java.rmi.RemoteException
documentID
- the document ID of the document for which to set the ACLacl
- the ACL to set on the document
java.net.MalformedURLException
- if the query interface URL is not valid
java.lang.IllegalArgumentException
- if an an invalid document ID was passed
PortalException
- if the operation resulted in an error in the portal
java.rmi.RemoteException
- if there was a communication problem during the execution of the remote method call
ACLEntryReadOnlyException
- if the ACL contains read-only ACLEntry
s that have been modified
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©2008 Oracle® Corporation. All Rights Reserved.