Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.workplace.wcm.api
Interface Workspace

    public interface Workspace

Represents a view of the WCM repository for a particular user. 'Live', 'Read', 'Edit' and 'Delete' access are deprecated. The levels 'User', 'Contributor', 'Editor' and 'Manager' should be used from 6.1.

Since:
  5.1

Field Summary
`static int` | `PENDING_WORKFLOWSTATUS_DELETED` Item is marked for deletion and is pending delete.
`static int` | `PENDING_WORKFLOWSTATUS_EXPIRED` Pending workflow status for expired.
`static int` | `PENDING_WORKFLOWSTATUS_NONE` Pending workflow status for none.
`static int` | `PENDING_WORKFLOWSTATUS_PUBLISHED` Pending workflow status for published.
`static int` | `ROLE_APPROVER` Deprecated. From 8.0 onwards, use the QueryService to query for items.
`static int` | `ROLE_AUTHOR` Deprecated. From 8.0 onwards, use the QueryService to query for items.
`static int` | `ROLE_OWNER` Deprecated. From 8.0 onwards, use the QueryService to query for items.
`static int` | `SECURITY_APPROVER_ACCESS` Deprecated. use `Access.APPROVER` instead
`static int` | `SECURITY_CONTRIBUTOR_ACCESS` Deprecated. use `Access.CONTRIBUTOR` instead
`static int` | `SECURITY_DELETE_ACCESS` Deprecated. Use manager access
`static int` | `SECURITY_EDIT_ACCESS` Deprecated. Use editor access
`static int` | `SECURITY_EDITOR_ACCESS` Deprecated. use `Access.EDITOR` instead
`static int` | `SECURITY_MANAGER_ACCESS` Deprecated. use `Access.MANAGER` instead
`static int` | `SECURITY_READ_ACCESS` Deprecated. Use contributor access
`static int` | `SECURITY_USER_ACCESS` Deprecated. use `Access.USER` instead
`static java.lang.String` | `SORT_KEY_CREATION_DATE` Content Search method sort key for creation date
`static java.lang.String` | `SORT_KEY_DESCRIPTION` Content Search method sort key for description
`static java.lang.String` | `SORT_KEY_EXPIRY_DATE` Content Search method sort key for expiry date
`static java.lang.String` | `SORT_KEY_GENERAL_DATE_ONE` Content Search method sort key for general date one
`static java.lang.String` | `SORT_KEY_GENERAL_DATE_TWO` Content Search method sort key for general date two
`static java.lang.String` | `SORT_KEY_LASTMODIFIED_DATE` Content Search method sort key for last modified date
`static java.lang.String` | `SORT_KEY_NAME` Content Search method sort key for name
`static java.lang.String` | `SORT_KEY_NONE` Content Search method sort key for no sorting
`static java.lang.String` | `SORT_KEY_PUBLISH_DATE` Content Search method sort key for publish date
`static java.lang.String` | `SORT_KEY_TITLE` Content Search method sort key for title
`static java.lang.String` | `WCM_ERROR_KEY` Key for the `String` error message in the page context.
`static java.lang.String` | `WCM_RENDERINGCONTEXT_KEY` Key for the `RenderingContext` in the request.
`static java.lang.String` | `WCM_WORKSPACE_KEY` Key for the `Workspace` in the page context.
`static int` | `WORKFLOWSTATUS_ALL` Workflow status for draft, published or expired.
`static int` | `WORKFLOWSTATUS_DRAFT` Workflow status for draft.
`static int` | `WORKFLOWSTATUS_EXPIRED` Workflow status for expired.
`static int` | `WORKFLOWSTATUS_PUBLISHED` Workflow status for published.

