com.ibm.workplace.wcm.api
Interface DocumentLibrary

All Superinterfaces:
Library, WCMApiObject

public interface DocumentLibrary
extends Library

Represents a library containing Documents.


Method Summary
 java.lang.String getDescription()
          Returns the description of this DocumentLibrary object.
 java.lang.String getDescription(java.util.Locale locale)
          Returns the localized description of this DocumentLibrary object.
 java.lang.String getDescriptionTextProviderKey()
          If a text provider has been configured, this method returns the text provider key for the description of this DocumentLibrary.
 java.lang.String getDescriptionTextProviderName()
          If a text provider has been configured, this method returns the text provider name for the description of this DocumentLibrary.
 java.lang.String getId()
          Returns the unique Id of this DocumentLibrary object.
 DocumentLibraryACL getLibraryAccess()
          Returns the access control object for this DocumentLibrary
 DocumentLibraryACL getLibraryResourceAccess(LibraryResourceType type)
          Returns the access control object for a library resource (e.g.
 java.util.Locale getLocale()
          Returns the Locale of this DocumentLibrary object.
 java.lang.String getName()
          Returns the name of this DocumentLibrary object.
 Folder getPresetFolder(com.ibm.workplace.wcm.api.PresetFolderType type)
          Returns a reference to the specified preset Folder for the current library
 LibraryProperties getProperties()
          Returns the properties associated with this Library.
 java.lang.String getTitle()
          Returns the title of this DocumentLibrary object.
 java.lang.String getTitle(java.util.Locale locale)
          Returns the localized title of this DocumentLibrary object.
 java.lang.String getTitleTextProviderKey()
          If a text provider has been configured, this method returns the text provider key for the title of this DocumentLibrary.
 java.lang.String getTitleTextProviderName()
          If a text provider has been configured, this method returns the text provider name for the title of this DocumentLibrary.
 boolean hasLibraryAccess(LibraryMemberRole role, UserProfile user)
          Returns true if the user identified by the supplied UserProfile has the indicated role in this library
 boolean hasLibraryResourceAccess(LibraryResourceType type, LibraryMemberRole role, UserProfile user)
          Returns true if the user identified by the supplied UserProfile has the indicated role against the specified resource type of this library
 boolean isDeletionProhibited()
          Indicates if this DocumentLibrary has deletion prohibited.
 boolean isEnabled()
          Indicates if this DocumentLibrary is enabled
 void setDeletionProhibited(boolean isDeletionProhibited)
          Set the DocumentLibrary deletion prohibited status
 void setDescription(java.lang.String description)
          Set the description of this DocumentLibrary
 void setDescriptionTextProviderKey(java.lang.String key)
          Set the text provider key for the description of this DocumentLibrary.
 void setDescriptionTextProviderName(java.lang.String name)
          Set the text provider name for the description of this DocumentLibrary.
 void setEnabled(boolean isEnabled)
          Set the DocumentLibrary enabled status (enable or disable)
 void setLibraryAccess(DocumentLibraryACL acl)
          Set the access control for this DocumentLibrary
 void setLibraryResourceAccess(LibraryResourceType type, DocumentLibraryACL acl)
          Set the access control for the supplied library resource type
 void setTitle(java.lang.String title)
          Set the title of this DocumentLibrary.
 void setTitleTextProviderKey(java.lang.String key)
          Set the text provider key for the title of this DocumentLibrary.
 void setTitleTextProviderName(java.lang.String name)
          Set the text provider name for the title of this DocumentLibrary.
 

Method Detail

getId

java.lang.String getId()
Returns the unique Id of this DocumentLibrary object.

Returns:
the unique id

getName

java.lang.String getName()
Returns the name of this DocumentLibrary object. This is simply the lower-cased title.

Specified by:
getName in interface WCMApiObject
Returns:
the name

getTitle

java.lang.String getTitle()
Returns the title of this DocumentLibrary object.

Returns:
the display title

setTitle

void setTitle(java.lang.String title)
Set the title of this DocumentLibrary. The title is used in the library URL, so only valid URL characters are allowed. Valid characters are a-z, A-Z, 0-9 and the special characters " $-_.+!*(),".

Parameters:
title - Title to be set

getTitle

java.lang.String getTitle(java.util.Locale locale)
Returns the localized title of this DocumentLibrary object. If a text provider has been configured, the localized title retrieved from the text provider will be returned. If no text provider is configured, the non-localized title of this DocumentLibrary object will be returned.

Parameters:
locale - the locale to use when localizing the title
Returns:
the localized title

getTitleTextProviderName

java.lang.String getTitleTextProviderName()
If a text provider has been configured, this method returns the text provider name for the title of this DocumentLibrary. Otherwise, null will be returned.

Returns:
the text provider name for the title
Since:
8.0

setTitleTextProviderName

void setTitleTextProviderName(java.lang.String name)
Set the text provider name for the title of this DocumentLibrary.

Parameters:
name - the text provider name for the title
Since:
8.0

getTitleTextProviderKey

java.lang.String getTitleTextProviderKey()
If a text provider has been configured, this method returns the text provider key for the title of this DocumentLibrary. Otherwise, null will be returned.

Returns:
the text provider key for the title
Since:
8.0

setTitleTextProviderKey

void setTitleTextProviderKey(java.lang.String key)
Set the text provider key for the title of this DocumentLibrary.

Parameters:
key - the text provider key for the title
Since:
8.0

getDescription

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

Returns:
the description

getDescription

java.lang.String getDescription(java.util.Locale locale)
Returns the localized description of this DocumentLibrary object. If a text provider has been configured, the localized description retrieved from the text provider will be returned. If no text provider is configured, the non-localized description of this DocumentLibrary object will be returned.

Parameters:
locale - the locale to use when localizing the description

Returns null if this Document does not have a description.

Returns:
the localized description

setDescription

void setDescription(java.lang.String description)
Set the description of this DocumentLibrary

Parameters:
description - Description to be set

getDescriptionTextProviderName

java.lang.String getDescriptionTextProviderName()
If a text provider has been configured, this method returns the text provider name for the description of this DocumentLibrary. Otherwise, null will be returned.

Returns:
the text provider name for the description
Since:
8.5 CF4

setDescriptionTextProviderName

void setDescriptionTextProviderName(java.lang.String name)
Set the text provider name for the description of this DocumentLibrary.

Parameters:
name - the text provider name for the description
Since:
8.5 CF4

getDescriptionTextProviderKey

java.lang.String getDescriptionTextProviderKey()
If a text provider has been configured, this method returns the text provider key for the description of this DocumentLibrary. Otherwise, null will be returned.

Returns:
the text provider key for the description
Since:
8.5 CF4

setDescriptionTextProviderKey

void setDescriptionTextProviderKey(java.lang.String key)
Set the text provider key for the description of this DocumentLibrary.

Parameters:
key - the text provider key for the description
Since:
8.5 CF4

hasLibraryResourceAccess

boolean hasLibraryResourceAccess(LibraryResourceType type,
                                 LibraryMemberRole role,
                                 UserProfile user)
Returns true if the user identified by the supplied UserProfile has the indicated role against the specified resource type of this library

Checks against the persisted ACL only. Not any unsaved changes

Parameters:
type - The resource type access to check
role - The role to check
user - The user to test
Returns:
true if the user identified by the supplied UserProfile has the indicated role against the specified resource type of this library, false otherwise

getLibraryResourceAccess

DocumentLibraryACL getLibraryResourceAccess(LibraryResourceType type)
Returns the access control object for a library resource (e.g. Authoring Templates)

Parameters:
type - Library resource type
Returns:
a DocumentLibraryACL which represents the requested library resource access control

hasLibraryAccess

boolean hasLibraryAccess(LibraryMemberRole role,
                         UserProfile user)
Returns true if the user identified by the supplied UserProfile has the indicated role in this library

Checks against the persisted ACL only. Not any unsaved changes

Parameters:
role - The role to check
user - The user to test
Returns:
true if the user identified by the supplied UserProfile has the indicated role in this library, false otherwise

getLibraryAccess

DocumentLibraryACL getLibraryAccess()
Returns the access control object for this DocumentLibrary

Returns:
a DocumentLibraryACL which represents the library access control

setLibraryAccess

void setLibraryAccess(DocumentLibraryACL acl)
Set the access control for this DocumentLibrary

Parameters:
acl - the access control object to be set for this library

setLibraryResourceAccess

void setLibraryResourceAccess(LibraryResourceType type,
                              DocumentLibraryACL acl)
Set the access control for the supplied library resource type

Parameters:
type - Library resource type
acl - the access control object to be set for the given library resource

isEnabled

boolean isEnabled()
Indicates if this DocumentLibrary is enabled

Returns:
a flag indicating if this DocumentLibrary is enabled

setEnabled

void setEnabled(boolean isEnabled)
Set the DocumentLibrary enabled status (enable or disable)

Parameters:
isEnabled - Flag indicating if the DocumentLibrary is to be set enabled

isDeletionProhibited

boolean isDeletionProhibited()
Indicates if this DocumentLibrary has deletion prohibited.

Returns:
a flag indicates if this DocumentLibrary has deletion prohibited

setDeletionProhibited

void setDeletionProhibited(boolean isDeletionProhibited)
Set the DocumentLibrary deletion prohibited status

Parameters:
isDeletionProhibited - Flag indicating if the library should prohibit deletion

getLocale

java.util.Locale getLocale()
Returns the Locale of this DocumentLibrary object.

Returns:
the Locale of the library

getPresetFolder

Folder getPresetFolder(com.ibm.workplace.wcm.api.PresetFolderType type)
                       throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                              com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
Returns a reference to the specified preset Folder for the current library

Parameters:
type - the type of Preset Folder to return
Returns:
a reference to the specified preset Folder for the current library.
Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
Since:
7.0

getProperties

LibraryProperties getProperties()
Returns the properties associated with this Library.

Returns:
properties associated with this library.
Since:
8.0