com.ibm.workplace.wcm.api
Interface Document

All Known Subinterfaces:
AuthoringTemplate, Category, Content, ContentComponentContainer, ContentLink, Editable, EditableLibraryComponent, LibraryComponent, LibraryDateComponent, LibraryDocumentManagerComponent, LibraryFileComponent, LibraryHTMLComponent, LibraryImageComponent, LibraryLinkComponent, LibraryNumericComponent, LibraryStyleSheetComponent, LibraryUserSelectionComponent, PresentationTemplate, Site, SiteArea, SiteFrameworkContainer, Taxonomy, Workflow, WorkflowStage

public interface Document

An interface defining an object that exists as an entity in the repository. 'Live' access has been removed from WCM. 'Live' access methods are deprecated and 'Read' access method calls should be used instead. Calling 'Live' access methods have the same effect as calling 'Read' access.


Method Summary
 java.lang.String[] getAuthors()
          Returns the names of authors of this Document object as a string array.
 java.lang.String[] getDeleteAccessMembers()
          Returns a string array of members who have Delete access to this Document object.
 java.lang.String getDescription()
          Returns the description of this Document object.
 java.lang.String[] getEditAccessMembers()
          Returns a string array of members who have Edit access to this Document object.
 com.ibm.workplace.wcm.api.HistoryLogIterator getHistoryLog()
          Returns the history log of this document
 com.ibm.workplace.wcm.api.DocumentId getId()
          Returns the DocumentId of this Document object.
 java.lang.String[] getLiveAccessMembers()
          Deprecated. This method is deprecated from version 6.0. Calls to 'Live' access methods have the same effect as 'Read' access method calls.
 java.util.Date getModifiedDate()
          Returns the modified date of this document
 java.lang.String getName()
          Returns the name of this Document object.
 com.ibm.workplace.wcm.api.DocumentLibrary getOwnerLibrary()
          Returns the library in which this Document object is stored.
 java.lang.String[] getOwners()
          Returns the names of owners of this Document object as a string array.
 java.lang.String[] getReadAccessMembers()
          Returns a string array of members who have Read access to this Document object.
 java.lang.String getTitle()
          Returns the title of the controllable object that this Document refers to.
 boolean hasDeleteAccess()
          Checks if the user of the Workspace associated with the current Document has Delete access to this document.
 boolean hasDeleteAccess(com.ibm.workplace.wcm.api.UserProfile user)
          Checks if the UserProfile has Delete access to this document.
 boolean hasEditAccess()
          Checks if the user of the Workspace associated with the current Document has Edit access to this document.
 boolean hasEditAccess(com.ibm.workplace.wcm.api.UserProfile user)
          Checks if the UserProfile has Edit access to this document.
 boolean hasLiveAccess()
          Deprecated. This method is deprecated from version 6.0. Calls to 'Live' access methods have the same effect as 'Read' access method calls.
 boolean hasLiveAccess(com.ibm.workplace.wcm.api.UserProfile user)
          Deprecated. This method is deprecated from version 6.0. Calls to 'Live' access methods have the same effect as 'Read' access method calls.
 boolean hasReadAccess()
          Checks if the user of the Workspace associated with the current Document has Read access to this document.
 boolean hasReadAccess(com.ibm.workplace.wcm.api.UserProfile user)
          Checks if the UserProfile has Read access to this document.
 

Method Detail

getId

public com.ibm.workplace.wcm.api.DocumentId getId()
Returns the DocumentId of this Document object.

Note. Calling this method on a Document that does not have a name set will result in a NullPointerException.

Returns:
the DocumentId of this Document
Throws:
java.lang.NullPointerException - if the name of this Document has not been set

getName

public java.lang.String getName()
Returns the name of this Document object.

Returns null if this Document does not have a name.

Returns:
the name of this Document object.

getTitle

public java.lang.String getTitle()
Returns the title of the controllable object that this Document refers to. If the document does not have a title then the name is returned.

Returns null if this Document does not have a title or a name.

Returns:
the title of the controllable object that this Document refers to.

getDescription

public java.lang.String getDescription()
Returns the description of this Document object.

Returns null if this Document object does not have a description.

Returns:
the description

getAuthors

public java.lang.String[] getAuthors()
Returns the names of authors of this Document object as a string array.