Method Summary
`void` | `clearReferences(Reference[] references)` Clears all the references represented by the array of `Reference` instances.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords)` Returns an iterator of IDs of objects that match the given search criteria.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords, boolean matchAllKeys)` Returns an iterator of IDs of objects that match the given search criteria.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords, boolean matchAllCategories, boolean includeAncestorCategories, boolean includeDescendentCategories, boolean includeAncestorSiteAreas, boolean includeDescendentSiteAreas, java.lang.String sortKey1, java.lang.String sortKey2, java.lang.String sortKey3, boolean sortAscending)` Returns an iterator of IDs of objects that match the given search criteria.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords, boolean matchAllCategories, boolean includeAncestorCategories, boolean includeDescendentCategories, boolean includeAncestorSiteAreas, boolean includeDescendentSiteAreas, java.lang.String sortKey1, java.lang.String sortKey2, java.lang.String sortKey3, boolean sortAscending, int workflowStatusFilter)` Returns an iterator of IDs of objects that match the given search criteria.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords, boolean matchAllCategories, boolean includeAncestorSiteAreas, boolean includeDescendantSiteAreas, java.lang.String sortKey1, java.lang.String sortKey2, java.lang.String sortKey3, boolean sortAscending)` Returns an iterator of IDs of objects that match the given search criteria.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords, boolean matchAllKeys, int workflowStatusFilter)` Returns an iterator of IDs of objects that match the given search criteria.
`DocumentIdIterator<Content>` | `contentSearch(DocumentId templateId, DocumentId[] siteAreaIds, DocumentId[] categoryIds, java.lang.String[] keywords, int workflowStatusFilter)` Returns an iterator of IDs of objects that match the given search criteria.
`
`<T extends Document> T`
` | `copy(DocumentId<T> documentId, DocumentId newParentId)` Copies a document and adds it under a new parent.
`Document` | `copy(Placeable doc, PlacementLocation location, CopyOptions copyOptions)` Copies the supplied `Positionable` document to the target location according to the rules specified by the `copyOptions` parameter.
`
`<T extends Document> T`
` | `copy(T doc, ParentLocation location, CopyOptions copyOptions)` Copies the supplied document to the new parent according to the rules specified by the `copyOptions` parameter.
`Document` | `copyCategory(DocumentId categoryId, DocumentId newParentId)` Deprecated. use Workspace.copy(Document, ParentLocation, CopyOptions) instead.
`Document` | `copySiteFrameworkDocument(DocumentId docId, DocumentId newParentId, DocumentId siblingId, int position)` Deprecated. use Workspace.copy(Placeable, PlacementLocation, CopyOptions) instead.
`
`<T extends Document> Document`
` | `copyToLibrary(DocumentLibrary target, DocumentId<T> docId)` This method copies non-hierarchical or root items to another library.
`
`<T extends Document> Document`
` | `copyToLibrary(DocumentLibrary target, DocumentId<T> docId, CopyOptions copyOptions)` This method copies non-hierarchical or root items to another library.
`AuthoringTemplate` | `createAuthoringTemplate()` Creates a new `AuthoringTemplate`.
`Category` | `createCategory(DocumentId parentId)` Creates a new `Category` under the given parent.
`Content` | `createContent(DocumentId contentTemplateId)` Deprecated. use `createContent(contentTemplateId, parentSiteAreaId, siblingId, position)` instead.
`Content` | `createContent(DocumentId contentTemplateId, DocumentId parentSiteAreaId, DocumentId siblingId, int position)` Creates a new `Content` object, based on a `AuthoringTemplate` in the parent `SiteArea`.
`ContentLink` | `createContentLink(DocumentId contentId, DocumentId parentSiteAreaId, DocumentId siblingId, int position)` Creates a new `ContentLink` object, linked to the given `Content`.
`ContentLink` | `createContentLink(DocumentId contentId, DocumentId parentSiteAreaId, DocumentId siblingId, int position, LinkOptions linkOptions)` Creates a new `ContentLink` object, linked to the given `Content`.
`LibraryDateComponent` | `createDateComponent()` Creates a new `LibraryDateComponent`.
`
`<T extends Document> DocumentId<T>`
` | `createDocumentId(java.lang.String stringId)` Creates a new `DocumentId` object from a `String` representation of the ID.
`
`<T extends Document> DocumentIdIterator<T>`
` | `createDocumentIdIterator(DocumentId<T>[] documentIds)` Create a new `DocumentIdIterator` from an array of given `DocumentId`.``
`LibraryDocumentManagerComponent` | `createDocumentManagerComponent()` Deprecated. LibraryDocumentManagerComponent is deprecated since 7.0
`LibraryFileComponent` | `createFileComponent()` Creates a new `LibraryFileComponent`.
`Folder` | `createFolder(DocumentId parentId)` Create a folder object under the specified parent folder.
`Folder` | `createFolder(Folder parent)` Create a folder object under the specified parent folder.
`LibraryHTMLComponent` | `createHTMLComponent()` Creates a new `LibraryHTMLComponent`.
`LibraryImageComponent` | `createImageComponent()` Creates a new `LibraryImageComponent`.
`LibraryJSPComponent` | `createJSPComponent()` Creates a new `LibraryJSPComponent`.
`LibraryLinkComponent` | `createLinkComponent()` Creates a new `LibraryLinkComponent`.
`LibraryListPresentationComponent` | `createListPresentationComponent()` Creates a new `LibraryListPresentationComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.
`LibraryMenuComponent` | `createMenuComponent()` Creates a new `LibraryMenuComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.
`LibraryNavigatorComponent` | `createNavigatorComponent()` Creates a new `LibraryNavigatorComponent`.
`LibraryNumericComponent` | `createNumericComponent()` Creates a new `LibraryNumericComponent`.
`LibraryPersonalizationComponent` | `createPersonalizationComponent()` Creates a new `LibraryPersonalizationComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.
`PresentationTemplate` | `createPresentationTemplate()` Creates a new `PresentationTemplate`.
`RenderingContext` | `createRenderingContext(PortletRequest request, PortletResponse response, java.util.Map requestParameters)` Creates a new rendering context.
`RenderingContext` | `createRenderingContext(PortletRequest request, PortletResponse response, java.util.Map requestParameters, java.lang.String wcmWebAppPath, java.lang.String wcmServletPath)` Creates a new rendering context.
`RenderingContext` | `createRenderingContext(ServletRequest request, ServletResponse response, java.util.Map requestParameters)` Creates a new rendering context.
`RenderingContext` | `createRenderingContext(ServletRequest request, ServletResponse response, java.util.Map requestParameters, java.lang.String wcmWebAppPath, java.lang.String wcmServletPath)` Creates a new rendering context.
`LibraryRichTextComponent` | `createRichTextComponent()` Creates a new `LibraryRichTextComponent`.
`LibrarySearchComponent` | `createSearchComponent()` Creates a new `LibrarySearchComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.
`LibraryShortTextComponent` | `createShortTextComponent()` Creates a new `LibraryShortTextComponent`.
`Site` | `createSite()` Deprecated. use `createSiteArea()` instead.
`SiteArea` | `createSiteArea()` Creates a new top-level `SiteArea`.
`SiteArea` | `createSiteArea(DocumentId siteAreaTemplateId)` Creates a new top-level `SiteArea` with the given existing site area template.
`SiteArea` | `createSiteArea(DocumentId siteAreaTemplateId, DocumentId parentId, DocumentId siblingId, int position)` Creates a new `SiteArea` under the given parent with a given existing site area template.
`SiteArea` | `createSiteArea(DocumentId parentId, DocumentId siblingId, int position)` Creates a new `SiteArea` under the given parent.
`SiteAreaTemplate` | `createSiteAreaTemplate()` Creates a new `SiteAreaTemplate`.
`LibraryStyleSheetComponent` | `createStyleSheetComponent()` Creates a new `LibraryStyleSheetComponent`.
`Taxonomy` | `createTaxonomy()` Creates a new `Taxonomy`.
`LibraryTextComponent` | `createTextComponent()` Creates a new `LibraryTextComponent`.
`LibraryUserSelectionComponent` | `createUserSelectionComponent()` Creates a new `LibraryUserSelectionComponent`.
`Workflow` | `createWorkflow()` Creates a new `Workflow`.
`WorkflowStage` | `createWorkflowStage()` Creates a new `WorkflowStage`.
`java.lang.String[]` | `delete(DocumentId id)` Deletes an editable document from the WCM repository.
`boolean` | `exists(DocumentId<? extends Document> id)` Tests the existence of an document in the repository.
`boolean` | `exists(java.lang.String id)` Return `true` if object with given ID exists.
`DocumentIdIterator` | `findAllByPath(java.lang.String namePath, DocumentType documentType, int workflowStatusFilter, DocumentLibrary[] documentLibraries)` Returns a `DocumentIdIterator` for the items on the supplied relative name path in the supplied document libraries.
`DocumentIdIterator` | `findByName(DocumentType type, java.lang.String name)` Returns an iterator of IDs of all objects of the given type with the specified name.
`DocumentIdIterator` | `findByName(DocumentType type, java.lang.String name, int workflowStatusFilter)` Returns an iterator of IDs of all objects of the given type with the specified name that match the given workflow status filter.
`
`<T extends Document> DocumentIdIterator<T>`
` | `findByPath(java.lang.String namePath, int workflowStatusFilter)` Returns an iterator of `DocumentId` for a given name path and workflow status.
`DocumentIdIterator` | `findByType(DocumentType type)` Returns an iterator of IDs of all objects of the given type.
`DocumentIdIterator` | `findByType(DocumentType type, int workflowStatusFilter)` Returns an iterator of IDs of all objects of the given type that match the given workflow status filter.
`DocumentIdIterator` | `findComponentByName(java.lang.String name)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(LibraryComponent.class).addSelector(Selectors.nameLike(name)); queryService.execute(query);
`DocumentIdIterator` | `findContentByAuthoringTemplate(DocumentId id)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(Selectors.authoringTemplateIn(id)); queryService.execute(query);
`DocumentIdIterator` | `findContentByAuthoringTemplate(DocumentId id, int workflowStatusFilter)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(Selectors.authoringTemplateIn(id), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);
`DocumentIdIterator` | `findContentByCategory(DocumentId id)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(ProfileSelectors.categoriesContains(id)); queryService.execute(query);
`DocumentIdIterator` | `findContentByCategory(DocumentId id, int workflowStatusFilter)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(ProfileSelectors.categoriesContains(id), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);
`DocumentIdIterator<Content>` | `findContentByPath(java.lang.String namePath)` Returns an iterator of IDs of `Content` with the given name path.
`DocumentIdIterator` | `findContentByWorkflowStage(DocumentId id)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageEquals(id)); queryService.execute(query);
`DocumentIdIterator` | `findContentByWorkflowStage(DocumentId[] ids)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageContains(ids)); queryService.execute(query);
`DocumentIdIterator` | `findContentByWorkflowStage(DocumentId[] workflowStages, java.lang.String[] users, int userRoles)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); [for userRoles=ROLE_AUTHOR] Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.authorsContain(users)); [for userRoles=ROLE_OWNER] Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.ownersContain(users)); [for userRoles=ROLE_APPROVER] Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageIn(workflowStages), WorkflowSelectors.statusEquals(Status.DRAFT), WorkflowSelectors.approversContains(users)); WorkflowSelectors.approversContains queryService.execute(query);
`DocumentIdIterator` | `findContentModifiedBetween(java.util.Date startDate, java.util.Date endDate)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate)); queryService.execute(query);
`DocumentIdIterator` | `findContentModifiedBetween(java.util.Date startDate, java.util.Date endDate, int workflowStatusFilter)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);
`DocumentIdIterator` | `findContentModifiedSince(java.util.Date modifiedDate)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(HistorySelectors.modifiedSince(modifiedDate)); queryService.execute(query);
`DocumentIdIterator` | `findContentModifiedSince(java.util.Date modifiedDate, int workflowStatusFilter)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelectors(HistorySelectors.modifiedSince(modifiedDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);
`DocumentIdIterator` | `findDocumentsByWorkflowStage(DocumentId[] ids)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(WorkflowSelectors.stageIn(ids)); queryService.execute(query);
`DocumentIdIterator` | `findDocumentsByWorkflowStage(DocumentId[] workflowStages, java.lang.String[] users, int userRoles)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); [for userRoles=ROLE_AUTHOR] Query query = createQuery().addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.authorsContain(users)); [for userRoles=ROLE_OWNER] Query query = createQuery().addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.ownersContain(users)); [for userRoles=ROLE_APPROVER] Query query = createQuery().addSelector(WorkflowSelectors.stageIn(workflowStages), WorkflowSelectors.statusEquals(Status.DRAFT), WorkflowSelectors.approversContains(users)); WorkflowSelectors.approversContains queryService.execute(query);
`DocumentIdIterator` | `findDocumentsModifiedBetween(java.util.Date startDate, java.util.Date endDate)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate)); queryService.execute(query);
`DocumentIdIterator` | `findDocumentsModifiedBetween(java.util.Date startDate, java.util.Date endDate, int workflowStatusFilter)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);
`DocumentIdIterator` | `findDocumentsModifiedSince(java.util.Date modifiedDate)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate)); queryService.execute(query);
`DocumentIdIterator` | `findDocumentsModifiedSince(java.util.Date modifiedDate, int workflowStatusFilter)` Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);
`
`<T extends Document> DocumentIdIterator<T>`
` | `findItemsDeletedBefore(java.util.Date deletedBeforeDate, DocumentType<T> documentType, DocumentId workflowStage)` Returns a DocumentIdIterator of deleted documents restricted by date, document type and workflow stage.
`
`<T extends Document> DocumentIdIterator<T>`
` | `findItemsDeletedBetween(java.util.Date deletedStartDate, java.util.Date deletedEndDate, DocumentType<T> documentType, DocumentId workflowStage)` Returns a DocumentIdIterator of documents restricted by date, workflow stage and document type
`
`<T extends Document> DocumentIdIterator<T>`
` | `findItemsDeletedSince(java.util.Date deletedSinceDate, DocumentType<T> documentType, DocumentId workflowStage)` Returns a DocumentIdIterator of documents restricted by date, workflow stage and document type
`
`<T extends WCMApiObject> DocumentType<T>`
` | `fromString(java.lang.String typeName)` Returns the `DocumentType` for the specified API interface/class name.
`java.lang.String` | `generateURL(RenderingContext context, ContentComponent component)` Generate the URL to the given component, in the context of the path in the `RenderingContext`.
`java.lang.String` | `generateURL(RenderingContext context, LibraryComponent component)` Generate the URL to the given component, in the context of the path in the `RenderingContext`.
`Reference[]` | `getBranchReferences(DocumentId<? extends Document> documentId)` Returns an array of `Reference` instances that are references from items outside of the specified branch to the root of the branch or any of the items within the branch.
`Reference[]` | `getBranchReferences(DocumentLibrary library)` Returns an array of `Reference` instances that are references from items outside of the specified `DocumentLibrary` to the `DocumentLibrary` or any of the items within the branch.
`
`<T extends Document> T`
` | `getById(DocumentId<T> id)` Return object for the given Id.
`
`<T extends Document> T`
` | `getById(DocumentId<T> id, boolean asReference)` Return object for the given Id.
`
`<T extends Document> T`
` | `getById(DocumentId<T> id, boolean asReference, boolean loadElements)` Return object for the given Id.
`
`<T extends Document> DocumentIterator<T>`
` | `getByIds(DocumentIdIterator<T> documentIdIterator, boolean asReference)` Return the list of `Document` objects for the given `DocumentId`s as a `DocumentIterator`.
`
`<T extends Document> DocumentIterator<T>`
` | `getByIds(DocumentIdIterator<T> documentIdIterator, boolean asReference, boolean loadElements)` Return the list of `Document` objects for the given `DocumentId`s as a `DocumentIterator`.
`DocumentLibrary` | `getCurrentDocumentLibrary()` Returns the current `DocumentLibrary`, which is being used for all operations except rendering.
`java.util.Iterator<DocumentLibrary>` | `getDocumentLibraries()` Returns an iterator of all `DocumentLibrary` objects visible to the user of this `Workspace`.
`DocumentLibrary` | `getDocumentLibrary(java.lang.String libraryName)` Returns the `DocumentLibrary` with the specified name or title, or `null` if a `DocumentLibrary` with that name or title does not exist or the caller does not have access
`
`<T extends Document> DocumentId<T>`
` | `getDraftIdByPublishedId(DocumentId<T> id)` Deprecated. Use `getDraftIdsByPublishedId(com.ibm.workplace.wcm.api.DocumentId)`
`
`<T extends Document> DocumentId<T>`
` | `getDraftIdByPublishedId(DocumentId<T> id, DocumentId<Project> projectId)` Returns the `DocumentId` of the draft document associated with the supplied published/expired and project `DocumentId`.
`
`<T extends Document> DocumentIdIterator<T>`
` | `getDraftIdsByPublishedId(DocumentId<T> id)` Returns the `DocumentIdIterator` of the draft documents associated with the supplied published/expired `DocumentId`
`IdentityBuilder` | `getIdentityBuilder()` Get an identity builder, which allows conversion between DocumentId's and ReST URIs.
`java.lang.String[]` | `getMemberNames()` Deprecated. Use the PUMA API
`java.lang.String[]` | `getMemberNames(java.lang.String filter)` Deprecated. Use the PUMA API
`java.lang.String` | `getPathById(DocumentId<? extends Document> id, boolean maintainCase, boolean decodeURL)` Returns the 'name' path of the document with the given id.
`DocumentId` | `getProjectId()` Returns the `DocumentId` of the `Project` associated with this `Workspace`
`
`<T extends Document> DocumentId<T>`
` | `getPublishedIdByDraftId(DocumentId<T> id)` Returns the `DocumentId` of the published or expired document associated with the supplied draft `DocumentId`
`QueryService` | `getQueryService()` Obtains an instance of `QueryService` which is associated with this workspace.
`Reference[]` | `getReferences(DocumentId<? extends Document> documentId)` Returns an array of `Reference` instances that represent all references to the specified `DocumentId`.
`Reference[]` | `getReferencesFrom(DocumentId<? extends Document> documentId)` Returns an array of `Reference` instances that represent all references from the specified `DocumentId`.
`java.lang.String` | `getTitlePathById(DocumentId id, java.util.Locale locale)` Returns the 'Display Title' path of the document with the given id.
`UserProfile` | `getUserProfile()` Returns the `UserProfile` for the user of this `Workspace`.
`VersioningService` | `getVersioningService()` Obtains an instance of `VersioningService` which is associated with this workspace.
`boolean` | `hasAccess(DocumentId<? extends Document> id, Access access)` Checks if the user of the `Workspace` has the specified access to specified document.
`boolean` | `hasAccess(DocumentId<? extends Document> id, int securityAccessType)` Deprecated. since 8.5 use `hasAccess(DocumentId, Access)` instead
`boolean` | `hasAccess(DocumentId<? extends Document> id, UserProfile profile, Access access)` Checks if the `UserProfile` has the specified access to specified document.
`boolean` | `hasAccess(DocumentId<? extends Document> id, UserProfile user, int securityAccessType)` Deprecated. since 8.5 `hasAccess(DocumentId, UserProfile, Access)` instead
`boolean` | `hasContributorAccess(DocumentId<? extends Document> documentId)` Checks if user associated with the workspace has Contributor Acccess to the given DocumentId
`boolean` | `hasDocumentLibrary(java.lang.String libraryName)` Indicates if there is a `DocumentLibrary` with the specified name
`boolean` | `hasDraftIdByPublishedId(DocumentId<? extends Document> id, DocumentId<Project> projectId)` Returns `true` if a draft document associated with the supplied published/expired and project `DocumentId` exists.
`boolean` | `hasDraftIdsByPublishedId(DocumentId<? extends Document> id)` Returns `true` if a draft document associated with the supplied published/expired `DocumentId` exists
`boolean` | `hasEditorAccess(DocumentId<? extends Document> documentId)` Checks if user associated with the workspace has Editor Acccess to the given DocumentId
`boolean` | `hasManagerAccess(DocumentId<? extends Document> documentId)` Checks if user associated with the workspace has Manager Acccess to the given DocumentId
`boolean` | `hasPublishedIdByDraftId(DocumentId<? extends Document> id)` Returns `true` if a published or expired document associated with the supplied draft `DocumentId` exists
`boolean` | `hasUserAccess(DocumentId<? extends Document> documentId)` Checks if user associated with the workspace has User Acccess to the given DocumentId
`boolean` | `isDistinguishedNamesUsed()` Indicates whether this `Workspace` is set to use distinguished names for users Returns `true` if this `Workspace` is set to use distinguished names rather than their common names.
`boolean` | `isLocked(DocumentId<? extends Document> docId)` Indicates whether the `DocumentId` provided is locked or not
`boolean` | `isLoggedIntoWorkspace()` Indicates whether this `Workspace` has been logged into on the current thread.
`boolean` | `isMemberOfGroup(java.lang.String groupName)` Indicates if the user of this `Workspace` is a member of the group with the specified name.
`boolean` | `isSystemWorkspace()` Returns `true` if this `Workspace` will act with system credentials Indicates this `Workspace` will perform operations with system credentials.
`void` | `lock(DocumentId<? extends Document> docId)` Locks the document (draft or non-draft) provided by the `DocumentId`.
`void` | `login()` Performs a login at the Workspace level.
`void` | `logout()` Performs a logout at the Workspace level
`void` | `move(DocumentId<? extends Document> documentId, DocumentId<? extends Document> newParentId)` Moves a document and adds it under a new parent.
`void` | `move(Document doc, ParentLocation location, MoveOptions moveOptions)` Moves the supplied document to the new parent according to the rules specified by the `moveOptions` parameter.
`void` | `move(Placeable doc, PlacementLocation location, MoveOptions moveOptions)` Moves the supplied `Placeable` document to the target location according to the rules specified by the `moveOptions` parameter.
`void` | `moveCategory(DocumentId categoryId, DocumentId newParentId)` Deprecated. Use Workspace.move instead
`void` | `moveSiteFrameworkDocument(DocumentId docId, DocumentId newParentId, DocumentId siblingId, int position)` Deprecated. use Workspace.move(Placeable, PlacementLocation, MoveOptions) instead.
`void` | `moveToLibrary(DocumentLibrary target, DocumentId<? extends Document> docId)` This method moves non-hierarchical or root items to another library.
`java.lang.String[]` | `purge(DocumentId<? extends Document> id)` Purges an item with the given `DocumentId`.
`java.lang.String` | `render(RenderingContext renderingContext)` Renders the content, according to the `RenderingContext` that is passed in.
`java.lang.String` | `render(RenderingContext renderingContext, ContentComponent component)` Renders the given WCM content component using the specified rendering context.
`java.lang.String` | `render(RenderingContext renderingContext, LibraryComponent component)` Renders the specified WCM `LibraryComponent` using the specified `RenderingContext`.
`void` | `replaceReferences(Reference[] references, DocumentId<? extends Document> newRefereeId)` Replaces all the references represented by the array of `Reference` instances with the new object represented by the specified `DocumentId`.
`java.lang.String[]` | `save(Document object)` Saves an editable document to the WCM repository.
`java.lang.String[]` | `save(Document object, DocumentId parent, SaveOptions saveOptions)` Save the given object with specific options.
`void` | `setCurrentDocumentLibrary(DocumentLibrary library)` Sets the current `DocumentLibrary` for this `Workspace`.
`void` | `setProjectId(DocumentId projectId)` Sets the `Project` associated with this `Workspace` from henceforth.
`void` | `unlock(DocumentId<? extends Document> docId)` Unlocks the document (draft or non-draft) provided by the `DocumentId`.
`void` | `useDistinguishedNames(boolean distinguishedNames)` Sets the `Workspace` to use distinguished names users.
`void` | `useLiveAccess(boolean liveAccess)` Deprecated. use `useUserAccess(boolean userAccess)`
`void` | `useUserAccess(boolean userAccess)` Sets the Access context to use for the following methods.

Field Detail

### WCM_WORKSPACE_KEY

    static final java.lang.String WCM_WORKSPACE_KEY

  Key for the `Workspace` in the page context. For example: Workspace workspace = (Workspace) pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY);

  See Also:
    Constant Field Values

### WCM_RENDERINGCONTEXT_KEY

    static final java.lang.String WCM_RENDERINGCONTEXT_KEY

  Key for the `RenderingContext` in the request. For example: RenderingContext renderingContext = (RenderingContext) request.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);

  See Also:
    Constant Field Values

### WCM_ERROR_KEY

    static final java.lang.String WCM_ERROR_KEY

  Key for the `String` error message in the page context. This is set by WCM tags to indicate errors encountered during tag resolution. For example: String errorMessage = (String) pageContext.getAttribute(Workspace.WCM_ERROR_KEY);

  See Also:
    Constant Field Values

### ROLE_OWNER

    @Deprecated
    static final int ROLE_OWNER

  Deprecated. From 8.0 onwards, use the QueryService to query for items.
  Constant for querying for Content Owner

  See Also:
    Constant Field Values

### ROLE_AUTHOR

    @Deprecated
    static final int ROLE_AUTHOR

  Deprecated. From 8.0 onwards, use the QueryService to query for items.
  Constant for querying for Content Author

  See Also:
    Constant Field Values

### ROLE_APPROVER

    @Deprecated
    static final int ROLE_APPROVER

  Deprecated. From 8.0 onwards, use the QueryService to query for items.
  Constant for querying for Content Approver

  See Also:
    Constant Field Values

### WORKFLOWSTATUS_DRAFT

    static final int WORKFLOWSTATUS_DRAFT

  Workflow status for draft. These constants can be bit-OR'ed together.

  See Also:
    Constant Field Values

### WORKFLOWSTATUS_PUBLISHED

    static final int WORKFLOWSTATUS_PUBLISHED

  Workflow status for published. These constants can be bit-OR'ed together.

  See Also:
    Constant Field Values

### WORKFLOWSTATUS_EXPIRED

    static final int WORKFLOWSTATUS_EXPIRED

  Workflow status for expired. These constants can be bit-OR'ed together.

  See Also:
    Constant Field Values

### WORKFLOWSTATUS_ALL

    static final int WORKFLOWSTATUS_ALL

  Workflow status for draft, published or expired. These constants can be bit-OR'ed together.

  See Also:
    Constant Field Values

### PENDING_WORKFLOWSTATUS_NONE

    static final int PENDING_WORKFLOWSTATUS_NONE

  Pending workflow status for none.

  See Also:
    Constant Field Values

### PENDING_WORKFLOWSTATUS_PUBLISHED

    static final int PENDING_WORKFLOWSTATUS_PUBLISHED

  Pending workflow status for published.

  See Also:
    Constant Field Values

### PENDING_WORKFLOWSTATUS_EXPIRED

    static final int PENDING_WORKFLOWSTATUS_EXPIRED

  Pending workflow status for expired.

  See Also:
    Constant Field Values

### PENDING_WORKFLOWSTATUS_DELETED

    static final int PENDING_WORKFLOWSTATUS_DELETED

  Item is marked for deletion and is pending delete.

  See Also:
    Constant Field Values

### SECURITY_READ_ACCESS

    @Deprecated
    static final int SECURITY_READ_ACCESS

  Deprecated. Use contributor access
  Security read access

  See Also:
    Constant Field Values

### SECURITY_EDIT_ACCESS

    @Deprecated
    static final int SECURITY_EDIT_ACCESS

  Deprecated. Use editor access
  Security edit access

  See Also:
    Constant Field Values

### SECURITY_DELETE_ACCESS

    @Deprecated
    static final int SECURITY_DELETE_ACCESS

  Deprecated. Use manager access
  Security delete access

  See Also:
    Constant Field Values

### SECURITY_USER_ACCESS

    @Deprecated
    static final int SECURITY_USER_ACCESS

  Deprecated. use `Access.USER` instead
  Security USER access

  See Also:
    Constant Field Values

### SECURITY_CONTRIBUTOR_ACCESS

    @Deprecated
    static final int SECURITY_CONTRIBUTOR_ACCESS

  Deprecated. use `Access.CONTRIBUTOR` instead
  Security CONTRIBUTOR access

  See Also:
    Constant Field Values

### SECURITY_EDITOR_ACCESS

    @Deprecated
    static final int SECURITY_EDITOR_ACCESS

  Deprecated. use `Access.EDITOR` instead
  Security EDITOR access

  See Also:
    Constant Field Values

### SECURITY_MANAGER_ACCESS

    @Deprecated
    static final int SECURITY_MANAGER_ACCESS

  Deprecated. use `Access.MANAGER` instead
  Security MANAGER access

  See Also:
    Constant Field Values

### SECURITY_APPROVER_ACCESS

    @Deprecated
    static final int SECURITY_APPROVER_ACCESS

  Deprecated. use `Access.APPROVER` instead
  Security APPROVER access

  See Also:
    Constant Field Values

### SORT_KEY_CREATION_DATE

    static final java.lang.String SORT_KEY_CREATION_DATE

  Content Search method sort key for creation date

  See Also:
    Constant Field Values

### SORT_KEY_PUBLISH_DATE

    static final java.lang.String SORT_KEY_PUBLISH_DATE

  Content Search method sort key for publish date

  See Also:
    Constant Field Values

### SORT_KEY_EXPIRY_DATE

    static final java.lang.String SORT_KEY_EXPIRY_DATE

  Content Search method sort key for expiry date

  See Also:
    Constant Field Values

### SORT_KEY_GENERAL_DATE_ONE

    static final java.lang.String SORT_KEY_GENERAL_DATE_ONE

  Content Search method sort key for general date one

  See Also:
    Constant Field Values

### SORT_KEY_GENERAL_DATE_TWO

    static final java.lang.String SORT_KEY_GENERAL_DATE_TWO

  Content Search method sort key for general date two

  See Also:
    Constant Field Values

### SORT_KEY_LASTMODIFIED_DATE

    static final java.lang.String SORT_KEY_LASTMODIFIED_DATE

  Content Search method sort key for last modified date

  See Also:
    Constant Field Values

### SORT_KEY_NAME

    static final java.lang.String SORT_KEY_NAME

  Content Search method sort key for name

  See Also:
    Constant Field Values

### SORT_KEY_TITLE

    static final java.lang.String SORT_KEY_TITLE

  Content Search method sort key for title

  See Also:
    Constant Field Values

### SORT_KEY_DESCRIPTION

    static final java.lang.String SORT_KEY_DESCRIPTION

  Content Search method sort key for description

  See Also:
    Constant Field Values

### SORT_KEY_NONE

    static final java.lang.String SORT_KEY_NONE

  Content Search method sort key for no sorting

  See Also:
    Constant Field Values

Method Detail

### createContent

    @Deprecated
    Content createContent(DocumentId contentTemplateId)
                          throws DocumentCreationException,
                                 AuthorizationException,
                                 IllegalDocumentTypeException

  Deprecated. use `createContent(contentTemplateId, parentSiteAreaId, siblingId, position)` instead.

  Creates a new `Content` object, based on an `AuthoringTemplate`. The template ID that is specified must be for a template that already exists in the WCM system. The content is then placed using the `addContent` and `insertContent` methods on `SiteArea`.

  Parameters:
    `contentTemplateId` - the content authoring template ID
  Returns:
    a new `Content` object based on the specified template
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
    `java.lang.IllegalArgumentException` - if the specified `DocumentId` is null
    `IllegalDocumentTypeException` - if the template is not a `AuthoringTemplate`

### createContent

    Content createContent(DocumentId contentTemplateId,
                          DocumentId parentSiteAreaId,
                          DocumentId siblingId,
                          int position)
                          throws DocumentCreationException,
                                 AuthorizationException,
                                 IllegalDocumentTypeException

  Creates a new `Content` object, based on a `AuthoringTemplate` in the parent `SiteArea`. The template ID that is specified must be for a template that already exists in the WCM system.

  If the `ChildPosition` is `ChildPosition.BEFORE` or `ChildPosition.AFTER`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `ChildPosition` is `ChildPosition.START` or `ChildPosition.END` then the `siblingId` parameter will be ignored.

  Parameters:
    `contentTemplateId` - the content authoring template ID
    `parentSiteAreaId` - the parent site area ID
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (See `ChildPosition`)
  Returns:
    a new `Content` object based on the specified template
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
    `java.lang.IllegalArgumentException` - if the specified `DocumentId` is null
    `IllegalDocumentTypeException` - if specified template is not a `AuthoringTemplate` or the parentSiteArea is not a `SiteArea`, or the sibling is not a `Content` or `ContentLink`.

### createContentLink

    ContentLink createContentLink(DocumentId contentId,
                                  DocumentId parentSiteAreaId,
                                  DocumentId siblingId,
                                  int position)
                                  throws DocumentCreationException,
                                         AuthorizationException,
                                         IllegalDocumentTypeException

  Creates a new `ContentLink` object, linked to the given `Content`. The `Content` must be saved before creating a link to it. The `ContentLink` is created immediately, and should not be saved.

  If the `ChildPosition` is `ChildPosition.BEFORE` or `ChildPosition.AFTER`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `ChildPosition` is `ChildPosition.START` or `ChildPosition.END` then the `siblingId` parameter, if it is not `null`, will be ignored.

  Parameters:
    `contentId` - the linked `Content`'s ID
    `parentSiteAreaId` - the parent site area ID
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (See `ChildPosition`)
  Returns:
    a new `ContentLink` object
  Throws:
    `DocumentCreationException` - if the `ContentLink` can not be created
    `AuthorizationException` - if the user does not have access to perform this operation
    `IllegalDocumentTypeException` - if contentId is not a `Content` ID, or the parentSiteAreaId is not a `SiteArea` ID, or the siblingId is not a `Content` or `ContentLink`.

### createContentLink

    ContentLink createContentLink(DocumentId contentId,
                                  DocumentId parentSiteAreaId,
                                  DocumentId siblingId,
                                  int position,
                                  LinkOptions linkOptions)
                                  throws DocumentCreationException,
                                         AuthorizationException,
                                         IllegalDocumentTypeException

  Creates a new `ContentLink` object, linked to the given `Content`. The `Content` must be saved before creating a link to it. The `ContentLink` is created immediately, and should not be saved.

  If the `ChildPosition` is `ChildPosition.BEFORE` or `ChildPosition.AFTER`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `ChildPosition` is `ChildPosition.START` or `ChildPosition.END` then the `siblingId` parameter, if it is not `null`, will be ignored.

  Parameters:
    `contentId` - the linked `Content`'s ID
    `parentSiteAreaId` - the parent site area ID
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (`docId`)
    `linkOptions` - Specifies optional parameters for the link creation. Can be `Null` or an empty `LinkOptions` object
  Returns:
    a new `ContentLink` object
  Throws:
    `DocumentCreationException` - if the `ContentLink` can not be created
    `AuthorizationException` - if the user does not have access to perform this operation
    `IllegalDocumentTypeException` - if contentId is not a `Content` ID, or the parentSiteAreaId is not a `SiteArea` ID, or the siblingId is not a `Content` or `ContentLink`.

### createSiteArea

    SiteArea createSiteArea()
                            throws DocumentCreationException,
                                   AuthorizationException

  Creates a new top-level `SiteArea`. By default the object is positioned directly under the content folder when it is saved. The `SiteArea` may be positioned in the site framework by finding the desired parent object, and calling the `insertSiteArea` method on `SiteFrameworkContainer`, though this behaviour is deprecated and should be achieved using `createSiteArea(parentId, siblingId, position)` instead.

  Returns:
    the new `SiteArea` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createSiteArea

    SiteArea createSiteArea(DocumentId siteAreaTemplateId)
                            throws DocumentCreationException,
                                   AuthorizationException,
                                   IllegalDocumentTypeException

  Creates a new top-level `SiteArea` with the given existing site area template. The object will be positioned directly under the content folder when it is saved. The `ChildPosition` must be either `ChildPosition.START` or `ChildPosition.END`, since no sibling can be specified using this method. If it is not, then an `IllegalArgumentException` will be thrown.

  Parameters:
    `siteAreaTemplateId` - the site area authoring template ID
  Returns:
    the new `SiteArea` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
    `java.lang.IllegalArgumentException` - if the specified `DocumentId` is null
    `IllegalDocumentTypeException` - if the specified template is not a `SiteAreaTemplate`

### createSiteArea

    SiteArea createSiteArea(DocumentId parentId,
                            DocumentId siblingId,
                            int position)
                            throws DocumentCreationException,
                                   AuthorizationException,
                                   IllegalDocumentTypeException

  Creates a new `SiteArea` under the given parent. The parent can be a Site or a SiteArea. The default site area template will be used.

  If the `ChildPosition` is `ChildPosition.BEFORE` or `ChildPosition.AFTER`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `ChildPosition` is `ChildPosition.START` or `ChildPosition.END` then the `siblingId` parameter will be ignored.

  Parameters:
    `parentId` - ID of the parent Site or SiteArea
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (See `ChildPosition`)
  Returns:
    the new `SiteArea` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
    `IllegalDocumentTypeException` - if the specified parent is not a `Site` or `SiteArea`

### createSiteArea

    SiteArea createSiteArea(DocumentId siteAreaTemplateId,
                            DocumentId parentId,
                            DocumentId siblingId,
                            int position)
                            throws DocumentCreationException,
                                   AuthorizationException,
                                   IllegalDocumentTypeException

  Creates a new `SiteArea` under the given parent with a given existing site area template. The parent can be a Site or a SiteArea.

  If the `ChildPosition` is `ChildPosition.BEFORE` or `ChildPosition.AFTER`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `ChildPosition` is `ChildPosition.START` or `ChildPosition.END` then the `siblingId` parameter, if it is not `null`, will be ignored.

  Parameters:
    `siteAreaTemplateId` - the site area authoring template ID
    `parentId` - ID of the parent Site or SiteArea
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (See `ChildPosition`)
  Returns:
    the new `SiteArea` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
    `java.lang.IllegalArgumentException` - if the specified `DocumentId` is null
    `IllegalDocumentTypeException` - if the specified template is not a `SiteAreaTemplate`, or if the specified parent is not a `Site or `SiteArea``

### createSite

    @Deprecated
    Site createSite()
                    throws DocumentCreationException,
                           AuthorizationException

  Deprecated. use `createSiteArea()` instead.

  Creates a new `Site`. The new `Site` is returned.

  Returns:
    the new `Site` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createFileComponent

    LibraryFileComponent createFileComponent()
                                             throws DocumentCreationException,
                                                    AuthorizationException

  Creates a new `LibraryFileComponent`. The file that this library component refers to can then be set through the `LibraryFileComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryFileComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createFolder

    Folder createFolder(Folder parent)
                        throws DocumentCreationException,
                               AuthorizationException

  Create a folder object under the specified parent folder. If the parent folder is a preset folder, it must be the authoring templates, presentation templates, or component preset folder, since folder creation is only allowed under these types.

  Parameters:
    `parent` - parent folder id
  Returns:
    created folder.
  Throws:
    `AuthorizationException` - if the user does not have access permission
    `DocumentCreationException` - if the folder cannot be created
  Since:
    7.0

