|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface represents a document, or more specifically, a collection of meta-data about a collaboration document.
To retrieve an existing document, use IDocumentManager.getDocument.
To insert a new document, first obtain a new empty IDocument using
IDocumentManager.createNewDocument, possibly set some of the
meta-data such as author, then call IDocumentManager.insertNewDocument.
To retrieve the actual content of a saved document, call getContentAsInputStream()
Any modification of a document will not be stored permanently until store is called.
| Method Summary | |
AccessLevel |
getAccessLevel(RoleType roleType)
Returns document access level for a given role type. |
java.lang.String |
getAuthor()
Returns a string representing the author of the document. |
java.util.Date |
getCheckedOutDate()
Returns the date at which the document was last checked out. |
IDocumentFolder |
getContainingFolder()
Returns the document folder that this document is stored in. |
IProject |
getContainingProject()
Returns the project that this document belongs to. |
java.io.InputStream |
getContentAsInputStream()
Returns An InputStream for reading the contents of the current version of the document. |
java.lang.String |
getContentType()
Returns a string representing the content type of the document. |
java.lang.String |
getContentURL()
Returns the URL at which the document can be downloaded. |
java.util.Date |
getCreatedDate()
Returns the creation date. |
java.lang.String |
getDescription()
Returns the document description. |
java.lang.String |
getDetailsURL()
Returns the URL at which the document details can be viewed. |
int |
getID()
Returns the document ID. |
java.util.Date |
getLastModifiedDate()
Returns the last modified date. |
java.lang.String |
getName()
Returns the document name. |
int |
getOwnerUserID()
Returns the user ID of the owner of this document. |
java.lang.String |
getPath(java.lang.String pathSeparationString)
Returns a string representation of the path of a document. |
int |
getPublishedPortalDocumentID()
Returns the corresponding document ID of the portal document that the document has been published to. |
boolean |
hasCheckedOutDate()
Returns true if checked-out date is available, else false. |
boolean |
hasCreatedDate()
Returns true if created date is available, else false. |
boolean |
hasLastModifiedDate()
Returns true if last modified date is available, else false. |
boolean |
isActionAllowed(DocumentPermission permission)
Returns if a given DocumentPermission is allowed for this document. |
boolean |
isCheckedOut()
Returns a boolean indicating whether or not the document is currently in the checked-out state. |
boolean |
isDefaultSecurity()
Indicates whether this document uses project-default security. |
boolean |
isPublishedToPortal()
Returns a boolean value indicating whether or not the document has been published to the portal knowledge directory. |
void |
setAccessLevel(RoleType roleType,
AccessLevel accessLevel)
Set document access level for a given role type. |
void |
setAuthor(java.lang.String author)
Sets the document author. |
void |
setContentType(java.lang.String contentType)
Sets the document content type. |
void |
setDefaultSecurity(boolean isDefaultSecurity)
Enables or disables this document's use of project default security. |
void |
setDescription(java.lang.String description)
Sets the document description. |
void |
setName(java.lang.String name)
Sets the document name. |
void |
store()
Store properties or meta-data of a document. |
| Method Detail |
public AccessLevel getAccessLevel(RoleType roleType)
roleType - the role type for which to get the access level. Cannot be null.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public java.lang.String getAuthor()
java.lang.IllegalStateException - if the document has already been removed.public java.util.Date getCheckedOutDate()
java.lang.IllegalStateException - if the document has not yet been inserted, has already been removed or is not
checked out.
public IDocumentFolder getContainingFolder()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the method call resulted in an error.
java.lang.IllegalStateException - if the document has already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
public IProject getContainingProject()
throws CollaborationException,
java.rmi.RemoteException
CollaborationException - if the method call resulted in an error.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
public java.io.InputStream getContentAsInputStream()
throws CollaborationException,
java.rmi.RemoteException
InputStream for reading the contents of the current version of the document.
WARNING: It is essential the the client call close() on the input stream once
finished reading from it. It is recommended to put a call to close() in a
finally block.
InputStream which can be used to read the document contents.
CollaborationException - if the method call resulted in an error.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.public java.lang.String getContentType()
text/plain.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public java.lang.String getContentURL()
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public java.util.Date getCreatedDate()
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public java.lang.String getDescription()
java.lang.IllegalStateException - if the document has already been removed.public java.lang.String getDetailsURL()
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public int getID()
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public java.util.Date getLastModifiedDate()
java.lang.IllegalStateException - if the
document has not yet been inserted or has already been removed.public java.lang.String getName()
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public int getOwnerUserID()
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public java.lang.String getPath(java.lang.String pathSeparationString)
pathSeparationString - the string to insert between path components. Cannot be null.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.
public int getPublishedPortalDocumentID()
throws PermissionDeniedException,
CollaborationException,
java.rmi.RemoteException
java.lang.IllegalStateException - if the document has not been published to the portal, has not
yet been inserted or has already been removed.
PermissionDeniedException - if the user does not have the permission to edit the document.
CollaborationException - if the method call resulted in an error.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.public boolean hasCheckedOutDate()
true if checked-out date is available, else false.
true if checked-out date is available, else false.
java.lang.IllegalStateException - if the document has already been removed.public boolean hasCreatedDate()
true if created date is available, else false.
true if created date is available, else false.
java.lang.IllegalStateException - if the document has already been removed.public boolean hasLastModifiedDate()
true if last modified date is available, else false.
true if last modified date is available, else false.
java.lang.IllegalStateException - if the document has already been removed.
public boolean isActionAllowed(DocumentPermission permission)
throws CollaborationException,
java.rmi.RemoteException
DocumentPermission is allowed for this document.
This method can be used to determine if a user can perform a given action within the context of a document such
as editing a document, copying a document, editing document security, etc. See the enumeration type
DocumentPermission for details about specific document permissions.
permission - document permission.Cannot be null.
true if the user can perform the given action, else false.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.
CollaborationException - if the call resulted in an error.public boolean isCheckedOut()
java.lang.IllegalStateException - if the document has already been removed.public boolean isDefaultSecurity()
true, modifying security on the current document will not be possible.
setDefaultSecurity must be set to false in order to modify individual documents'
security. Default value for isDefaultSecurity is true.
true if the document uses project-default security, false if the document is
enabled to use its own security.
java.lang.IllegalStateException - if the document has already been removed.
public boolean isPublishedToPortal()
throws PermissionDeniedException,
CollaborationException,
java.rmi.RemoteException
java.lang.IllegalStateException - if the document has not yet been inserted or has already been
removed.
CollaborationException - if the method call resulted in an error.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
PermissionDeniedException
public void setAccessLevel(RoleType roleType,
AccessLevel accessLevel)
false calling
setDefaultSecurity(false).
roleType - the role type for which access level will be set.accessLevel - the access level.
java.lang.IllegalStateException - if the document has not yet been inserted, has already been removed or is set to
use default security.public void setAuthor(java.lang.String author)
author - string containing the author. Cannot be null.
java.lang.IllegalStateException - if the document has already been removed.public void setContentType(java.lang.String contentType)
text/plain.
contentType - a string containing the content type. Cannot be null.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.public void setDefaultSecurity(boolean isDefaultSecurity)
true will enable defaultSecurity,
calling it with false will disable defaultSecurity. defaultSecurity set to true.
To modify security on individual documents, the documents must have defaultSecurity
disabled before modification. After this method is called, any project-level security modification will not be applied to the
documents, and only individual document's security will be used.isDefaultSecurity, which would indicate if the current document has defaultSecurity
enabled.
isDefaultSecurity - true if it uses default security, otherwise false.
java.lang.IllegalStateException - if the document has already been removed.public void setDescription(java.lang.String description)
description - the description. Cannot be null.
java.lang.IllegalStateException - if the document has already been removed.public void setName(java.lang.String name)
name - the document name. Cannot be null.
java.lang.IllegalStateException - if the document has already been removed.
public void store()
throws PermissionDeniedException,
CollaborationException,
java.rmi.RemoteException
IDocumentManager.checkInDocument.
PermissionDeniedException - if the user does not have the permission to edit the document.
CollaborationException - if the method call resulted in an error.
java.rmi.RemoteException - if there is a communication problem during the execution of the remote method call.
java.lang.IllegalStateException - if the document has not yet been inserted or has already been removed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.