|
||||||||||
| 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 documents to the portal. Note that this does not duplicate the document file itself, only links to the document from the portal. |
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 on 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 that this does not remove the document file itself, only the link to the document from the portal. |
void |
setBrokenLinkDeletionTime(int documentID,
TimeInterval deletionTime)
Sets the time interval after which a broken link document will be deleted. |
void |
setExpirationDate(int documentID,
java.util.Date expires)
Sets the date at which to expire this document. |
void |
setNeverExpires(int documentID)
Sets a document to be never 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) on 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.
Further notes on location: this is the same value which 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 could 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 document.dataSourceID - the ID of the Data Source associated with the new document.location - 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.
Further notes on location: this is the same value which 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 could 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 for which to query the properties
PortalException - if the operation resulted in an error on the portal
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call
public 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 is 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 properties 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.
TimeInterval.INFINITE
will set the document to be never refreshed.
documentID - ID of the document to set refresh rate; cannot be negative.refreshInterval - time interval specifying the refresh interval value and unit.
The numeric component must be between 1 to 999, otherwise an
IllegalArgumentException will be thrown.
Setting the refreshInterval to TimeInterval.INFINITE will cause the document to never get refreshed.doNotRefreshProperties - if set to true, only the link to the document will be confirmed,
and no document properties will be refreshed, otherwise false.
PortalException - if the document ID is invalid, or if the operation resulted in an error on the portal.
java.rmi.RemoteException - if there is 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 to 999.
java.lang.NullPointerException - if 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 be never deleted.
documentID - ID of the document to set broken link deletion time; cannot be negative.deletionTime - time interval after which a missing document will be deleted.
The numeric component must be between 1 to 999, otherwise an
IllegalArgumentException will be thrown. Setting
the deletionTime to TimeInterval.INFINITE will cause the document to be never deleted.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
PortalException - if the document ID is invalid, or if the operation resulted in an error on the portal.
java.lang.IllegalArgumentException - if the documentID is negative, or the numeric
component of the refreshInterval is not between 1 to 999.
java.lang.NullPointerException - if 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 - ID of the document to set expiration on.expires - the time at which the document is set to expire.
Cannot be null.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call
PortalException - if the document ID is invalid, or if the operation resulted in an error on the portal.
java.lang.IllegalArgumentException - if the documentID is negative.
public void setNeverExpires(int documentID)
throws PortalException,
java.rmi.RemoteException
documentID - ID of the document to set expiration on.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call
PortalException - if the document ID is invalid, or if the operation resulted in an error on the portal.
java.lang.IllegalArgumentException - if the documentID is negative.
public 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 on the portal
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call
public 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 add the document to
PortalException - if the operation resulted in an error on the portal
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method callpublic IDocumentQuery createQuery(int folderID)
folderID - folder 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 is a communication problem during the execution of the remote method call
java.lang.IllegalArgumentException - if passed an invalid document ID
public 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 passed an invalid document ID
PortalException - if the operation resulted in an error on the portal
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call
public void updateACL(int documentID,
IACL acl)
throws java.net.MalformedURLException,
PortalException,
java.rmi.RemoteException
documentID - the document ID 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 passed an invalid document ID
PortalException - if the operation resulted in an error on the portal
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call
ACLEntryReadOnlyException - if the ACL contains read-only ACLEntry's which have been modified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.