### createFolder

    Folder createFolder(DocumentId parentId)
                        throws DocumentCreationException,
                               AuthorizationException,
                               IllegalDocumentTypeException

  Create a folder object under the specified parent folder. If the parent folder is a preset folder, it must be the authoring templates, presentation templates, or component preset folder, since folder creation is only allowed under these types.

  Parameters:
    `parentId` - the parent folder id
  Returns:
    created folder.
  Throws:
    `AuthorizationException` - if the user does not have access permission
    `DocumentCreationException` - if the folder cannot be created
    `IllegalDocumentTypeException` - if parent Id is not a folder
  Since:
    7.0

### createImageComponent

    LibraryImageComponent createImageComponent()
                                               throws DocumentCreationException,
                                                      AuthorizationException

  Creates a new `LibraryImageComponent`. The image that this library component refers to can then be set through the `LibraryImageComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryImageComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createDocumentManagerComponent

    @Deprecated
    LibraryDocumentManagerComponent createDocumentManagerComponent()
                                                                   throws DocumentCreationException,
                                                                          AuthorizationException

  Deprecated. LibraryDocumentManagerComponent is deprecated since 7.0

  Creates a new `LibraryDocumentManagerComponent`. The DocumentManager document that this library component refers to can then be set through the `LibraryDocumentManagerComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryDocumentManagerComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createHTMLComponent

    LibraryHTMLComponent createHTMLComponent()
                                             throws DocumentCreationException,
                                                    AuthorizationException

  Creates a new `LibraryHTMLComponent`. The HTML fragment for this component is to be set on the component once it is created. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryHTMLComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createJSPComponent

    LibraryJSPComponent createJSPComponent()
                                           throws DocumentCreationException,
                                                  AuthorizationException

  Creates a new `LibraryJSPComponent`. The JSP that this library component refers to can then be set through the `LibraryJSPComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryJSPComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createLinkComponent

    LibraryLinkComponent createLinkComponent()
                                             throws DocumentCreationException,
                                                    AuthorizationException

  Creates a new `LibraryLinkComponent`. The Link fragment that this library component refers to can then be set through the `LibraryLinkComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryLinkComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createDateComponent

    LibraryDateComponent createDateComponent()
                                             throws DocumentCreationException,
                                                    AuthorizationException

  Creates a new `LibraryDateComponent`. The Date that this library component refers to can then be set through the `LibraryDateComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryDateComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createNumericComponent

    LibraryNumericComponent createNumericComponent()
                                                   throws DocumentCreationException,
                                                          AuthorizationException

  Creates a new `LibraryNumericComponent`. The Number that this library component refers to can then be set through the `LibraryNumericComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryNumericComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createNavigatorComponent

    LibraryNavigatorComponent createNavigatorComponent()
                                                       throws DocumentCreationException,
                                                              AuthorizationException

  Creates a new `LibraryNavigatorComponent`. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryNavigatorComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createMenuComponent

    LibraryMenuComponent createMenuComponent()
                                             throws DocumentCreationException,
                                                    AuthorizationException

  Creates a new `LibraryMenuComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryMenuComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createListPresentationComponent

    LibraryListPresentationComponent createListPresentationComponent()
                                                                     throws DocumentCreationException,
                                                                            AuthorizationException

  Creates a new `LibraryListPresentationComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryListPresentationComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createSearchComponent

    LibrarySearchComponent createSearchComponent()
                                                 throws DocumentCreationException,
                                                        AuthorizationException

  Creates a new `LibrarySearchComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibrarySearchComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createPersonalizationComponent

    LibraryPersonalizationComponent createPersonalizationComponent()
                                                                   throws DocumentCreationException,
                                                                          AuthorizationException

  Creates a new `LibraryPersonalizationComponent` The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryPersonalizationComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createRichTextComponent

    LibraryRichTextComponent createRichTextComponent()
                                                     throws DocumentCreationException,
                                                            AuthorizationException

  Creates a new `LibraryRichTextComponent`. The rich text that this library component refers to can then be set through the `LibraryRichTextComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryRichTextComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createShortTextComponent

    LibraryShortTextComponent createShortTextComponent()
                                                       throws DocumentCreationException,
                                                              AuthorizationException

  Creates a new `LibraryShortTextComponent`. The Short Text that this library component refers to can then be set through the `LibraryShortTextComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryShortTextComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createStyleSheetComponent

    LibraryStyleSheetComponent createStyleSheetComponent()
                                                         throws DocumentCreationException,
                                                                AuthorizationException

  Creates a new `LibraryStyleSheetComponent`. The Style Sheet that this library component refers to can then be set through the `LibraryStyleSheetComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryStyleSheetComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createTextComponent

    LibraryTextComponent createTextComponent()
                                             throws DocumentCreationException,
                                                    AuthorizationException

  Creates a new `LibraryTextComponent`. The Text that this library component refers to can then be set through the `LibraryTextComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryTextComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createUserSelectionComponent

    LibraryUserSelectionComponent createUserSelectionComponent()
                                                               throws DocumentCreationException,
                                                                      AuthorizationException

  Creates a new `LibraryUserSelectionComponent`. The Users that this library component refers to can then be set through the `LibraryUserSelectionComponent` itself. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `LibraryUserSelectionComponent` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createWorkflow

    Workflow createWorkflow()
                            throws DocumentCreationException,
                                   AuthorizationException

  Creates a new `Workflow`. The stages and other properties that the workflow refers to can then be set through the `Workflow` itself.

  Returns:
    the new `Workflow` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createWorkflowStage

    WorkflowStage createWorkflowStage()
                                      throws DocumentCreationException,
                                             AuthorizationException

  Creates a new `WorkflowStage`. The actions and other properties that the workflowStage refers to can then be set through the `WorkflowStage` itself.

  Returns:
    the new `WorkflowStage` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### save

    java.lang.String[] save(Document object)
                            throws DocumentSaveException,
                                   AuthorizationException,
                                   DuplicateChildException

  Saves an editable document to the WCM repository. Editable objects are those that implement the `Editable` interface, or the `EditableLibraryComponent` interface.

  If errors are returned then the object did not pass validation and was not saved. The returned array will be empty if no errors occurred. `null` will never be returned.

  Parameters:
    `object` - the object to save
  Returns:
    errors, if any - empty array if no errors
  Throws:
    `DocumentSaveException` - if the object could not be saved, or is not an editable object
    `AuthorizationException` - if the user does not have access
    `DuplicateChildException` - if a document with the same name already exists at the same path

### save

    java.lang.String[] save(Document object,
                            DocumentId parent,
                            SaveOptions saveOptions)
                            throws DocumentSaveException,
                                   AuthorizationException,
                                   DuplicateChildException,
                                   IllegalDocumentTypeException

  Save the given object with specific options. These options are in `SaveOptions` class. `SaveOptions` are chainable. If errors are returned then the object did not pass validation and was not saved. Returned array will be empty if no errors occurred.

  Parameters:
    `object` - the object to save
    `parent` - the id of the target parent. Null to fall back to the legacy behaviour.
    `saveOptions` - Mandatory options used when overriding default save behaviour.
  Returns:
    errors, if any - empty array if no errors
  Throws:
    `DocumentSaveException` - if the object could not be saved
    `AuthorizationException` - if the user does not have access
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `IllegalDocumentTypeException`

### delete

    java.lang.String[] delete(DocumentId id)
                              throws DocumentDeleteException,
                                     AuthorizationException

  Deletes an editable document from the WCM repository. Editable objects are those that implement the `Editable` interface, or the `EditableLibraryComponent` interface. If the item to be deleted is a draft then it will be purged from the system, and cannot be restored at a later date. Errors are returned in a `String` array, as a list of errors. These errors may be caused if, for example, the delete would break referential integrity if it were to occur. These errors are not caused by conditions that would raise exceptions, such as `IOException`s while deleting the item.

  Parameters:
    `id` - the ID of the object to delete
  Returns:
    Array of errors
  Throws:
    `DocumentDeleteException` - if the object could not be deleted, or is not an editable object. Note: if a referential integrity exception occurs, DocumentDeleteReferentialIntegrityException is thrown which is a subclass of this exception.
    `AuthorizationException` - if the user does not have access

### exists

    boolean exists(DocumentId<? extends Document> id)

  Tests the existence of an document in the repository. Returns `true` if document with given ID exists, false otherwise.

  Parameters:
    `id` - the ID of the document
  Returns:
    true if document exists

### exists

    boolean exists(java.lang.String id)

  Return `true` if object with given ID exists. The `String` can be a `DocumentId.toString()` or `DocumentId.getId()`

  Parameters:
    `id` - the ID of the object
  Returns:
    true if object exists

### hasPublishedIdByDraftId

    boolean hasPublishedIdByDraftId(DocumentId<? extends Document> id)
                                    throws IllegalDocumentTypeException

  Returns `true` if a published or expired document associated with the supplied draft `DocumentId` exists

  Parameters:
    `id` - The id of the draft document for which the existence of an equivalent draft made
  Returns:
    `true` if a published or expired document associated with the supplied draft `DocumentId` exists
  Throws:
    `IllegalDocumentTypeException` - if an non-draft document id is supplied
  Since:
    8.0

### getPublishedIdByDraftId

    <T extends Document> DocumentId<T> getPublishedIdByDraftId(DocumentId<T> id)
                                                           throws DocumentRetrievalException,
                                                                  IllegalDocumentTypeException

  Returns the `DocumentId` of the published or expired document associated with the supplied draft `DocumentId`

  Parameters:
    `id` - The id of the draft document whose published equivalent should be returned
  Returns:
    the `DocumentId` of the published or expired document associated with the supplied draft `DocumentId`
  Throws:
    `DocumentRetrievalException` - if an associated published document can't be located
    `IllegalDocumentTypeException` - if an non-draft document id is supplied

### hasDraftIdsByPublishedId

    boolean hasDraftIdsByPublishedId(DocumentId<? extends Document> id)
                                     throws IllegalDocumentTypeException

  Returns `true` if a draft document associated with the supplied published/expired `DocumentId` exists

  Parameters:
    `id` - The id of the published/expired document for which the existence of an equivalent draft made
  Returns:
    `true` if a draft document associated with the supplied published/expired `DocumentId` exists
  Throws:
    `IllegalDocumentTypeException` - if a draft document id is supplied
    `java.lang.IllegalArgumentException` - if the supplied id is null.
  Since:
    8.0

### hasDraftIdByPublishedId

    boolean hasDraftIdByPublishedId(DocumentId<? extends Document> id,
                                    DocumentId<Project> projectId)

  Returns `true` if a draft document associated with the supplied published/expired and project `DocumentId` exists. Even if the current workspace user does not have access to see the draft this check will return `true` if it exists.

  Parameters:
    `id` - The id of the published/expired document for which the existence of an equivalent draft made
    `projectId` - the id of the project which the draft must be part of
  Returns:
    `true` if a draft document associated with the supplied published/expired `DocumentId` exists
  Since:
    8.0

### getDraftIdsByPublishedId

    <T extends Document> DocumentIdIterator<T> getDraftIdsByPublishedId(DocumentId<T> id)
                                                                    throws DocumentRetrievalException,
                                                                           IllegalDocumentTypeException

  Returns the `DocumentIdIterator` of the draft documents associated with the supplied published/expired `DocumentId`

  Parameters:
    `id` - The id of the published/expired document whose draft equivalent should be returned
  Returns:
    the `DocumentIdIterator` of the draft documents associated with the supplied published/expired `DocumentId`
  Throws:
    `DocumentRetrievalException` - if an associated draft document can't be located
    `IllegalDocumentTypeException` - if a draft document id is supplied

### getDraftIdByPublishedId

    @Deprecated
    <T extends Document> DocumentId<T> getDraftIdByPublishedId(DocumentId<T> id)
                                                           throws DocumentRetrievalException,
                                                                  IllegalDocumentTypeException

  Deprecated. Use `getDraftIdsByPublishedId(com.ibm.workplace.wcm.api.DocumentId)`

  Returns the `DocumentId` of the draft document associated with the supplied published/expired `DocumentId`, in case that there is a single draft. If there are multiple drafts, use `getDraftIdsByPublishedId(com.ibm.workplace.wcm.api.DocumentId)`

  Parameters:
    `id` - The id of the published/expired document whose draft equivalent should be returned
  Returns:
    the `DocumentId` of the draft document associated with the supplied published/expired `DocumentId`
  Throws:
    `DocumentRetrievalException` - if an associated draft document can't be located
    `IllegalDocumentTypeException` - if a draft document id is supplied

### getDraftIdByPublishedId

    <T extends Document> DocumentId<T> getDraftIdByPublishedId(DocumentId<T> id,
                                                               DocumentId<Project> projectId)
                                                           throws DocumentRetrievalException,
                                                                  IllegalDocumentTypeException

  Returns the `DocumentId` of the draft document associated with the supplied published/expired and project `DocumentId`. The current workspace user must have access to the target draft to be able to retrieve its `DocumentId`

  Parameters:
    `id` - The id of the published/expired document whose draft equivalent should be returned
    `projectId` - the id of the project which the draft must be part of
  Returns:
    the `DocumentId` of the draft document associated with the supplied published/expired and project `DocumentId`
  Throws:
    `DocumentRetrievalException` - if an associated draft document can't be located
    `IllegalDocumentTypeException` - if a draft document id is supplied
  Since:
    8.0

### getById

    <T extends Document> T getById(DocumentId<T> id)
                               throws DocumentRetrievalException,
                                      AuthorizationException

  Return object for the given Id. This method is the same as calling `getById(DocumentId, boolean)` with asReference equal to false. If this object is to be used for read purposes only, then `getById(DocumentId, boolean)` should be used with asReference equal to true.

  Parameters:
    `id` - the ID of the object to retrieve
  Returns:
    the object
  Throws:
    `DocumentRetrievalException` - if the object cannot be retrieved
    `AuthorizationException` - if the user does not have access

### getById

    <T extends Document> T getById(DocumentId<T> id,
                                   boolean asReference)
                               throws DocumentRetrievalException,
                                      AuthorizationException

  Return object for the given Id. This method allows to optimise for performance when retrieving the item for rendering or read operations. Retrieving with asReference equal to true is faster and the object should not be modified by the client code. If client code needs to edit the `Document` then asReference should be false.

  Parameters:
    `id` - the ID of the object to retrieve
    `asReference` - when true this will not clone the internal `Document`.
  Returns:
    the object
  Throws:
    `DocumentRetrievalException` - if the object cannot be retrieved
    `AuthorizationException` - if the user does not have access

### getById

    <T extends Document> T getById(DocumentId<T> id,
                                   boolean asReference,
                                   boolean loadElements)
                               throws DocumentRetrievalException,
                                      AuthorizationException

  Return object for the given Id. This method allows to optimise for performance when retrieving the item for rendering or read operations. Retrieving with asReference equal to true is faster and the object should not be modified by the client code. If client code needs to edit the `Document` then asReference should be false. Retrieving with loadElements equal to false is faster only if the elements of the returned `Document` are not going to be accessed, for `Document`'s that don't have elements, this parameter is unused.

  Parameters:
    `id` - the ID of the object to retrieve
    `asReference` - when true this will not clone the internal `Document`.
    `loadElements` - when true any elements on the `Document` will be auto-loaded. Non-loaded elements are still accessible, but its faster to auto-load (the default) if the elements will be used.
  Returns:
    the object
  Throws:
    `DocumentRetrievalException` - if the object cannot be retrieved
    `AuthorizationException` - if the user does not have access

### getByIds

    <T extends Document> DocumentIterator<T> getByIds(DocumentIdIterator<T> documentIdIterator,
                                                      boolean asReference)

  Return the list of `Document` objects for the given `DocumentId`s as a `DocumentIterator`. The IDs are passed in as a `DocumentIdIterator`. This may be the result from a call to one of the 'find' methods in `Workspace` or a new `DocumentIdIterator` may be created from an array of `DocumentId`s which the client of the API has collected in some manner. Any `Document`s whose ID is in the iterator, but the user of this Workspace does not have access to, will not be returned in the `DocumentIterator`. This method allows to optimise for performance when retrieving items for rendering or read operations. Retrieving with asReference equal to true is faster and the object should not be modified by the client code. If client code needs to edit the `Document`s then asReference should be false.

  Parameters:
    `documentIdIterator` - the iterator of IDs of the Documents to retrieve
    `asReference` - when true this will not clone the internal `Document`.
  Returns:
    the DocumentIterator of the requested Documents
  See Also:
    `createDocumentIdIterator(DocumentId[])`, `getById(DocumentId, boolean)`

### getByIds

    <T extends Document> DocumentIterator<T> getByIds(DocumentIdIterator<T> documentIdIterator,
                                                      boolean asReference,
                                                      boolean loadElements)

  Return the list of `Document` objects for the given `DocumentId`s as a `DocumentIterator`. The IDs are passed in as a `DocumentIdIterator`. This may be the result from a call to one of the 'find' methods in `Workspace` or a new `DocumentIdIterator` may be created from an array of `DocumentId`s which the client of the API has collected in some manner. Any `Document`s whose ID is in the iterator, but the user of this Workspace does not have access to, will not be returned in the `DocumentIterator`. This method allows to optimise for performance when retrieving items for rendering or read operations. Retrieving with asReference equal to true is faster and the object should not be modified by the client code. If client code needs to edit the `Document`s then asReference should be false. Retrieving with loadElements equal to false is faster only if the elements of the returned `Document` are not going to be accessed, for `Document`'s that don't have elements, this parameter is unused.

  Parameters:
    `documentIdIterator` - the iterator of IDs of the Documents to retrieve
    `asReference` - when true this will not clone the internal `Document`.
    `loadElements` - when true any elements on the `Document` will be auto-loaded. Non-loaded elements are still accessible, but its faster to auto-load (the default) if the elements will be used.
  Returns:
    the DocumentIterator of the requested Documents
  See Also:
    `createDocumentIdIterator(DocumentId[])`, `getById(DocumentId, boolean)`

### findByType

    DocumentIdIterator findByType(DocumentType type)

  Returns an iterator of IDs of all objects of the given type. The iterator contains only those IDs for documents the user has access to read. If the user does not have access, the ID will not appear. If the user has access to no documents, then the iterator will contain no elements. `null` will never be returned.

  For library components, if one of the `EditableLibraryComponent` subclasses are specified, then only components of that type will be returned. If `LibraryComponent` is specified, all components of all types will be returned, including all editable component types.

  For Site areas, the root level of siteareas will not be returned by this method to ensure backward compatibility with previous release. The API QueryService can be used to obtain results which include the root siteareas as well. Note: this query can also be accomplished using the QueryService. For example: QueryService queryService = getQueryService(); Query query = createQuery(type); queryService.execute(query);

  Parameters:
    `type` - the type of object
  Returns:
    an iterator of object IDs that are visible to the current user, of the specified type

### findByType

    DocumentIdIterator findByType(DocumentType type,
                                  int workflowStatusFilter)

  Returns an iterator of IDs of all objects of the given type that match the given workflow status filter. The status workflow filter can be either publish, draft, or expired, or any combination of those. The iterator contains only those IDs for documents the user has access to read. If the user does not have access, the ID will not appear. If the user has access to no documents, then the iterator will contain no elements. `null` will never be returned.

  For library components, if one of the `EditableLibraryComponent` subclasses are specified, then only components of that type will be returned. If `LibraryComponent` is specified, all components of all types will be returned, including all editable component types.

  For Site areas, the root level of siteareas will not be returned by this method to ensure backward compatibility with previous release. The API QueryService can be used to obtain results which include the root siteareas as well. Note: this query can also be accomplished using the QueryService. For example: QueryService queryService = getQueryService(); Query query = createQuery(type).addSelector(WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Parameters:
    `type` - the type of object
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of object IDs that are visible to the current user, of the specified type

### findByName

    DocumentIdIterator findByName(DocumentType type,
                                  java.lang.String name)

  Returns an iterator of IDs of all objects of the given type with the specified name. The iterator contains only those IDs for documents the user has access to read. If the user does not have access to an item, the ID for that item will not appear in the iterator. If the user has access to no documents, or there are none with the specified name of the given type, then the iterator will contain no elements. `null` will never be returned. If type is SiteArea then all top level site areas are filtered out, i.e only non-top-level site areas are returned. Use the Site type to find top-level site areas. Note: this query can also be accomplished using the QueryService. For example: QueryService queryService = workspace.getQueryService(); Query query = queryService.createQuery(type); query.addSelector(Selectors.nameEquals(name)); queryService.execute(query); Note: This method doesn't support Folder type. If you need to find children in a folder, please refer to `QueryService`

  Parameters:
    `type` - the type of object
    `name` - the name of the object to find
  Returns:
    an iterator of object IDs with the given name of the specified type that are visible to the current user

### findByName

    DocumentIdIterator findByName(DocumentType type,
                                  java.lang.String name,
                                  int workflowStatusFilter)

  Returns an iterator of IDs of all objects of the given type with the specified name that match the given workflow status filter. The status workflow filter can be either publish, draft, or expired, or any combination of those. The iterator contains only those IDs for documents the user has access to read. If the user does not have access to an item, the ID for that item will not appear in the iterator. If the user has access to no documents, or there are none with the specified name of the given type, then the iterator will contain no elements. `null` will never be returned. If type is SiteArea then all top level site areas are filtered out, i.e only non-top-level site areas are returned. Use the Site type to find top-level site areas. Note: this query can also be accomplished using the QueryService. For example: QueryService queryService = getQueryService(); Query query = createQuery(type).addSelectors(Selectors.nameLike(name), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query); Note: This method doesn't support Folder type. If you need to find children in a folder, please refer to `QueryService`

  Parameters:
    `type` - the type of object
    `name` - the name of the object to find
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of object IDs with the given name of the specified type that are visible to the current user

### findComponentByName

    @Deprecated
    DocumentIdIterator findComponentByName(java.lang.String name)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(LibraryComponent.class).addSelector(Selectors.nameLike(name)); queryService.execute(query);

  Returns an iterator of IDs of all library components with the specified name. The iterator contains only those IDs for components the user has access to read. If the user does not have access to any component, the ID for that component will not appear in the iterator. If the user has access to no components, or there are none with the specified name, then the iterator will contain no elements. `null` will never be returned.

  Parameters:
    `name` - the name of the library component to retrieve
  Returns:
    an iterator of IDs for library components with this name that are visible to the current user

### findContentModifiedSince

    @Deprecated
    DocumentIdIterator findContentModifiedSince(java.util.Date modifiedDate)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(HistorySelectors.modifiedSince(modifiedDate)); queryService.execute(query);

  Returns an iterator of IDs of all `Content` that have been modified since the specified date. The IDs returned will include those for `Content` that have been modified on the given date. If no content has been modified since this date, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `modifiedDate` - the date with which to compare `Content` last modified date
  Returns:
    an iterator over objects modified since the given date that are visible to the current user

### findContentModifiedSince

    @Deprecated
    DocumentIdIterator findContentModifiedSince(java.util.Date modifiedDate,
                                                           int workflowStatusFilter)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelectors(HistorySelectors.modifiedSince(modifiedDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Returns an iterator of IDs of all `Content` that have been modified since the specified date that match the given workflow status filter. The status workflow filter can be either publish, draft, or expired, or any combination of those. The IDs returned will include those for `Content` that have been modified on the given date. If no content has been modified since this date, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `modifiedDate` - the date with which to compare `Content` last modified date
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator over objects modified since the given date that are visible to the current user

### findContentModifiedBetween

    @Deprecated
    DocumentIdIterator findContentModifiedBetween(java.util.Date startDate,
                                                             java.util.Date endDate)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate)); queryService.execute(query);

  Returns an iterator of IDs of all `Content` that have been modified between the specified start and end dates. The IDs returned will include those for `Content` that have been modified on the specified dates. If no content has been modified in this date range, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `startDate` - the date at the beginning of the range
    `endDate` - the data at the end of the range
  Returns:
    an iterator over objects modified between the given dates that are visible to the current user

### findContentModifiedBetween

    @Deprecated
    DocumentIdIterator findContentModifiedBetween(java.util.Date startDate,
                                                             java.util.Date endDate,
                                                             int workflowStatusFilter)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Returns an iterator of IDs of all `Content` that have been modified between the specified start and end dates that match the given workflow status filter. The status workflow filter can be either publish, draft, or expired, or any combination of those. The IDs returned will include those for `Content` that have been modified on the specified dates. If no content has been modified in this date range, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `startDate` - the date at the beginning of the range
    `endDate` - the data at the end of the range
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator over objects modified between the given dates that are visible to the current user

### findDocumentsModifiedSince

    @Deprecated
    DocumentIdIterator findDocumentsModifiedSince(java.util.Date modifiedDate)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate)); queryService.execute(query);

  Returns an iterator of IDs of all `Document`s that have been modified since the specified date. The IDs returned will include those for `Document`s that have been modified on the given date. If no document has been modified since this date, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `modifiedDate` - the date with which to compare `Document` last modified date
  Returns:
    an iterator over documents modified since the given date that are visible to the current user

### findDocumentsModifiedBetween

    @Deprecated
    DocumentIdIterator findDocumentsModifiedBetween(java.util.Date startDate,
                                                               java.util.Date endDate)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate)); queryService.execute(query);

  Returns an iterator of IDs of all `Document`s that have been modified between the specified start and end dates. The IDs returned will include those for `Document`s that have been modified on the specified dates. If no document has been modified in this date range, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `startDate` - the date at the beginning of the range
    `endDate` - the data at the end of the range
  Returns:
    an iterator over documents modified between the given dates that are visible to the current user

### findDocumentsModifiedSince

    @Deprecated
    DocumentIdIterator findDocumentsModifiedSince(java.util.Date modifiedDate,
                                                             int workflowStatusFilter)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Returns an iterator of IDs of all `Document`s that have been modified since the specified date. The IDs returned will include those for `Document`s that have been modified on the given date. If no document has been modified since this date, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `modifiedDate` - the date with which to compare `Document` last modified date
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator over documents modified since the given date that are visible to the current user

### findDocumentsModifiedBetween

    @Deprecated
    DocumentIdIterator findDocumentsModifiedBetween(java.util.Date startDate,
                                                               java.util.Date endDate,
                                                               int workflowStatusFilter)

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(HistorySelectors.modifiedSince(startDate), HistorySelectors.modifiedBefore(endDate), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Returns an iterator of IDs of all `Document`s that have been modified between the specified start and end dates. The IDs returned will include those for `Document`s that have been modified on the specified dates. If no document has been modified in this date range, or the user has access to no documents in this set, then the iterator will not return any elements. `null` will never be returned.

  Parameters:
    `startDate` - the date at the beginning of the range
    `endDate` - the data at the end of the range
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator over documents modified between the given dates that are visible to the current user

### getMemberNames

    @Deprecated
    java.lang.String[] getMemberNames()

  Deprecated. Use the PUMA API

  Returns a list of names of all users and groups available to WCM. If there are no members available, then an empty array is returned. `null` will never be returned.

  Returns:
    a `String` array of names of users and groups

### getMemberNames

    @Deprecated
    java.lang.String[] getMemberNames(java.lang.String filter)

  Deprecated. Use the PUMA API

  Returns a list of names of all users and groups available to WCM. If there are no members available, then an empty array is returned. `null` will never be returned.

  Parameters:
    `filter` - the filter for searching users and groups
  Returns:
    a `String` array of names of users and groups

### getPathById

    java.lang.String getPathById(DocumentId<? extends Document> id,
                                 boolean maintainCase,
                                 boolean decodeURL)
                                 throws DocumentRetrievalException,
                                        IllegalDocumentTypeException

  Returns the 'name' path of the document with the given id.

  This method can return the path for a `Sites`, `SiteAreas`, `Content`, `ContentLinks`, `Components`, `Taxonomies`, `Categories`, `PresentationTemplates`, `AuthoringTemplates` or `Folders`.

  Parameters:
    `id` - The document whose path should be returned
    `maintainCase` - Specifies whether the case of the path should be maintained
    `decodeURL` - Specifies whether the returned URL should be decoded

    Note: Maintaining the case is slower and isn't required for use in WCM Rendering, however it is required for searching for 'Draft' items by path OR generating URLs to prerendered content on unix platforms, due to the case sensitivity of that platform

  Returns:
    The path to the specified document, or null if not found
  Throws:
    `DocumentRetrievalException` - if a document with the given id can't be located
    `IllegalDocumentTypeException` - if specified id is not a site, a site area, a content, a content link, a component, a taxonomy, a category, a presentation template, an authoring template or a folder.

### getTitlePathById

    java.lang.String getTitlePathById(DocumentId id,
                                      java.util.Locale locale)

  Returns the 'Display Title' path of the document with the given id.

  This method can return the path for a `Sites`, `SiteAreas`, `Content`, `ContentLinks`, `Components`, `Taxonomies`, `Categories`, `PresentationTemplates`, `AuthoringTemplates` or `Folders`.

  If any of the items on the path have Text Providers, then they will be utilized to generate the returned path

  This path is the same path that is normally shown within the Authoring UI

  Parameters:
    `id` - The document whose path should be returned
    `locale` - The locale to use when generating the path
  Returns:
    The Display-Title path to the specified document, never `null`
  Throws:
    `java.lang.IllegalArgumentException` - if id or locale is null

### findByPath

    <T extends Document> DocumentIdIterator<T> findByPath(java.lang.String namePath,
                                                          int workflowStatusFilter)

  Returns an iterator of `DocumentId` for a given name path and workflow status.

  This method can return `DocumentIds` for `Sites`, `SiteAreas`, `Content` or `ContentLinks`.

  This method supports searching for draft (`Workspace.WORKFLOWSTATUS_DRAFT`), published (`Workspace.WORKFLOWSTATUS_PUBLISHED`) or expired (`Workspace.WORKFLOWSTATUS_EXPIRED`) items or all items regardless of their workflow status (`Workspace.WORKFLOWSTATUS_ALL`). A combination of workflow status can be specified using a bitwise OR. For example `Workspace.WORKFLOWSTATUS_PUBLISHED | Workspace.WORKFLOWSTATUS_EXPIRED`.

  This method supports 'name' paths only, not 'Display Title' paths.

  Parameters:
    `namePath` - the name path to the content, site or site area. The path should not be URL encoded. The format of the path is library/site OR library/site/site area(s) OR library/site/site area(s)/content. When searching for draft items, the path is case sensitive.
    `workflowStatusFilter` - this parameter must be a valid workflow status or some combination using a bitwise OR.
  Returns:
    an iterator of `DocumentId` objects with the specified workflow status for the given path
  Throws:
    `java.lang.IllegalArgumentException` - if path is null.

### findContentByPath

    DocumentIdIterator<Content> findContentByPath(java.lang.String namePath)

  Returns an iterator of IDs of `Content` with the given name path. If the name path specified is to a site or site area, returns an ID iterator of the default content for that site or site area if one has been set. The path should not be encoded (URL encoded).

  If the user has access to no documents, or there are none on the specified path, then the iterator will contain no elements. `null` will never be returned.

  Parameters:
    `namePath` - the name path to the content, site or site area.
  Returns:
    an ID iterator of the content with the given path, or the default content for the specified site or site area that are visible to the current user

### findContentByAuthoringTemplate

    @Deprecated
    DocumentIdIterator findContentByAuthoringTemplate(DocumentId id)
                                                      throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(Selectors.authoringTemplateIn(id)); queryService.execute(query);

  Returns an iterator of IDs of `TemplatedDocument`s which have been created using the specified authoring template. If the user does not have access to the specified `AuthoringTemplate`, or any of the `TemplatedDocument`s based on the specified template, then the iterator will contain no elements. `null` will never be returned. Since 8.0, this method can be used to find `TemplatedDocument`s, not just `Content`.

  Parameters:
    `id` - the ID of the `AbstractAuthoringTemplate` (either a `AuthoringTemplate` or a `SiteAreaTemplate`)
  Returns:
    an iterator of IDs of `TemplatedDocument`s based on the specified `AbstractAuthoringTemplate` that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the ID is not of type Authoring Template.

### findContentByAuthoringTemplate

    @Deprecated
    DocumentIdIterator findContentByAuthoringTemplate(DocumentId id,
                                                                 int workflowStatusFilter)
                                                      throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(Selectors.authoringTemplateIn(id), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Returns an iterator of IDs of `TemplatedDocument` which has been created using the specified authoring template that match the given workflow status filter. The status workflow filter can be either publish, draft, or expired, or any combination of those. If the user does not have access to the specified `AbstractAuthoringTemplate`, or any of the `TemplatedDocument` based on the specified template, then the iterator will contain no elements. `null` will never be returned. Since 8.0, this method can be used to find `TemplatedDocument`s, not just `Content`.

  Parameters:
    `id` - the ID of the `AbstractAuthoringTemplate` (either a `AuthoringTemplate` or a `SiteAreaTemplate`)
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of IDs of `TemplatedDocument` based on the specified `AbstractAuthoringTemplate` that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the ID is not of type Authoring Template.

### findContentByWorkflowStage

    @Deprecated
    DocumentIdIterator findContentByWorkflowStage(DocumentId id)
                                                  throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageEquals(id)); queryService.execute(query);

  Returns an iterator of IDs of `Content` in a specified `WorkflowStage`. This will return documents in that stage, for all workflows that the stage appears in. That is, it does not restrict results to the specified stage in a certain workflow.

  If the user does not have access to the specified `WorkflowStage`, or any of the `Content` in the specified stage, then the iterator will contain no elements. `null` will never be returned.

  Parameters:
    `id` - the ID of the `WorkflowStage`
  Returns:
    an iterator of IDs of `Content` items in the given stage that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the ID is not of type Workflow Stage.

### findDocumentsByWorkflowStage

    @Deprecated
    DocumentIdIterator findDocumentsByWorkflowStage(DocumentId[] ids)
                                                    throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery().addSelector(WorkflowSelectors.stageIn(ids)); queryService.execute(query);

  Returns an iterator of all `Document`s in the given workflow stages.

  Parameters:
    `ids` - the list of IDs of the workflow stages
  Returns:
    an iterator of IDs of documents in the given stage
  Throws:
    `IllegalDocumentTypeException` - if incorrect document id type is passed

### findDocumentsByWorkflowStage

    @Deprecated
    DocumentIdIterator findDocumentsByWorkflowStage(DocumentId[] workflowStages,
                                                               java.lang.String[] users,
                                                               int userRoles)
                                                    throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); [for userRoles=ROLE_AUTHOR] Query query = createQuery().addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.authorsContain(users)); [for userRoles=ROLE_OWNER] Query query = createQuery().addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.ownersContain(users)); [for userRoles=ROLE_APPROVER] Query query = createQuery().addSelector(WorkflowSelectors.stageIn(workflowStages), WorkflowSelectors.statusEquals(Status.DRAFT), WorkflowSelectors.approversContains(users)); WorkflowSelectors.approversContains queryService.execute(query);

  Find `Document`s by workflow stage for users in particular roles. When calling this method with userRoles set to ROLE_APPROVER, only drafts are searched.

  Parameters:
    `workflowStages` - The `WorkflowStages` that we want to find documents in
    `users` - The usernames that we want to find documents for. These are the full name of the user, as returned by methods such as `UserProfile.getUsername()`, and not the short name.
    `userRoles` - The roles that the specified users are in. Valid values are ROLE_AUTHOR, ROLE_APPROVER and ROLE_OWNER. When ROLE_APPROVER is used, only drafts are searched.
  Returns:
    an iterator of Ids of `Document`s items in the given workflow stage that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the IDs are not of type Workflow Stage
    `java.lang.IllegalArgumentException` - if the workflow stage or user parameters are empty, if any of the workflow stage or user parameter values within the arrays are null, or if userRoles are not valid

### findContentByCategory

    @Deprecated
    DocumentIdIterator findContentByCategory(DocumentId id)
                                             throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(ProfileSelectors.categoriesContains(id)); queryService.execute(query);

  Returns an iterator of IDs of all `Content` that has the given `Category` in its profile. If there is no `Content` with that `Category` in its profile, or the user does not have access to any of the `Content`, then the iterator will contain no elements. `null` will never be returned. Note that this method will not return `SiteArea`s. To find site areas by category, use the QueryService`. Note that this method will return items from ALL libraries. To restrict to items for a given library, use the` QueryService`.

  `
  Parameters:
    `id` - the ID of the `Category`
  Returns:
    an iterator of IDs of `TemplatedDocument`s with this category that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the ID is not of type Category.

### findContentByCategory

    @Deprecated
    DocumentIdIterator findContentByCategory(DocumentId id,
                                                        int workflowStatusFilter)
                                             throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(ProfileSelectors.categoriesContains(id), WorkflowSelectors.statusEquals(workflowStatus)); queryService.execute(query);

  Returns an iterator of IDs of all `Content` that has the given `Category` in its profile that match the given workflow status filter. The status workflow filter can be either publish, draft, or expired, or any combination of those. If there is no `Content` with that `Category` in its profile, or the user does not have access to any of the `Content`, then the iterator will contain no elements. `null` will never be returned. Note that this method will not return `SiteArea`s. To find site areas by category, use the QueryService`. Note that this method will return items from ALL libraries. To restrict to items for a given library, use the` QueryService`.

  `
  Parameters:
    `id` - the ID of the `Category`
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of IDs of `TemplatedDocument`s with this category that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the ID is not of type Category.

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords)

  Returns an iterator of IDs of objects that match the given search criteria. This performs an "or" search, not an "and" search. This means that a search for two different Categories and a Content Template will return Content profiled with at least one of each profile type (one Category and one Template), not just Content that matches all of the parameters. Content that matches only one criteria type (Template only) will not be returned.

  All published and draft Content documents that meet the specified search criteria will be returned. To only return documents of a certain workflow status, see the expanded form of this method

  The content search behaves in a manner similar to the Menu Component.

  If site areas have been specified, all ancestor and descendant site areas are also included in the search.

  The order of results is not guaranteed. All parameters are optional.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
  Returns:
    an iterator of IDs of content that meet the search criteria

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords,
                                              int workflowStatusFilter)

  Returns an iterator of IDs of objects that match the given search criteria. This performs an "or" search, not an "and" search. This means that a search for two different Categories and a Content Template will return Content profiled with at least one of each profile type (one Category and one Template), not just Content that matches all of the parameters. Content that matches only one criteria type (Template only) will not be returned.

  The content search behaves in a manner similar to the Menu Component.

  If site areas have been specified, all ancestor and descendant site areas are also included in the search.

  The order of results is not guaranteed. All parameters are optional.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of IDs of content that meet the search criteria

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords,
                                              boolean matchAllKeys)

  Returns an iterator of IDs of objects that match the given search criteria. This search can run in "and" or "or" mode by changing the matchAllKeys parameter. If true, then a search for two different Categories and a Content Template will return content that is profiled with both Categories and the Content Template. If false, then a search for two different Categories and a Content Template will return Content profiled with at least one of each profile type (one Category and one Template). In either mode, Content that matches only one criteria type (Template only) will not be returned

  All published and draft Content documents that meet the specified search criteria will be returned. To only return documents of a certain workflow status, see the expanded form of this method

  The content search behaves in a manner similar to the Menu Component.

  If site areas have been specified, all ancestor and descendant site areas are also included in the search.

  The order of results is not guaranteed. All parameters except matchAllKeys are optional.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
    `matchAllKeys` - indicates whether the search is an "and" search. True for "and", false for "or".
  Returns:
    an iterator of IDs of content that meet the search criteria

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords,
                                              boolean matchAllKeys,
                                              int workflowStatusFilter)

  Returns an iterator of IDs of objects that match the given search criteria. This search can run in "and" or "or" mode by changing the matchAllKeys parameter. If true, then a search for two different Categories and a Content Template will return content that is profiled with both Categories and the Content Template. If false, then a search for two different Categories and a Content Template will return Content profiled with at least one of each profile type (one Category and one Template). In either mode, Content that matches only one criteria type (Template only) will not be returned

  The content search behaves in a manner similar to the Menu Component.

  If site areas have been specified, all ancestor and descendant site areas are also included in the search.

  The order of results is not guaranteed. All parameters except matchAllKeys are optional.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
    `matchAllKeys` - indicates whether the search is an "and" search. True for "and", false for "or".
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of IDs of content that meet the search criteria

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords,
                                              boolean matchAllCategories,
                                              boolean includeAncestorSiteAreas,
                                              boolean includeDescendantSiteAreas,
                                              java.lang.String sortKey1,
                                              java.lang.String sortKey2,
                                              java.lang.String sortKey3,
                                              boolean sortAscending)

  Returns an iterator of IDs of objects that match the given search criteria.

  All published and draft Content documents that meet the specified search criteria will be returned. To only return documents of a certain workflow status, see the expanded form of this method

  The content search behaves in a manner similar to the Menu Component.

  When searching site areas, specifying `includeAncestorSiteAreas` and `includeDescendentSiteAreas` both as false will restrict the search to only the specified site areas.

  Results can be sorted by up to three keys. The fields available to sort by are:

  - `Workspace.SORT_KEY_NAME`
  - `Workspace.SORT_KEY_CREATION_DATE`
  - `Workspace.SORT_KEY_PUBLISH_DATE`
  - `Workspace.SORY_KEY_DESCRIPTION`
  - `Workspace.SORT_KEY_EXPIRY_DATE`
  - `Workspace.SORT_KEY_GENERAL_DATE_ONE`
  - `Workspace.SORT_KEY_GENERAL_DATE_TWO`
  - `Workspace.SORT_KEY_LASTMODIFIED_DATE`
  - `Workspace.SORT_KEY_TITLE`
  - `Workspace.SORT_KEY_NONE`
  If less than three sort keys are required, specify `Workspace.SORT_KEY_NONE` for those not required.

  The results can be sorted in ascending or descending order, according to the `sortAscending` parameter. The default order, as used in the other `contentSearch` methods, is ascending.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
    `matchAllCategories` - indicates whether the content returned should match all categories (true) or any category (false)
    `includeAncestorSiteAreas` - indicates whether to include ancestor site areas
    `includeDescendantSiteAreas` - indicates whether to include descendant site areas
    `sortKey1` - Specify one of sort keys as first sort priority
    `sortKey2` - Specify one of sort keys as second sort priority
    `sortKey3` - Specify one of sort keys as third sort priority
    `sortAscending` - Specify true for ascending order and false for descending order
  Returns:
    an iterator of IDs of content that meet the search criteria

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords,
                                              boolean matchAllCategories,
                                              boolean includeAncestorCategories,
                                              boolean includeDescendentCategories,
                                              boolean includeAncestorSiteAreas,
                                              boolean includeDescendentSiteAreas,
                                              java.lang.String sortKey1,
                                              java.lang.String sortKey2,
                                              java.lang.String sortKey3,
                                              boolean sortAscending)

  Returns an iterator of IDs of objects that match the given search criteria.

  All published and draft Content documents that meet the specified search criteria will be returned. To only return documents of a certain workflow status, see the expanded form of this method

  The content search behaves in a manner similar to the Menu Component.

  When searching site areas, specifying `includeAncestorSiteAreas` and `includeDescendentSiteAreas` both as false will restrict the search to only the specified site areas.

  Results can be sorted by up to three keys. The fields available to sort by are:

  - `Workspace.SORT_KEY_NAME`
  - `Workspace.SORT_KEY_CREATION_DATE`
  - `Workspace.SORT_KEY_PUBLISH_DATE`
  - `Workspace.SORY_KEY_DESCRIPTION`
  - `Workspace.SORT_KEY_EXPIRY_DATE`
  - `Workspace.SORT_KEY_GENERAL_DATE_ONE`
  - `Workspace.SORT_KEY_GENERAL_DATE_TWO`
  - `Workspace.SORT_KEY_LASTMODIFIED_DATE`
  - `Workspace.SORT_KEY_TITLE`
  - `Workspace.SORT_KEY_NONE`
  If less than three sort keys are required, specify `Workspace.SORT_KEY_NONE` for those not required.

  The results can be sorted in ascending or descending order, according to the `sortAscending` parameter. The default order, as used in the other `contentSearch` methods, is ascending.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
    `matchAllCategories` - indicates whether the content returned should match all categories (true) or any category (false)
    `includeAncestorCategories` - indicates whether the content returned should include category ancestors (true) or (false)
    `includeDescendentCategories` - indicates whether the content returned should include category descendants (true) or (false)
    `includeAncestorSiteAreas` - indicates whether the content returned should include site area ancestors (true) or (false)
    `includeDescendentSiteAreas` - indicates whether the content returned should include site area descendants (true) or (false)
    `sortKey1` - Specify one of sort keys as first sort priority
    `sortKey2` - Specify one of sort keys as second sort priority
    `sortKey3` - Specify one of sort keys as third sort priority
    `sortAscending` - Specify true for ascending order and false for descending order
  Returns:
    an iterator of IDs of content that meet the search criteria

### contentSearch

    DocumentIdIterator<Content> contentSearch(DocumentId templateId,
                                              DocumentId[] siteAreaIds,
                                              DocumentId[] categoryIds,
                                              java.lang.String[] keywords,
                                              boolean matchAllCategories,
                                              boolean includeAncestorCategories,
                                              boolean includeDescendentCategories,
                                              boolean includeAncestorSiteAreas,
                                              boolean includeDescendentSiteAreas,
                                              java.lang.String sortKey1,
                                              java.lang.String sortKey2,
                                              java.lang.String sortKey3,
                                              boolean sortAscending,
                                              int workflowStatusFilter)

  Returns an iterator of IDs of objects that match the given search criteria.

  The content search behaves in a manner similar to the Menu Component.

  When searching site areas, specifying `includeAncestorSiteAreas` and `includeDescendentSiteAreas` both as false will restrict the search to only the specified site areas.

  Results can be sorted by up to three keys. The fields available to sort by are:

  - `Workspace.SORT_KEY_NAME`
  - `Workspace.SORT_KEY_CREATION_DATE`
  - `Workspace.SORT_KEY_PUBLISH_DATE`
  - `Workspace.SORY_KEY_DESCRIPTION`
  - `Workspace.SORT_KEY_EXPIRY_DATE`
  - `Workspace.SORT_KEY_GENERAL_DATE_ONE`
  - `Workspace.SORT_KEY_GENERAL_DATE_TWO`
  - `Workspace.SORT_KEY_LASTMODIFIED_DATE`
  - `Workspace.SORT_KEY_TITLE`
  - `Workspace.SORT_KEY_NONE`
  If less than three sort keys are required, specify `Workspace.SORT_KEY_NONE` for those not required.

  The results can be sorted in ascending or descending order, according to the `sortAscending` parameter. The default order, as used in the other `contentSearch` methods, is ascending.

  Parameters:
    `templateId` - the ID of the template to match
    `siteAreaIds` - the IDs of the site areas to find content in
    `categoryIds` - the IDs of categories for content to have in their profile
    `keywords` - the IDs of keywords for content to have in its profile
    `matchAllCategories` - indicates whether the content returned should match all categories (true) or any category (false)
    `includeAncestorCategories` - indicates whether the content returned should include category ancestors (true) or (false)
    `includeDescendentCategories` - indicates whether the content returned should include category descendants (true) or (false)
    `includeAncestorSiteAreas` - indicates whether the content returned should include site area ancestors (true) or (false)
    `includeDescendentSiteAreas` - indicates whether the content returned should include site area descendants (true) or (false)
    `sortKey1` - Specify one of sort keys as first sort priority
    `sortKey2` - Specify one of sort keys as second sort priority
    `sortKey3` - Specify one of sort keys as third sort priority
    `sortAscending` - Specify true for ascending order and false for descending order
    `workflowStatusFilter` - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
  Returns:
    an iterator of IDs of content that meet the search criteria

### render

    java.lang.String render(RenderingContext renderingContext)
                            throws ServiceNotAvailableException

  Renders the content, according to the `RenderingContext` that is passed in. The `RenderingContext` should contain enough information to render a desired page, and can be created using the factory methods `createRenderingContext()` in the `Workspace` interface.

  The rendered content is returned as a String, encoded according to the users locale.

  Parameters:
    `renderingContext` - the context to render
  Returns:
    the rendered context as a `String`
  Throws:
    `ServiceNotAvailableException`
  See Also:
    `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map)`, `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map, java.lang.String, java.lang.String)`

### render

    java.lang.String render(RenderingContext renderingContext,
                            ContentComponent component)
                            throws ServiceNotAvailableException

  Renders the given WCM content component using the specified rendering context. It is not enough to just specify the `ContentComponent` to be rendered, but the path to the item containing the `ContentComponent` must be specified in the `RenderingContext`.

  For example, to render the `ContentComponent` named 'test' that resides on the `SiteArea` named 'AAA', the following code could be used:

          SiteArea siteArea = (SiteArea) myWorkspace.getById(
          ((DocumentId) myWorkspace.findByName(DocumentTypes.SiteArea,
          "AA").next()));
          Content content = (Content) myWorkspace.getById(
          ((DocumentId) myWorkspace.findByName(DocumentTypes.Content,
          "AAA").next()));
          ContentComponent component = content.getComponent("test");
          Map parametermap = new HashMap();
          RenderingContext context = myWorkspace.createRenderingContext(servletRequest,
          servletResponse,
          parametermap);
          context.setRenderedContent(content, siteArea);
          System.out.println(myWorkspace.render(context, component));

  The rendered content is returned as a String, encoded according to the users locale.

  Parameters:
    `renderingContext` - the `RenderingContext` to use
    `component` - the WCM content component to render
  Returns:
    the rendered component as a `String`
  Throws:
    `ServiceNotAvailableException`
  See Also:
    `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map)`, `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map, java.lang.String, java.lang.String)`

### render

    java.lang.String render(RenderingContext renderingContext,
                            LibraryComponent component)
                            throws ServiceNotAvailableException

  Renders the specified WCM `LibraryComponent` using the specified `RenderingContext`.

  The rendered content is returned as a String, encoded according to the users locale.

  Parameters:
    `renderingContext` - the `RenderingContext` to use
    `component` - the component to render
  Returns:
    the rendered component as a `String`
  Throws:
    `ServiceNotAvailableException`
  See Also:
    `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map)`, `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map, java.lang.String, java.lang.String)`

### generateURL

    java.lang.String generateURL(RenderingContext context,
                                 ContentComponent component)

  Generate the URL to the given component, in the context of the path in the `RenderingContext`. This URL is the full URL, suitable for inclusion in a link.

  The `RenderingContext` should contain enough information to refer to the page that contains the `ContentComponent`. The URL will contain the path to the content, and any parameters required to render the component.

  Parameters:
    `context` - the `RenderingContext` to be used
    `component` - the component
  Returns:
    the URL to the requested object
  See Also:
    `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map)`, `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map, java.lang.String, java.lang.String)`

### generateURL

    java.lang.String generateURL(RenderingContext context,
                                 LibraryComponent component)

  Generate the URL to the given component, in the context of the path in the `RenderingContext`. This URL is the full URL, suitable for inclusion in a link. While a `LibraryComponent` can be rendered on its own, any information contained in the `RenderingContext` will be used while rendering the component.

  Parameters:
    `context` - the `RenderingContext` to be used
    `component` - the component
  Returns:
    the URL to the requested object
  See Also:
    `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map)`, `com.ibm.workplace.wcm.api.Workspace#createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map, java.lang.String, java.lang.String)`