The resultant array may contain the names of users or groups.

Returns an empty array if this Document object has no authors.

Returns:
a string array of author names

getOwners

public java.lang.String[] getOwners()
Returns the names of owners of this Document object as a string array.

The resultant array may contain the names of users or groups.

Returns an empty array if this Document object has no owners.

Returns:
a string array of owner names

getLiveAccessMembers

public java.lang.String[] getLiveAccessMembers()
Deprecated. This method is deprecated from version 6.0. Calls to 'Live' access methods have the same effect as 'Read' access method calls.

Returns a string array of members who have Live access to this Document object.

The resultant array may contain the names of users or groups.

Returns an empty array if this Document object does not have Live access specified.

Returns:
a string array of members that have Live access to this Document object.

getReadAccessMembers

public java.lang.String[] getReadAccessMembers()
Returns a string array of members who have Read access to this Document object.

The resultant array may contain the names of users and groups.

Returns an empty array if this Document object does not have Read access specified.

Returns:
a string array of members that have Read access to this Document object.

getEditAccessMembers

public java.lang.String[] getEditAccessMembers()
Returns a string array of members who have Edit access to this Document object.

The resultant array may contain the names of users and groups.

Returns an empty array if this Document object does not have Edit access specified.

Returns:
a string array of members that have Edit access to this Document object.

getDeleteAccessMembers

public java.lang.String[] getDeleteAccessMembers()
Returns a string array of members who have Delete access to this Document object.

The resultant array may contain the names of users and groups.

Returns an empty array if this Document object does not have Delete access specified.

Returns:
a string array of members that have Delete access to this Document object.

hasLiveAccess

public boolean hasLiveAccess()
Deprecated. This method is deprecated from version 6.0. Calls to 'Live' access methods have the same effect as 'Read' access method calls.

Checks if the user of the Workspace associated with the current Document has Live access to the document.

Returns:
true if the document workspace user has Live access, false if not

hasReadAccess

public boolean hasReadAccess()
Checks if the user of the Workspace associated with the current Document has Read access to this document.

Returns:
true if the document workspace user has Read access, false if not

hasEditAccess

public boolean hasEditAccess()
Checks if the user of the Workspace associated with the current Document has Edit access to this document.

Returns:
true if the document workspace user has Edit access, false if not

hasDeleteAccess

public boolean hasDeleteAccess()
Checks if the user of the Workspace associated with the current Document has Delete access to this document.

Returns:
true if the document workspace user has Delete access, false if not

hasLiveAccess

public boolean hasLiveAccess(com.ibm.workplace.wcm.api.UserProfile user)
Deprecated. This method is deprecated from version 6.0. Calls to 'Live' access methods have the same effect as 'Read' access method calls.

Checks if the UserProfile has Live access to this document.

Parameters:
user - the UserProfile to perform the access check for
Returns:
true if this user has Live access, false if not

hasReadAccess

public boolean hasReadAccess(com.ibm.workplace.wcm.api.UserProfile user)
Checks if the UserProfile has Read access to this document.

Parameters:
user - the UserProfile to perform the access check for
Returns:
true if this user has Read access, false if not

hasEditAccess

public boolean hasEditAccess(com.ibm.workplace.wcm.api.UserProfile user)
Checks if the UserProfile has Edit access to this document.

Parameters:
user - the UserProfile to perform the access check for
Returns:
true if this user has Edit access, false if not

hasDeleteAccess

public boolean hasDeleteAccess(com.ibm.workplace.wcm.api.UserProfile user)
Checks if the UserProfile has Delete access to this document.

Parameters:
user - the UserProfile to perform the access check for
Returns:
true if this user has Delete access, false if not

getOwnerLibrary

public com.ibm.workplace.wcm.api.DocumentLibrary getOwnerLibrary()
Returns the library in which this Document object is stored.

Returns null if this Document object has not been saved.

Returns:
the DocumentLibrary that this Document object is stored in.

getModifiedDate

public java.util.Date getModifiedDate()
Returns the modified date of this document

Returns:
returns the modified date of this document

getHistoryLog

public com.ibm.workplace.wcm.api.HistoryLogIterator getHistoryLog()
Returns the history log of this document

The returned iterator iterates over HistoryLogEntry objects.

Returns:
a HistoryLogIterator, never null