### createDocumentId

    <T extends Document> DocumentId<T> createDocumentId(java.lang.String stringId)
                                                    throws DocumentIdCreationException

  Creates a new `DocumentId` object from a `String` representation of the ID. This can be used in conjunction with `DocumentId.toString()` as a form of a serialize/deserialize pair.

  One example of a use of this might be to recreate IDs that are used in list selections on an HTML form, say, to select an `AuthoringTemplate`. The `DocumentId.toString()` can be used to populate the value attribute for a field that will be sent back to the server. Once this value is received, this method can be called to reconstruct the appropriate `DocumentId` object from the field value.

  Alternatively, this method can be used to create a `DocumentId` simply by passing in the value of `DocumentId.getId()`, rather than the full `DocumentId.toString()` serialization of the `DocumentId`. This way of creating a `DocumentId` will often be simpler, though it will perform slower, since the other properties of the `DocumentId` have to be retrieved when the `DocumentId` is created.

  Parameters:
    `stringId` - the `String` representation of the required `DocumentId`, either the full serialization, or the simple id.
  Returns:
    a new `DocumentId` object
  Throws:
    `DocumentIdCreationException` - if the ID could not be created
    `DocumentNotFoundIdCreationException` - if the item targeted by the unique id (from `DocumentId.getId()`) could not be found.
  See Also:
    `DocumentId.toString()`, `DocumentId.getId()`

### createDocumentIdIterator

    <T extends Document> DocumentIdIterator<T> createDocumentIdIterator(DocumentId<T>[] documentIds)

  Create a new `DocumentIdIterator` from an array of given `DocumentId`. An example of its use is: `
  // Get ID strings from request
  String[] selectedIds = request.getParameterValues("selected_ids");
  DocumentId[] ids = new DocumentId[selectedIds.length];
  for (int i = 0; i < selectedIds.length; i++)
  {
  ids[i] = workspace.createDocumentId(selectedIds[i]);
  }
  DocumentIdIterator iterator = workspace.createDocumentIdIterator(ids);
  DocumentIterator documents = workspace.getDocuments(iterator);
  // Work with returned documents
  ...`

  ``
  Parameters:
    `documentIds` - an array of `DocumentId`.``
  Returns:
    a new `DocumentIdIterator```
  Throws:
    `java.lang.IllegalArgumentException` - if the ID array contains a null.

### createRenderingContext

    RenderingContext createRenderingContext(ServletRequest request,
                                            ServletResponse response,
                                            java.util.Map requestParameters)
                                            throws OperationFailedException,
                                                   AuthorizationException

  Creates a new rendering context.

  Parameters:
    `request` - the ServletRequest object
    `response` - the ServletResponse object
    `requestParameters` - the request parameters for the request as a map of name=single-value parameters. The parameters of this Map will override the existing parameters of the request. This Map can also contain additional parameters.
  Returns:
    a new `RenderingContext`
  Throws:
    `OperationFailedException` - If the RenderingContext cannot be created
    `AuthorizationException` - If the user does not have access to the Rendering Context.

### createRenderingContext

    RenderingContext createRenderingContext(ServletRequest request,
                                            ServletResponse response,
                                            java.util.Map requestParameters,
                                            java.lang.String wcmWebAppPath,
                                            java.lang.String wcmServletPath)
                                            throws OperationFailedException,
                                                   AuthorizationException

  Creates a new rendering context.

  Parameters:
    `request` - the ServletRequest object
    `response` - the ServletResponse object
    `requestParameters` - the request parameters for the request as a map of name=single-value parameters. The parameters of this Map will override the existing parameters of the request. This Map can also contain additional parameters.
    `wcmWebAppPath` - the URL up to the web application (ie. up to and including the context path)
    `wcmServletPath` - the servlet path
  Returns:
    a new `RenderingContext`
  Throws:
    `OperationFailedException` - If the RenderingContext cannot be created
    `AuthorizationException` - If the user does not have access to the Rendering Context.

### createRenderingContext

    RenderingContext createRenderingContext(PortletRequest request,
                                            PortletResponse response,
                                            java.util.Map requestParameters)
                                            throws OperationFailedException,
                                                   AuthorizationException

  Creates a new rendering context.

  Parameters:
    `request` - the PortletRequest object
    `response` - the PortletResponse object
    `requestParameters` - the request parameters for the request as a map of name=single-value parameters. The parameters of this Map will override the existing parameters of the request. This Map can also contain additional parameters.
  Returns:
    a new `RenderingContext`
  Throws:
    `OperationFailedException` - If the RenderingContext cannot be created
    `AuthorizationException` - If the user does not have access to the Rendering Context.

### createRenderingContext

    RenderingContext createRenderingContext(PortletRequest request,
                                            PortletResponse response,
                                            java.util.Map requestParameters,
                                            java.lang.String wcmWebAppPath,
                                            java.lang.String wcmServletPath)
                                            throws OperationFailedException,
                                                   AuthorizationException

  Creates a new rendering context.

  Parameters:
    `request` - the PortletRequest object
    `response` - the PortletResponse object
    `requestParameters` - the request parameters for the request as a map of name=single-value parameters. The parameters of this Map will override the existing parameters of the request. This Map can also contain additional parameters.
    `wcmWebAppPath` - the URL up to the web application (ie. up to and including the context path)
    `wcmServletPath` - the servlet path
  Returns:
    a new `RenderingContext`
  Throws:
    `OperationFailedException` - If the RenderingContext cannot be created
    `AuthorizationException` - If the user does not have access to the Rendering Context.

### fromString

    <T extends WCMApiObject> DocumentType<T> fromString(java.lang.String typeName)
                                                    throws IllegalDocumentTypeException

  Returns the `DocumentType` for the specified API interface/class name. The interface/class name specified must be the fully qualified Java interface name as a `String`.

  Parameters:
    `typeName` - the API interface/class name
  Returns:
    the `DocumentType` for the given interface/class name
  Throws:
    `IllegalDocumentTypeException`

### getReferences

    Reference[] getReferences(DocumentId<? extends Document> documentId)
                              throws OperationFailedException,
                                     AuthorizationException

  Returns an array of `Reference` instances that represent all references to the specified `DocumentId`.

  Parameters:
    `documentId` - should not be `null`
  Returns:
    array of `Reference` instances
  Throws:
    `OperationFailedException` - if there was an error creating the array of `Reference` instances for the specified `DocumentId`.
    `AuthorizationException` - if the user does not have access to the object specified by the `DocumentId` or data required to create the array of `Reference` instances.

### getBranchReferences

    Reference[] getBranchReferences(DocumentId<? extends Document> documentId)
                                    throws OperationFailedException,
                                           AuthorizationException

  Returns an array of `Reference` instances that are references from items outside of the specified branch to the root of the branch or any of the items within the branch.

  Parameters:
    `documentId` - should not be `null`
  Returns:
    array of `Reference` instances
  Throws:
    `OperationFailedException` - if there was an error creating the array of `Reference` instances for the specified `DocumentId`.
    `AuthorizationException` - if the user does not have access to the object specified by the `DocumentId` or data required to create the array of `Reference` instances.
  Since:
    8.0

### getBranchReferences

    Reference[] getBranchReferences(DocumentLibrary library)
                                    throws OperationFailedException,
                                           AuthorizationException

  Returns an array of `Reference` instances that are references from items outside of the specified `DocumentLibrary` to the `DocumentLibrary` or any of the items within the branch.

  Parameters:
    `library` - should not be `null`
  Returns:
    array of `Reference` instances
  Throws:
    `OperationFailedException` - if there was an error creating the array of `Reference` instances for the specified `DocumentId`.
    `AuthorizationException` - if the user does not have access to the object specified by the `DocumentId` or data required to create the array of `Reference` instances.
  Since:
    8.0

### getReferencesFrom

    Reference[] getReferencesFrom(DocumentId<? extends Document> documentId)
                                  throws OperationFailedException,
                                         AuthorizationException

  Returns an array of `Reference` instances that represent all references from the specified `DocumentId`.

  Parameters:
    `documentId` - should not be `null`
  Returns:
    array of `Reference` instances
  Throws:
    `OperationFailedException` - if there was an error creating the array of `Reference` instances for the specified `DocumentId`.
    `AuthorizationException` - if the user does not have access to the object specified by the `DocumentId` or data required to create the array of `Reference` instances.

### clearReferences

    void clearReferences(Reference[] references)
                         throws OperationFailedException,
                                AuthorizationException

  Clears all the references represented by the array of `Reference` instances.

  Parameters:
    `references` - an array of `Reference` instances obtained by calling `getReferences(...).`
  Throws:
    `OperationFailedException` - if there was an error clearing a `Reference`.
    `AuthorizationException` - if the user does not have access to the referring object so the reference can be cleared.

### replaceReferences

    void replaceReferences(Reference[] references,
                           DocumentId<? extends Document> newRefereeId)
                           throws OperationFailedException,
                                  AuthorizationException,
                                  IllegalTypeChangeException

  Replaces all the references represented by the array of `Reference` instances with the new object represented by the specified `DocumentId`.

  Parameters:
    `references` - an array of `Reference` instances obtained by calling `getReferences(...).`
    `newRefereeId` - the `DocumentId` of the object that is to be come the new referee.
  Throws:
    `OperationFailedException` - if there was an error replacing a `Reference`.
    `AuthorizationException` - if the user does not have access to the referring object so the reference can be replaced.
    `IllegalTypeChangeException` - if the type of the `Document` represented by the specified `DocumentId` is not of the appropriate type for the `Reference`.

### isMemberOfGroup

    boolean isMemberOfGroup(java.lang.String groupName)

  Indicates if the user of this `Workspace` is a member of the group with the specified name. This method also checks nested groups.

  Parameters:
    `groupName` - the name of the group to check membership
  Returns:
    true if this user is a member of the group, false if not

### getUserProfile

    UserProfile getUserProfile()

  Returns the `UserProfile` for the user of this `Workspace`. The `UserProfile` allows clients to retrieve the users categories and keywords.

  Returns:
    the `UserProfile` for the user of this `Workspace`

### getCurrentDocumentLibrary

    DocumentLibrary getCurrentDocumentLibrary()

  Returns the current `DocumentLibrary`, which is being used for all operations except rendering.

  If the current `DocumentLibrary` has not been set, the default configured `DocumentLibrary` is returned. If the default configured `DocumentLibrary` cannot be found or if this `Workspace` does not have access to it, `null` is returned.

  Returns:
    the current `DocumentLibrary` being used by this `Workspace`

### setCurrentDocumentLibrary

    void setCurrentDocumentLibrary(DocumentLibrary library)

  Sets the current `DocumentLibrary` for this `Workspace`. This is the Library that will be used for all operations, until it is set to a different Library.

  The Library set by this method will not be used for calls to render objects. The Library specified in the path to be rendered will be used for rendering.

  Parameters:
    `library` - the `DocumentLibrary` to use

### getDocumentLibraries

    java.util.Iterator<DocumentLibrary> getDocumentLibraries()

  Returns an iterator of all `DocumentLibrary` objects visible to the user of this `Workspace`.

  Returns:
    an iterator of `DocumentLibrary` objects

### getDocumentLibrary

    DocumentLibrary getDocumentLibrary(java.lang.String libraryName)

  Returns the `DocumentLibrary` with the specified name or title, or `null` if a `DocumentLibrary` with that name or title does not exist or the caller does not have access

  Parameters:
    `libraryName` - the name or title of the `DocumentLibrary` to retrieve
  Returns:
    a `DocumentLibrary` object representing the library with the given name or title, or `null` if it does not exist.

### hasDocumentLibrary

    boolean hasDocumentLibrary(java.lang.String libraryName)

  Indicates if there is a `DocumentLibrary` with the specified name

  Parameters:
    `libraryName` - the name of the `DocumentLibrary` to search for
  Returns:
    true if there is a `DocumentLibrary` with the specified name, false otherwise

### useLiveAccess

    @Deprecated
    void useLiveAccess(boolean liveAccess)

  Deprecated. use `useUserAccess(boolean userAccess)`

  Sets the Access context to use for the following methods.

  - Category.getAllChildren (...)
  - Category.getChildren (...)
  - Category.getParent (...)
  - Content.getAuthoringTemplateID (...)
  - Content.getCategoriesIds (...)
  - Content.getParents (...)
  - Document.getOwners (...)
  - EditableLibraryComponent.getAuthors (...)
  - EditableLibraryComponent.getOwners (...)
  - FileComponentDelegate.getFile (...)
  - FileComponentDelegate.getFileName (...)
  - ImageComponent.getImageFileName (...)
  - ImageComponentDelegate.getImage (...)
  - LibraryComponent.getAuthors (...)
  - LibraryComponent.getOwners (...)
  - LibraryImageComponent.getImageFileName (...)
  - Reference.clear(...)
  - Reference.replace(...)
  - SiteArea.getDefaultContent (...)
  - SiteArea.getParent (...)
  - Site.getDefaultContent (...)
  - SiteFrameworkContainer.getAllChildren (...)
  - SiteFrameworkContainer.getChildren (...)
  - SiteFrameworkContainer.getTemplateMapping (...)
  - Taxonomy.getChildren (...)
  - UserProfile.getCategories (...)
  - Workspace.ContentSearch(...)
  - Workspace.exists(...)
  - Workspace.findByIdInIndex (...)
  - Workspace.findByName(...)
  - Workspace.findByType (...)
  - Workspace.findComponentByName (...)
  - Workspace.findContentByAuthoringTemplate (...)
  - Workspace.findContentByCategory(...)
  - Workspace.findContentByPath (...)
  - Workspace.findContentByWorkflowStage (...)
  - Workspace.findContentModifiedBetween (...)
  - Workspace.findContentModifiedSince (...)
  - Workspace.isInName2IdIndex (...)
  - Workspace.getById (...)
  - Workspace.isMemberOfgroup (...)
  - Workspace.Taxonomy.getAllChildren (...)
  - Workspace.clearReferences(...)
  - Workspace.getReferences (...)
  - Workspace.replaceReferences(...)

  The Access context is either execute or read, determined by the boolean specified.

  `if the value is true the system will set the access context to execute(live) access
  else it will use read access. ```

  Note: The Access context used in the API can be set at any time, after the creation of the workspace.

  Parameters:
    `liveAccess` - boolean true/false to use execute(live) access/read access respectively

### useUserAccess

    void useUserAccess(boolean userAccess)

  Sets the Access context to use for the following methods.

  - Category.getAllChildren (...)
  - Category.getChildren (...)
  - Category.getParent (...)
  - Content.getAuthoringTemplateID (...)
  - Content.getCategoriesIds (...)
  - Content.getParents (...)
  - Document.getOwners (...)
  - EditableLibraryComponent.getAuthors (...)
  - EditableLibraryComponent.getOwners (...)
  - FileComponentDelegate.getFile (...)
  - FileComponentDelegate.getFileName (...)
  - ImageComponent.getImageFileName (...)
  - ImageComponentDelegate.getImage (...)
  - LibraryComponent.getAuthors (...)
  - LibraryComponent.getOwners (...)
  - LibraryImageComponent.getImageFileName (...)
  - Reference.clear(...)
  - Reference.replace(...)
  - SiteArea.getDefaultContent (...)
  - SiteArea.getParent (...)
  - Site.getDefaultContent (...)
  - SiteFrameworkContainer.getAllChildren (...)
  - SiteFrameworkContainer.getChildren (...)
  - SiteFrameworkContainer.getTemplateMapping (...)
  - Taxonomy.getChildren (...)
  - UserProfile.getCategories (...)
  - Workspace.ContentSearch(...)
  - Workspace.createDocumentId(...)
  - Workspace.exists(...)
  - Workspace.findByIdInIndex (...)
  - Workspace.findByName(...)
  - Workspace.findByType (...)
  - Workspace.findComponentByName (...)
  - Workspace.findContentByAuthoringTemplate (...)
  - Workspace.findContentByCategory(...)
  - Workspace.findContentByPath (...)
  - Workspace.findContentByWorkflowStage (...)
  - Workspace.findContentModifiedBetween (...)
  - Workspace.findContentModifiedSince (...)
  - Workspace.isInName2IdIndex (...)
  - Workspace.getById (...)
  - Workspace.isMemberOfgroup (...)
  - Workspace.Taxonomy.getAllChildren (...)
  - Workspace.clearReferences(...)
  - Workspace.getReferences (...)
  - Workspace.replaceReferences(...)

  The Access context is either User or Contributor, determined by the boolean specified.

  `if the value is true the system will set the access context to User access
  else it will use Contributor access. ```

  Note: The Access context used in the API can be set at any time, after the creation of the workspace.

  Parameters:
    `userAccess` - boolean true/false to use User access/Contributor access respectively

### move

    void move(DocumentId<? extends Document> documentId,
              DocumentId<? extends Document> newParentId)
              throws IllegalDocumentTypeException,
                     AuthorizationException,
                     DocumentRetrievalException,
                     DuplicateChildException

  Moves a document and adds it under a new parent. This method can be used for moving documents within or between libraries.

  The following document types are supported:

  - Content
  - Site Areas
  - Categories
  - Folders
  - Presentation Templates
  - Authoring Templates
  - Library Components

  Parameters:
    `documentId` - the `DocumentId`of the document to be moved``
    `newParentId` - the `DocumentId` of the parent to move the document to
  Throws:
    `IllegalDocumentTypeException` - if documentId and parentId aren't valid
    `AuthorizationException` - if the user does not have access to perform this operation on the document or parent.
    `DocumentRetrievalException` - if documentId can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path

### move

    void move(Placeable doc,
              PlacementLocation location,
              MoveOptions moveOptions)
              throws IllegalDocumentTypeException,
                     AuthorizationException,
                     DocumentRetrievalException,
                     DuplicateChildException

  Moves the supplied `Placeable` document to the target location according to the rules specified by the `moveOptions` parameter.

  Parameters:
    `doc` - the `Placeable` document to be moved.
    `location` - the `PlacementLocation` for the moved document.
    `moveOptions` - Specifies optional parameters for the move.
  Throws:
    `IllegalDocumentTypeException` - if doc or location aren't valid
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if the document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the target location.

### move

    void move(Document doc,
              ParentLocation location,
              MoveOptions moveOptions)
              throws IllegalDocumentTypeException,
                     AuthorizationException,
                     DocumentRetrievalException,
                     DuplicateChildException

  Moves the supplied document to the new parent according to the rules specified by the `moveOptions` parameter.

  Parameters:
    `doc` - the document to be moved.
    `location` - the `ParentLocation` for the moved document.
    `moveOptions` - Specifies optional parameters for the move.
  Throws:
    `IllegalDocumentTypeException` - if doc isn't valid
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if the document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path

### moveToLibrary

    void moveToLibrary(DocumentLibrary target,
                       DocumentId<? extends Document> docId)
                       throws AuthorizationException,
                              DocumentRetrievalException,
                              DuplicateChildException

  This method moves non-hierarchical or root items to another library. If the item is hierarchical, an `IllegalDocumentTypeException` will be thrown.

  Parameters:
    `target` - the `DocumentLibrary` that the document will be moved to
    `docId` - the `DocumentId` of the document to be moved
  Throws:
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if docId Document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path

### moveSiteFrameworkDocument

    @Deprecated
    void moveSiteFrameworkDocument(DocumentId docId,
                                              DocumentId newParentId,
                                              DocumentId siblingId,
                                              int position)
                                   throws IllegalDocumentTypeException,
                                          AuthorizationException,
                                          DocumentRetrievalException,
                                          DuplicateChildException

  Deprecated. use Workspace.move(Placeable, PlacementLocation, MoveOptions) instead.

  This method moves hierarchical items (`SiteArea`, `Content`, or `ContentLink` to another library. If the item is not hierarchical, an `IllegalDocumentTypeException` will be thrown.

  If the `ChildPosition` is `ChildPosition.BEFORE` or `ChildPosition.AFTER`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `ChildPosition` is `ChildPosition.START` or `ChildPosition.END` then the `siblingId` parameter, if it is not `null`, will be ignored.

  Parameters:
    `docId` - the `DocumentId` of the document to be moved
    `newParentId` - the `DocumentId` of the parent for the moved document
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (`docId`)
  Throws:
    `IllegalDocumentTypeException` - if docId is not the ID of a `Content` or `SiteArea`.
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if docId Document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path

### moveCategory

    @Deprecated
    void moveCategory(DocumentId categoryId,
                                 DocumentId newParentId)
                      throws IllegalDocumentTypeException,
                             AuthorizationException,
                             DocumentRetrievalException

  Deprecated. Use Workspace.move instead

  Moves a category and adds it under a new parent. This method can be used for moving categories within or between libraries.

  Parameters:
    `categoryId` - the `DocumentId`of the category to be copied``
    `newParentId` - the `DocumentId` of the parent for the new copy of the category
  Throws:
    `IllegalDocumentTypeException` - if categoryId is not the ID of a `Category`, or the newParentId is not the ID of a `Category` or `Taxonomy`
    `AuthorizationException` - if the user does not have access to perform this operation on the category or parent.
    `DocumentRetrievalException` - if categoryId Document can not be retrieved
  See Also:
    `move(com.ibm.workplace.wcm.api.DocumentId, com.ibm.workplace.wcm.api.DocumentId)`

### copy

    <T extends Document> T copy(DocumentId<T> documentId,
                                DocumentId newParentId)
                            throws IllegalDocumentTypeException,
                                   AuthorizationException,
                                   DocumentRetrievalException,
                                   DuplicateChildException,
                                   DocumentCreationException

  Copies a document and adds it under a new parent. This method can be used for copying documents within or between libraries.

  The following document types are supported:

  - Content
  - Site Areas
  - Categories
  - Folders
  - Presentation Templates
  - Authoring Templates
  - Library Components

  Parameters:
    `documentId` - the `DocumentId`of the document to be copied``
    `newParentId` - the `DocumentId` of the parent for the new copy
  Returns:
    the new copied document as a `Document`
  Throws:
    `IllegalDocumentTypeException` - if documentId and parentId aren't valid
    `AuthorizationException` - if the user does not have access to perform this operation on the document or parent.
    `DocumentRetrievalException` - if documentId can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `DocumentCreationException`

### copy

    Document copy(Placeable doc,
                  PlacementLocation location,
                  CopyOptions copyOptions)
                  throws IllegalDocumentTypeException,
                         AuthorizationException,
                         DocumentRetrievalException,
                         DuplicateChildException,
                         DocumentCreationException

  Copies the supplied `Positionable` document to the target location according to the rules specified by the `copyOptions` parameter.

  Parameters:
    `doc` - the `Positionable` document to be copied.
    `location` - the `PlacementLocation` for the new copy.
    `copyOptions` - Specifies optional parameters for the copy. If no options are specified this method will copy the supplied document only.
  Returns:
    the new copied document as a `Document`
  Throws:
    `IllegalDocumentTypeException` - if doc or target aren't valid
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if the document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the target location.
    `DocumentCreationException` - if the new document could not be created for other reasons.

### copy

    <T extends Document> T copy(T doc,
                                ParentLocation location,
                                CopyOptions copyOptions)
                            throws IllegalDocumentTypeException,
                                   AuthorizationException,
                                   DocumentRetrievalException,
                                   DuplicateChildException,
                                   DocumentCreationException

  Copies the supplied document to the new parent according to the rules specified by the `copyOptions` parameter.

  Parameters:
    `doc` - the document to be copied.
    `location` - the `ParentLocation` for the new copy.
    `copyOptions` - Specifies optional parameters for the copy. If no options are specified this method will copy the supplied document only.
  Returns:
    the new copied document as a `Document`
  Throws:
    `IllegalDocumentTypeException` - if doc isn't valid
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if the document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `DocumentCreationException` - if the new document could not be created for other reasons

### copyToLibrary

    <T extends Document> Document copyToLibrary(DocumentLibrary target,
                                                DocumentId<T> docId)
                           throws AuthorizationException,
                                  DocumentRetrievalException,
                                  DuplicateChildException,
                                  DocumentCreationException,
                                  IllegalDocumentTypeException

  This method copies non-hierarchical or root items to another library. If the item is hierarchical, an `IllegalDocumentTypeException` will be thrown.

  Parameters:
    `target` - the `DocumentLibrary` that the document will be copied to
    `docId` - the `DocumentId` of the document to be copied
  Returns:
    The copied document
  Throws:
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if docId Document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `DocumentCreationException` - if the new document could not be created for other reasons
    `IllegalDocumentTypeException`

### copyToLibrary

    <T extends Document> Document copyToLibrary(DocumentLibrary target,
                                                DocumentId<T> docId,
                                                CopyOptions copyOptions)
                           throws AuthorizationException,
                                  DocumentRetrievalException,
                                  DuplicateChildException,
                                  DocumentCreationException,
                                  IllegalDocumentTypeException

  This method copies non-hierarchical or root items to another library. If the item is hierarchical, an `IllegalDocumentTypeException` will be thrown.

  Parameters:
    `target` - the `DocumentLibrary` that the document will be copied to
    `docId` - the `DocumentId` of the document to be copied
    `copyOptions` - Specifies optional parameters for the copy. If no options are specified this method will copy the supplied document only. Example for the CopyOptions that go with non hierarchical items are `RenameCopyOption` and `CopyIntoProjectOption`
  Returns:
    The copied document
  Throws:
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if docId Document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `DocumentCreationException` - if the new document could not be created for other reasons
    `IllegalDocumentTypeException`

### copySiteFrameworkDocument

    @Deprecated
    Document copySiteFrameworkDocument(DocumentId docId,
                                                  DocumentId newParentId,
                                                  DocumentId siblingId,
                                                  int position)
                                       throws IllegalDocumentTypeException,
                                              AuthorizationException,
                                              DocumentRetrievalException,
                                              DuplicateChildException,
                                              DocumentCreationException

  Deprecated. use Workspace.copy(Placeable, PlacementLocation, CopyOptions) instead.

  This method copies hierarchical items (`SiteArea`, `Content`, or `ContentLink` to another library. If the item is not hierarchical, an `IllegalDocumentTypeException` will be thrown.

  If the `position` is `BEFORE (position = 2)` or `AFTER (position = 3`, then the `siblingId` parameter must be specified. If it is not, then an `IllegalArgumentException` will be thrown. If the `position` is `ChildPosition.START - (position = 0)` or `ChildPosition.END (position = 1)` then the `siblingId` parameter, if it is not `null`, will be ignored.

  Parameters:
    `docId` - the `DocumentId` of the document to be copied
    `newParentId` - the `DocumentId` of the parent for the new copy
    `siblingId` - the `DocumentId` of the sibling document, if any. May be `null`, according to the rules stated
    `position` - the position of the child (`docId`)
  Returns:
    The copied document
  Throws:
    `IllegalDocumentTypeException` - if docId is not the ID of a `Content` or `SiteArea`.
    `AuthorizationException` - if the user does not have access to perform this operation
    `DocumentRetrievalException` - if docId Document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `DocumentCreationException` - if the new document could not be created for other reasons

### copyCategory

    @Deprecated
    Document copyCategory(DocumentId categoryId,
                                     DocumentId newParentId)
                          throws IllegalDocumentTypeException,
                                 AuthorizationException,
                                 DocumentRetrievalException,
                                 DuplicateChildException,
                                 DocumentCreationException

  Deprecated. use Workspace.copy(Document, ParentLocation, CopyOptions) instead.

  Copies a category and adds it under a new parent. This method can be used for copying categories within or between libraries.

  Parameters:
    `categoryId` - the `DocumentId`of the category to be copied``
    `newParentId` - the `DocumentId` of the parent for the new copy of the category
  Returns:
    The copied document
  Throws:
    `IllegalDocumentTypeException` - if categoryId is not the ID of a `Category`, or the newParentId is not the ID of a `Category` or `Taxonomy`
    `AuthorizationException` - if the user does not have access to perform this operation on the category or parent.
    `DocumentRetrievalException` - if categoryId Document can not be retrieved
    `DuplicateChildException` - if a document with the same name already exists at the same path
    `DocumentCreationException` - if the new document could not be created for other reasons
  See Also:
    `copy(com.ibm.workplace.wcm.api.DocumentId, com.ibm.workplace.wcm.api.DocumentId)`

### lock

    void lock(DocumentId<? extends Document> docId)
              throws OperationFailedException

  Locks the document (draft or non-draft) provided by the `DocumentId`.

  Parameters:
    `docId` - Document to be locked
  Throws:
    `OperationFailedException`

### unlock

    void unlock(DocumentId<? extends Document> docId)
                throws OperationFailedException

  Unlocks the document (draft or non-draft) provided by the `DocumentId`.

  Parameters:
    `docId` - Document to be unlocked
  Throws:
    `OperationFailedException`

### isLocked

    boolean isLocked(DocumentId<? extends Document> docId)
                     throws OperationFailedException

  Indicates whether the `DocumentId` provided is locked or not

  Parameters:
    `docId` - Document to check whether it is locked
  Returns:
    true if locked, false otherwise
  Throws:
    `OperationFailedException`

### isSystemWorkspace

    boolean isSystemWorkspace()

  Returns `true` if this `Workspace` will act with system credentials Indicates this `Workspace` will perform operations with system credentials.

  Returns:
    true if this `Workspace` will act with system credentials, otherwise false.

### createTaxonomy

    Taxonomy createTaxonomy()
                            throws DocumentCreationException,
                                   AuthorizationException

  Creates a new `Taxonomy`. The new `Taxonomy` is returned.

  Returns:
    the new `Taxonomy` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createCategory

    Category createCategory(DocumentId parentId)
                            throws DocumentCreationException,
                                   AuthorizationException,
                                   IllegalDocumentTypeException

  Creates a new `Category` under the given parent. The parent can be a Taxonomy or a Category.

  Parameters:
    `parentId` - ID of the parent Taxonomy or Category
  Returns:
    the new `Category` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
    `IllegalDocumentTypeException` - if the specified parent is not a Taxonomy or Category

### createPresentationTemplate

    PresentationTemplate createPresentationTemplate()
                                                    throws DocumentCreationException,
                                                           AuthorizationException

  Creates a new `PresentationTemplate`. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `PresentationTemplate` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access

### createAuthoringTemplate

    AuthoringTemplate createAuthoringTemplate()
                                              throws DocumentCreationException,
                                                     AuthorizationException

  Creates a new `AuthoringTemplate`. Note that an `AuthoringTemplate` is referred to as a "Content Template" since 8.0 in the Authoring UI. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `AuthoringTemplate` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
  Since:
    7.0

### createSiteAreaTemplate

    SiteAreaTemplate createSiteAreaTemplate()
                                            throws DocumentCreationException,
                                                   AuthorizationException

  Creates a new `SiteAreaTemplate`. The parent folder can be set using `Folder.addDocument(Document, boolean)`.

  Returns:
    the new `SiteAreaTemplate` object
  Throws:
    `DocumentCreationException` - if the object cannot be created
    `AuthorizationException` - if the user does not have access
  Since:
    8.0

### hasAccess

    boolean hasAccess(DocumentId<? extends Document> id,
                      Access access)

  Checks if the user of the `Workspace` has the specified access to specified document.

  Parameters:
    `id` - the document to perform the access check on
    `access` - the access role to check
  Returns:
    true if the user has the specified access, otherwise false

### hasAccess

    boolean hasAccess(DocumentId<? extends Document> id,
                      UserProfile profile,
                      Access access)

  Checks if the `UserProfile` has the specified access to specified document.

  Parameters:
    `id` - the document to perform the access check on
    `profile` - the user profile to perform the access check for
    `access` - the access role to check
  Returns:
    true if the user has the specified access, otherwise false

### hasAccess

    @Deprecated
    boolean hasAccess(DocumentId<? extends Document> id,
                                 int securityAccessType)

  Deprecated. since 8.5 use `hasAccess(DocumentId, Access)` instead

  Checks if the user of the `Workspace` has the specified access to specified document.

  This method supports the following access types:

  - User (`Workspace.SECURITY_USER_ACCESS`)
  Contributor (`Workspace.SECURITY_CONTRIBUTOR_ACCESS`)
  - Editor (`Workspace.SECURITY_EDITOR_ACCESS`)
  - Manager (`Workspace.SECURITY_MANAGER_ACCESS`)

  Parameters:
    `id` - the document to perform the access check on
    `securityAccessType` - the access type to check
  Returns:
    true if the user has the specified access to the specified document, false if not

### hasAccess

    @Deprecated
    boolean hasAccess(DocumentId<? extends Document> id,
                                 UserProfile user,
                                 int securityAccessType)

  Deprecated. since 8.5 `hasAccess(DocumentId, UserProfile, Access)` instead

  Checks if the `UserProfile` has the specified access to specified document.

  This method supports the following access types:

  - User (`Workspace.SECURITY_USER_ACCESS`)
  Contributor (`Workspace.SECURITY_CONTRIBUTOR_ACCESS`)
  - Editor (`Workspace.SECURITY_EDITOR_ACCESS`)
  - Manager (`Workspace.SECURITY_MANAGER_ACCESS`)

  Parameters:
    `id` - the document to perform the access check on
    `user` - the UserProfile to perform the access check for
    `securityAccessType` - the access type to check
  Returns:
    true if the user has the specified access to the specified document, false if not

### findContentByWorkflowStage

    @Deprecated
    DocumentIdIterator findContentByWorkflowStage(DocumentId[] workflowStages,
                                                             java.lang.String[] users,
                                                             int userRoles)
                                                  throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); [for userRoles=ROLE_AUTHOR] Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.authorsContain(users)); [for userRoles=ROLE_OWNER] Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageIn(workflowStages), Selectors.ownersContain(users)); [for userRoles=ROLE_APPROVER] Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageIn(workflowStages), WorkflowSelectors.statusEquals(Status.DRAFT), WorkflowSelectors.approversContains(users)); WorkflowSelectors.approversContains queryService.execute(query);

  Find content by workflow stage for users in particular roles. When calling this method with userRoles set to ROLE_APPROVER, only drafts are searched.

  Parameters:
    `workflowStages` - The `WorkflowStages` that we want to find content in
    `users` - The usernames that we want to find content for. These are the full name of the user, as returned by methods such as `UserProfile.getUsername()`, and not the short name.
    `userRoles` - The roles that the specified users are in. Valid values are ROLE_AUTHOR, ROLE_APPROVER and ROLE_OWNER. When ROLE_APPROVER is used, only drafts are searched.
  Returns:
    an iterator of Ids of `Content` items in the given workflow stage that are visible to the current user
  Throws:
    `IllegalDocumentTypeException` - if the IDs are not of type Workflow Stage
    `java.lang.IllegalArgumentException` - if the workflow stage or user parameters are empty, if any of the workflow stage or user parameter values within the arrays are null, or if userRoles are not valid

### findContentByWorkflowStage

    @Deprecated
    DocumentIdIterator findContentByWorkflowStage(DocumentId[] ids)
                                                  throws IllegalDocumentTypeException

  Deprecated. From 8.0 onwards, use the QueryService to query for items. For example: QueryService queryService = getQueryService(); Query query = createQuery(Content.class).addSelector(WorkflowSelectors.stageContains(ids)); queryService.execute(query);

  Returns an iterator of all content in the given workflow stages.

  Parameters:
    `ids` - the list of IDs of the workflow stages
  Returns:
    an iterator of IDs of content items in the given stage
  Throws:
    `IllegalDocumentTypeException`

### login

    void login()

  Performs a login at the Workspace level.

  This method allows the caller to perform a single high-level login to the underlying WCM Repository before executing a set of WCM API method calls that form part of a request. This improves the performance of all WCM API method calls made within that request.

  When using this method it is essential to ensure that the 'logout' method is called once the work is complete (and before the 'Repository.endWorkspace()' method is called if applicable as per the endWorkspace method's JavaDoc). The required way to use this method to ensure that this condition is met, is as follows:

  `try
  {
  // Perform Login
  Workspace.login()
  // Call WCM API method cals for current request
  ...
  }
  finally
  {
  // Perform logout
  Workspace.logout()
  }
  WCM_API.getRepository().endWorkspace(); // if appropriate`

  Note 1: For multi-threaded applications, the login/logout will need to be done per thread.

  Note 2: For long running applications, you will need to periodically re-login (before the session expires) to obtain optimum performance.

### logout

    void logout()

  Performs a logout at the Workspace level

  This method should be used in conjunction with Workspace.login, see the Workspace.login() method for usage information

  See Also:
    `login()`

### isLoggedIntoWorkspace

    boolean isLoggedIntoWorkspace()

  Indicates whether this `Workspace` has been logged into on the current thread.

  Returns:
    `true` if `Workspace.login` has been called on this `Workspace` on the current thread.

### hasUserAccess

    boolean hasUserAccess(DocumentId<? extends Document> documentId)
                          throws OperationFailedException

  Checks if user associated with the workspace has User Acccess to the given DocumentId

  Parameters:
    `documentId` - DocumentID to perform the access check for
  Returns:
    true if this user has User access, false if not
  Throws:
    `OperationFailedException` - if error occured when accessing repository

### hasContributorAccess

    boolean hasContributorAccess(DocumentId<? extends Document> documentId)
                                 throws OperationFailedException

  Checks if user associated with the workspace has Contributor Acccess to the given DocumentId

  Parameters:
    `documentId` - DocumentID to perform the access check for
  Returns:
    true if this user has Contributor access, false if not
  Throws:
    `OperationFailedException` - if error occured when accessing repository

### hasEditorAccess

    boolean hasEditorAccess(DocumentId<? extends Document> documentId)
                            throws OperationFailedException

  Checks if user associated with the workspace has Editor Acccess to the given DocumentId

  Parameters:
    `documentId` - DocumentID to perform the access check for
  Returns:
    true if this user has Editor access, false if not
  Throws:
    `OperationFailedException` - if error occured when accessing repository

### hasManagerAccess

    boolean hasManagerAccess(DocumentId<? extends Document> documentId)
                             throws OperationFailedException

  Checks if user associated with the workspace has Manager Acccess to the given DocumentId

  Parameters:
    `documentId` - DocumentID to perform the access check for
  Returns:
    true if this user has Manager access, false if not
  Throws:
    `OperationFailedException` - if error occured when accessing repository

### useDistinguishedNames

    void useDistinguishedNames(boolean distinguishedNames)

  Sets the `Workspace` to use distinguished names users. Setting to true indicates to the `Workspace` that users will be passed in and returned using their distinguished names rather than their common names.

  Parameters:
    `distinguishedNames` - true for distinguished names, false for common names

### isDistinguishedNamesUsed

    boolean isDistinguishedNamesUsed()

  Indicates whether this `Workspace` is set to use distinguished names for users Returns `true` if this `Workspace` is set to use distinguished names rather than their common names.

  Returns:
    true if this `Workspace` is set to use Distinguished Names, otherwise false

### findItemsDeletedBefore

    <T extends Document> DocumentIdIterator<T> findItemsDeletedBefore(java.util.Date deletedBeforeDate,
                                                                      DocumentType<T> documentType,
                                                                      DocumentId workflowStage)

  Returns a DocumentIdIterator of deleted documents restricted by date, document type and workflow stage.

  Parameters:
    `deletedBeforeDate` - limits the results to documents deleted before the given date.
    A `null` parameter will default to the current system date and time.
    `workflowStage` - constrains the results set to documents deleted while in the given workflow stage.
    A `null` will default to all workflow stages.
    `documentType` - limits the results set by document type.
    A `null` will default to all document types.
  Returns:
    DocumentIdIterator of deleted documents match specified criteria.

### findItemsDeletedSince

    <T extends Document> DocumentIdIterator<T> findItemsDeletedSince(java.util.Date deletedSinceDate,
                                                                     DocumentType<T> documentType,
                                                                     DocumentId workflowStage)

  Returns a DocumentIdIterator of documents restricted by date, workflow stage and document type

  Parameters:
    `deletedSinceDate` - limits the result to documents deleted since the given date.
    A `null` parameter will default to the current system date and time.
    `documentType` - limits the result set by document type.
    A `null` will default to all document types.
    `workflowStage` - constrains the result set to documents deleted while in the given workflow stage.
    A `null` will default to all workflow stages.
  Returns:
    DocumentIdIterator of documentID matches criteria.

### findItemsDeletedBetween

    <T extends Document> DocumentIdIterator<T> findItemsDeletedBetween(java.util.Date deletedStartDate,
                                                                       java.util.Date deletedEndDate,
                                                                       DocumentType<T> documentType,
                                                                       DocumentId workflowStage)

  Returns a DocumentIdIterator of documents restricted by date, workflow stage and document type

  Parameters:
    `deletedStartDate` - limits the result to documents deleted since the given date.
    A `null` parameter will default to the current system date and time.
    `deletedEndDate` - limits the result to documents deleted before the given date.
    A `null` parameter will default to the current system date and time.
    `documentType` - limits the result set by document type.
    A `null` will default to all document types.
    `workflowStage` - constrains the result set to documents deleted while in the given workflow stage.
    A `null` will default to all workflow stages.
  Returns:
    DocumentIdIterator of documentID matches criteria.

### purge

    java.lang.String[] purge(DocumentId<? extends Document> id)
                             throws DocumentPurgeException,
                                    AuthorizationException

  Purges an item with the given `DocumentId`.

  Parameters:
    `id` - document id to purge
  Returns:
    Array of error messages. If purge successful, then empty array will return.
  Throws:
    `DocumentPurgeException` - due to any reason item not able to deleted in repository,
    such as item is referenced, item has children, item has draft copy...
    `AuthorizationException` - in case current API user is not authorized to purge the given document

### findAllByPath

    DocumentIdIterator findAllByPath(java.lang.String namePath,
                                     DocumentType documentType,
                                     int workflowStatusFilter,
                                     DocumentLibrary[] documentLibraries)

  Returns a `DocumentIdIterator` for the items on the supplied relative name path in the supplied document libraries.

  Note: When querying for draft items, the name of the actual item being searched for (within the path) is case-sensitive

  Only returns `DocumentId`s that the current user has 'USER' access to.

  Parameters:
    `namePath` - The relative name path to the items to return. For hierarchical items such as `Content`, `SiteArea`s, `Category`s, `Folder`s `PresentationTemplate`s, `AuthoringTemplate`s, and `LibraryComponent`s, this is full path of names to the item excluding the `DocumentLibrary`, whereas for non-hierarchical items such as `Site`s, `Taxonomy`s, `Workflow`s, `WorkflowStages`s and `WorkflowActions`, this is the name of the item. Preset Folders should not be included in the path.
    `documentType` - The `DocumentType` of the item(s) being returned
    `workflowStatusFilter` - The workflow status filter to use
    `documentLibraries` - The `DocumentLibrary`s to query.
  Returns:
    a `DocumentIdIterator` for the items on the supplied relative path in the supplied document libraries.

### getIdentityBuilder

    IdentityBuilder getIdentityBuilder()

  Get an identity builder, which allows conversion between DocumentId's and ReST URIs.

  Returns:
    an identity builder
  Since:
    8.5

### getQueryService

    QueryService getQueryService()

  Obtains an instance of `QueryService` which is associated with this workspace.

  Returns:
    the QueryService instance
  Since:
    7.0

### getVersioningService

    VersioningService getVersioningService()

  Obtains an instance of `VersioningService` which is associated with this workspace.

  Returns:
    the VersioningService instance
  Since:
    8.0

### getProjectId

    DocumentId getProjectId()

  Returns the `DocumentId` of the `Project` associated with this `Workspace`

  Returns:
    the `DocumentId` of the `Project` associated with this `Workspace` OR `NULL` if one is not set

### setProjectId

    void setProjectId(DocumentId projectId)
                      throws IllegalDocumentTypeException

  Sets the `Project` associated with this `Workspace` from henceforth.

  Effects the following methods only when `Workspace.WORKFLOWSTATUS_DRAFT` items are selected, and causes only drafts associated with the specified `Project` to be returned

  - Workspace.findAllByPath
  - Workspace.findByName
  - Workspace.findByPath
  - Workspace.findByType
  - Workspace.findContentByAuthoringTemplate
  - Workspace.findContentByCategory
  - Workspace.findContentByWorkflowStage
  - Workspace.findContentModifiedBetween
  - Workspace.findContentModifiedSince
  - Workspace.findDocumentsModifiedBetween
  - Workspace.findDocumentsModifiedSince
  Setting the projectId as `null` will mean that no `Project` will be associated with this `Workspace` from henceforth.

  Parameters:
    `projectId` - the `DocumentId` of the `Project` to associate with this `Workspace`, or null to remove the `Project` association
  Throws:
    `IllegalDocumentTypeException` - if the supplied `DocumentId` is not a project

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD