|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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.
| 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. |
|
|
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. |
|
|
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. |
|
|
copyToLibrary(DocumentLibrary target,
DocumentId<T> docId)
This method copies non-hierarchical or root items to another library. |
|
|
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. |
|
|
createDocumentId(java.lang.String stringId)
Creates a new DocumentId object from a String
representation of the ID. |
|
|
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. |
|
|
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); |
|
|
findItemsDeletedBefore(java.util.Date deletedBeforeDate,
DocumentType<T> documentType,
DocumentId workflowStage)
Returns a DocumentIdIterator of deleted documents restricted by date, document type and workflow stage. |
|
|
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 |
|
|
findItemsDeletedSince(java.util.Date deletedSinceDate,
DocumentType<T> documentType,
DocumentId workflowStage)
Returns a DocumentIdIterator of documents restricted by date, workflow stage and document type |
|
|
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. |
|
|
getById(DocumentId<T> id)
Return object for the given Id. |
|
|
getById(DocumentId<T> id,
boolean asReference)
Return object for the given Id. |
|
|
getById(DocumentId<T> id,
boolean asReference,
boolean loadElements)
Return object for the given Id. |
|
|
getByIds(DocumentIdIterator<T> documentIdIterator,
boolean asReference)
Return the list of Document objects for the given DocumentIds as a
DocumentIterator. |
|
|
getByIds(DocumentIdIterator<T> documentIdIterator,
boolean asReference,
boolean loadElements)
Return the list of Document objects for the given DocumentIds 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 |
|
|
getDraftIdByPublishedId(DocumentId<T> id)
Deprecated. Use getDraftIdsByPublishedId(com.ibm.workplace.wcm.api.DocumentId |
|
|
getDraftIdByPublishedId(DocumentId<T> id,
DocumentId<Project> projectId)
Returns the DocumentId of the draft document associated
with the supplied published/expired and project DocumentId. |
|
|
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 |
|
|
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 |
|---|
static final java.lang.String WCM_WORKSPACE_KEY
Workspace in the page context. For example:
Workspace workspace = (Workspace) pageContext.getAttribute(Workspace.WCM_WORKSPACE_KEY);
static final java.lang.String WCM_RENDERINGCONTEXT_KEY
RenderingContext in the request. For example:
RenderingContext renderingContext = (RenderingContext) request.getAttribute(Workspace.WCM_RENDERINGCONTEXT_KEY);
static final java.lang.String WCM_ERROR_KEY
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);
@Deprecated static final int ROLE_OWNER
@Deprecated static final int ROLE_AUTHOR
@Deprecated static final int ROLE_APPROVER
static final int WORKFLOWSTATUS_DRAFT
static final int WORKFLOWSTATUS_PUBLISHED
static final int WORKFLOWSTATUS_EXPIRED
static final int WORKFLOWSTATUS_ALL
static final int PENDING_WORKFLOWSTATUS_NONE
static final int PENDING_WORKFLOWSTATUS_PUBLISHED
static final int PENDING_WORKFLOWSTATUS_EXPIRED
static final int PENDING_WORKFLOWSTATUS_DELETED
@Deprecated static final int SECURITY_READ_ACCESS
@Deprecated static final int SECURITY_EDIT_ACCESS
@Deprecated static final int SECURITY_DELETE_ACCESS
@Deprecated static final int SECURITY_USER_ACCESS
Access.USER instead
@Deprecated static final int SECURITY_CONTRIBUTOR_ACCESS
Access.CONTRIBUTOR instead
@Deprecated static final int SECURITY_EDITOR_ACCESS
Access.EDITOR instead
@Deprecated static final int SECURITY_MANAGER_ACCESS
Access.MANAGER instead
@Deprecated static final int SECURITY_APPROVER_ACCESS
Access.APPROVER instead
static final java.lang.String SORT_KEY_CREATION_DATE
static final java.lang.String SORT_KEY_PUBLISH_DATE
static final java.lang.String SORT_KEY_EXPIRY_DATE
static final java.lang.String SORT_KEY_GENERAL_DATE_ONE
static final java.lang.String SORT_KEY_GENERAL_DATE_TWO
static final java.lang.String SORT_KEY_LASTMODIFIED_DATE
static final java.lang.String SORT_KEY_NAME
static final java.lang.String SORT_KEY_TITLE
static final java.lang.String SORT_KEY_DESCRIPTION
static final java.lang.String SORT_KEY_NONE
| Method Detail |
|---|
@Deprecated
Content createContent(DocumentId contentTemplateId)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
createContent(contentTemplateId, parentSiteAreaId, siblingId, position) instead.
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.
contentTemplateId - the content authoring template ID
Content object based on the specified template
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
Content createContent(DocumentId contentTemplateId,
DocumentId parentSiteAreaId,
DocumentId siblingId,
int position)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
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.
contentTemplateId - the content authoring template IDparentSiteAreaId - the parent site area IDsiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (See ChildPosition)
Content object based on the specified template
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.
ContentLink createContentLink(DocumentId contentId,
DocumentId parentSiteAreaId,
DocumentId siblingId,
int position)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
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.
contentId - the linked Content's IDparentSiteAreaId - the parent site area IDsiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (See ChildPosition)
ContentLink object
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.
ContentLink createContentLink(DocumentId contentId,
DocumentId parentSiteAreaId,
DocumentId siblingId,
int position,
LinkOptions linkOptions)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
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.
contentId - the linked Content's IDparentSiteAreaId - the parent site area IDsiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (docId)linkOptions - Specifies optional parameters for the link creation. Can be Null or an empty
LinkOptions object
ContentLink object
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.
SiteArea createSiteArea()
throws DocumentCreationException,
AuthorizationException
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.
SiteArea object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
SiteArea createSiteArea(DocumentId siteAreaTemplateId)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
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.
siteAreaTemplateId - the site area authoring template ID
SiteArea object
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
SiteArea createSiteArea(DocumentId parentId,
DocumentId siblingId,
int position)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
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.
parentId - ID of the parent Site or SiteAreasiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (See ChildPosition)
SiteArea object
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
SiteArea createSiteArea(DocumentId siteAreaTemplateId,
DocumentId parentId,
DocumentId siblingId,
int position)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
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.
siteAreaTemplateId - the site area authoring template IDparentId - ID of the parent Site or SiteAreasiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (See ChildPosition)
SiteArea object
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
@Deprecated
Site createSite()
throws DocumentCreationException,
AuthorizationException
createSiteArea() instead.
Site. The new Site is returned.
Site object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryFileComponent createFileComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryFileComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
Folder createFolder(Folder parent)
throws DocumentCreationException,
AuthorizationException
parent - parent folder id
AuthorizationException - if the user does not have access permission
DocumentCreationException - if the folder cannot be created
Folder createFolder(DocumentId parentId)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
parentId - the parent folder id
AuthorizationException - if the user does not have access permission
DocumentCreationException - if the folder cannot be created
IllegalDocumentTypeException - if parent Id is not a folder
LibraryImageComponent createImageComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryImageComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
@Deprecated
LibraryDocumentManagerComponent createDocumentManagerComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryDocumentManagerComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryHTMLComponent createHTMLComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryHTMLComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryJSPComponent createJSPComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryJSPComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryLinkComponent createLinkComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryLinkComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryDateComponent createDateComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryDateComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryNumericComponent createNumericComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryNumericComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryNavigatorComponent createNavigatorComponent()
throws DocumentCreationException,
AuthorizationException
LibraryNavigatorComponent.
The parent folder can be set using Folder.addDocument(Document, boolean).
LibraryNavigatorComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryMenuComponent createMenuComponent()
throws DocumentCreationException,
AuthorizationException
LibraryMenuComponent
The parent folder can be set using Folder.addDocument(Document, boolean).
LibraryMenuComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryListPresentationComponent createListPresentationComponent()
throws DocumentCreationException,
AuthorizationException
LibraryListPresentationComponent
The parent folder can be set using Folder.addDocument(Document, boolean).
LibraryListPresentationComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibrarySearchComponent createSearchComponent()
throws DocumentCreationException,
AuthorizationException
LibrarySearchComponent
The parent folder can be set using Folder.addDocument(Document, boolean).
LibrarySearchComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryPersonalizationComponent createPersonalizationComponent()
throws DocumentCreationException,
AuthorizationException
LibraryPersonalizationComponent
The parent folder can be set using Folder.addDocument(Document, boolean).
LibraryPersonalizationComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryRichTextComponent createRichTextComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryRichTextComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryShortTextComponent createShortTextComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryShortTextComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryStyleSheetComponent createStyleSheetComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryStyleSheetComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryTextComponent createTextComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryTextComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryUserSelectionComponent createUserSelectionComponent()
throws DocumentCreationException,
AuthorizationException
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).
LibraryUserSelectionComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
Workflow createWorkflow()
throws DocumentCreationException,
AuthorizationException
Workflow. The stages and other properties
that the workflow refers to can then be set through the Workflow itself.
Workflow object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
WorkflowStage createWorkflowStage()
throws DocumentCreationException,
AuthorizationException
WorkflowStage. The actions and other properties
that the workflowStage refers to can then be set through the WorkflowStage itself.
WorkflowStage object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
java.lang.String[] save(Document object)
throws DocumentSaveException,
AuthorizationException,
DuplicateChildException
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.
object - the object to save
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
java.lang.String[] save(Document object,
DocumentId parent,
SaveOptions saveOptions)
throws DocumentSaveException,
AuthorizationException,
DuplicateChildException,
IllegalDocumentTypeException
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.
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.
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
java.lang.String[] delete(DocumentId id)
throws DocumentDeleteException,
AuthorizationException
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
IOExceptions while deleting the item.
id - the ID of the object to delete
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 accessboolean exists(DocumentId<? extends Document> id)
id - the ID of the document
boolean exists(java.lang.String id)
String can be a DocumentId.toString()
or DocumentId.getId()
id - the ID of the object
boolean hasPublishedIdByDraftId(DocumentId<? extends Document> id)
throws IllegalDocumentTypeException
DocumentId exists
id - The id of the draft document for which the existence of an equivalent draft made
DocumentId exists
IllegalDocumentTypeException - if an non-draft document id is supplied
<T extends Document> DocumentId<T> getPublishedIdByDraftId(DocumentId<T> id)
throws DocumentRetrievalException,
IllegalDocumentTypeException
DocumentId of the published or expired document associated
with the supplied draft DocumentId
id - The id of the draft document whose published equivalent should be returned
DocumentId of the published or expired document associated
with the supplied draft DocumentId
DocumentRetrievalException - if an associated published document can't be located
IllegalDocumentTypeException - if an non-draft document id is supplied
boolean hasDraftIdsByPublishedId(DocumentId<? extends Document> id)
throws IllegalDocumentTypeException
DocumentId exists
id - The id of the published/expired document for which the existence of an equivalent draft made
DocumentId exists
IllegalDocumentTypeException - if a draft document id is supplied
java.lang.IllegalArgumentException - if the supplied id is null.
boolean hasDraftIdByPublishedId(DocumentId<? extends Document> id,
DocumentId<Project> projectId)
DocumentId exists. Even if
the current workspace user does not have access to see the draft this check will return
true if it exists.
id - The id of the published/expired document for which the existence of an equivalent draft madeprojectId - the id of the project which the draft must be part of
DocumentId exists
<T extends Document> DocumentIdIterator<T> getDraftIdsByPublishedId(DocumentId<T> id)
throws DocumentRetrievalException,
IllegalDocumentTypeException
DocumentIdIterator of the draft documents associated
with the supplied published/expired DocumentId
id - The id of the published/expired document whose draft equivalent should be returned
DocumentIdIterator of the draft documents associated
with the supplied published/expired DocumentId
DocumentRetrievalException - if an associated draft document can't be located
IllegalDocumentTypeException - if a draft document id is supplied
@Deprecated
<T extends Document> DocumentId<T> getDraftIdByPublishedId(DocumentId<T> id)
throws DocumentRetrievalException,
IllegalDocumentTypeException
getDraftIdsByPublishedId(com.ibm.workplace.wcm.api.DocumentId)
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)
id - The id of the published/expired document whose draft equivalent should be returned
DocumentId of the draft document associated
with the supplied published/expired DocumentId
DocumentRetrievalException - if an associated draft document can't be located
IllegalDocumentTypeException - if a draft document id is supplied
<T extends Document> DocumentId<T> getDraftIdByPublishedId(DocumentId<T> id,
DocumentId<Project> projectId)
throws DocumentRetrievalException,
IllegalDocumentTypeException
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
id - The id of the published/expired document whose draft equivalent should be returnedprojectId - the id of the project which the draft must be part of
DocumentId of the draft document associated
with the supplied published/expired and project DocumentId
DocumentRetrievalException - if an associated draft document can't be located
IllegalDocumentTypeException - if a draft document id is supplied
<T extends Document> T getById(DocumentId<T> id)
throws DocumentRetrievalException,
AuthorizationException
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.
id - the ID of the object to retrieve
DocumentRetrievalException - if the object cannot be retrieved
AuthorizationException - if the user does not have access
<T extends Document> T getById(DocumentId<T> id,
boolean asReference)
throws DocumentRetrievalException,
AuthorizationException
Document then asReference should be false.
id - the ID of the object to retrieveasReference - when true this will not clone the internal Document.
DocumentRetrievalException - if the object cannot be retrieved
AuthorizationException - if the user does not have access
<T extends Document> T getById(DocumentId<T> id,
boolean asReference,
boolean loadElements)
throws DocumentRetrievalException,
AuthorizationException
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.
id - the ID of the object to retrieveasReference - 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.
DocumentRetrievalException - if the object cannot be retrieved
AuthorizationException - if the user does not have access
<T extends Document> DocumentIterator<T> getByIds(DocumentIdIterator<T> documentIdIterator,
boolean asReference)
Document objects for the given DocumentIds 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 DocumentIds which the client
of the API has collected in some manner.
Any Documents 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 Documents then asReference should be false.
documentIdIterator - the iterator of IDs of the Documents to retrieveasReference - when true this will not clone the internal Document.
createDocumentIdIterator(DocumentId[]),
getById(DocumentId, boolean)
<T extends Document> DocumentIterator<T> getByIds(DocumentIdIterator<T> documentIdIterator,
boolean asReference,
boolean loadElements)
Document objects for the given DocumentIds 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 DocumentIds which the client
of the API has collected in some manner.
Any Documents 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 Documents 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.
documentIdIterator - the iterator of IDs of the Documents to retrieveasReference - 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.
createDocumentIdIterator(DocumentId[]),
getById(DocumentId, boolean)DocumentIdIterator findByType(DocumentType type)
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);
type - the type of object
DocumentIdIterator findByType(DocumentType type,
int workflowStatusFilter)
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);
type - the type of objectworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
DocumentIdIterator findByName(DocumentType type,
java.lang.String name)
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
type - the type of objectname - the name of the object to find
DocumentIdIterator findByName(DocumentType type,
java.lang.String name,
int workflowStatusFilter)
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
type - the type of objectname - the name of the object to findworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
@Deprecated DocumentIdIterator findComponentByName(java.lang.String name)
null will never be returned.
name - the name of the library component to retrieve
@Deprecated DocumentIdIterator findContentModifiedSince(java.util.Date modifiedDate)
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.
modifiedDate - the date with which to compare Content
last modified date
@Deprecated
DocumentIdIterator findContentModifiedSince(java.util.Date modifiedDate,
int workflowStatusFilter)
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.
modifiedDate - the date with which to compare Content
last modified dateworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
@Deprecated
DocumentIdIterator findContentModifiedBetween(java.util.Date startDate,
java.util.Date endDate)
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.
startDate - the date at the beginning of the rangeendDate - the data at the end of the range
@Deprecated
DocumentIdIterator findContentModifiedBetween(java.util.Date startDate,
java.util.Date endDate,
int workflowStatusFilter)
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.
startDate - the date at the beginning of the rangeendDate - the data at the end of the rangeworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
@Deprecated DocumentIdIterator findDocumentsModifiedSince(java.util.Date modifiedDate)
Documents that have been
modified since the specified date. The IDs returned will include those
for Documents 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.
modifiedDate - the date with which to compare Document
last modified date
@Deprecated
DocumentIdIterator findDocumentsModifiedBetween(java.util.Date startDate,
java.util.Date endDate)
Documents that have been
modified between the specified start and end dates. The IDs returned
will include those for Documents 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.
startDate - the date at the beginning of the rangeendDate - the data at the end of the range
@Deprecated
DocumentIdIterator findDocumentsModifiedSince(java.util.Date modifiedDate,
int workflowStatusFilter)
Documents that have been
modified since the specified date. The IDs returned will include those
for Documents 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.
modifiedDate - the date with which to compare Document
last modified dateworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
@Deprecated
DocumentIdIterator findDocumentsModifiedBetween(java.util.Date startDate,
java.util.Date endDate,
int workflowStatusFilter)
Documents that have been
modified between the specified start and end dates. The IDs returned
will include those for Documents 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.
startDate - the date at the beginning of the rangeendDate - the data at the end of the rangeworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
@Deprecated java.lang.String[] getMemberNames()
null will never be returned.
String array of names of users and groups@Deprecated java.lang.String[] getMemberNames(java.lang.String filter)
null will never be returned.
filter - the filter for searching users and groups
String array of names of users and groups
java.lang.String getPathById(DocumentId<? extends Document> id,
boolean maintainCase,
boolean decodeURL)
throws DocumentRetrievalException,
IllegalDocumentTypeException
This method can return the path for a Sites, SiteAreas, Content, ContentLinks,
Components, Taxonomies, Categories, PresentationTemplates, AuthoringTemplates or Folders.
id - The document whose path should be returnedmaintainCase - Specifies whether the case of the path should be maintaineddecodeURL - 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
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.
java.lang.String getTitlePathById(DocumentId id,
java.util.Locale locale)
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
id - The document whose path should be returnedlocale - The locale to use when generating the path
null
java.lang.IllegalArgumentException - if id or locale is null
<T extends Document> DocumentIdIterator<T> findByPath(java.lang.String namePath,
int workflowStatusFilter)
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.
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.
DocumentId objects with the specified
workflow status for the given path
java.lang.IllegalArgumentException - if path is null.DocumentIdIterator<Content> findContentByPath(java.lang.String namePath)
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.
namePath - the name path to the content, site or site area.
@Deprecated
DocumentIdIterator findContentByAuthoringTemplate(DocumentId id)
throws IllegalDocumentTypeException
TemplatedDocuments which have been
created using the specified authoring template. If the user does not
have access to the specified AuthoringTemplate, or any
of the TemplatedDocuments 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 TemplatedDocuments, not just Content.
id - the ID of the AbstractAuthoringTemplate (either a AuthoringTemplate or a SiteAreaTemplate)
TemplatedDocuments based on the
specified AbstractAuthoringTemplate that are visible to the
current user
IllegalDocumentTypeException - if the ID is not of type
Authoring Template.
@Deprecated
DocumentIdIterator findContentByAuthoringTemplate(DocumentId id,
int workflowStatusFilter)
throws IllegalDocumentTypeException
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 TemplatedDocuments, not just Content.
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
TemplatedDocument based on the
specified AbstractAuthoringTemplate that are visible to the
current user
IllegalDocumentTypeException - if the ID is not of type
Authoring Template.
@Deprecated
DocumentIdIterator findContentByWorkflowStage(DocumentId id)
throws IllegalDocumentTypeException
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.
id - the ID of the WorkflowStage
Content items in the given
stage that are visible to the current user
IllegalDocumentTypeException - if the ID is not of type Workflow Stage.
@Deprecated
DocumentIdIterator findDocumentsByWorkflowStage(DocumentId[] ids)
throws IllegalDocumentTypeException
Documents in the given workflow stages.
ids - the list of IDs of the workflow stages
IllegalDocumentTypeException - if incorrect document id type is passed
@Deprecated
DocumentIdIterator findDocumentsByWorkflowStage(DocumentId[] workflowStages,
java.lang.String[] users,
int userRoles)
throws IllegalDocumentTypeException
Documents by workflow stage for users in particular roles.
When calling this method with userRoles set to ROLE_APPROVER, only drafts are searched.
workflowStages - The WorkflowStages that we want to find documents inusers - 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.
Documents items in the given
workflow stage that are visible to the current user
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
@Deprecated
DocumentIdIterator findContentByCategory(DocumentId id)
throws IllegalDocumentTypeException
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 SiteAreas. 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
TemplatedDocuments with this category
that are visible to the current user
- Throws:
IllegalDocumentTypeException - if the ID is not of type Category.
@Deprecated
DocumentIdIterator findContentByCategory(DocumentId id,
int workflowStatusFilter)
throws IllegalDocumentTypeException
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 SiteAreas. 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 CategoryworkflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
- Returns:
- an iterator of IDs of
TemplatedDocuments with this category
that are visible to the current user
- Throws:
IllegalDocumentTypeException - if the ID is not of type Category.
DocumentIdIterator<Content> contentSearch(DocumentId templateId,
DocumentId[] siteAreaIds,
DocumentId[] categoryIds,
java.lang.String[] keywords)
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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in
their profilekeywords - the IDs of keywords for content to have in its
profile
DocumentIdIterator<Content> contentSearch(DocumentId templateId,
DocumentId[] siteAreaIds,
DocumentId[] categoryIds,
java.lang.String[] keywords,
int workflowStatusFilter)
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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in
their profilekeywords - the IDs of keywords for content to have in its
profileworkflowStatusFilter - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
DocumentIdIterator<Content> contentSearch(DocumentId templateId,
DocumentId[] siteAreaIds,
DocumentId[] categoryIds,
java.lang.String[] keywords,
boolean matchAllKeys)
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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in
their profilekeywords - the IDs of keywords for content to have in its
profilematchAllKeys - indicates whether the search is an "and" search. True for "and",
false for "or".
DocumentIdIterator<Content> contentSearch(DocumentId templateId,
DocumentId[] siteAreaIds,
DocumentId[] categoryIds,
java.lang.String[] keywords,
boolean matchAllKeys,
int workflowStatusFilter)
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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in
their profilekeywords - the IDs of keywords for content to have in its
profilematchAllKeys - 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
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)
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_NAMEWorkspace.SORT_KEY_CREATION_DATEWorkspace.SORT_KEY_PUBLISH_DATEWorkspace.SORY_KEY_DESCRIPTIONWorkspace.SORT_KEY_EXPIRY_DATEWorkspace.SORT_KEY_GENERAL_DATE_ONEWorkspace.SORT_KEY_GENERAL_DATE_TWOWorkspace.SORT_KEY_LASTMODIFIED_DATEWorkspace.SORT_KEY_TITLEWorkspace.SORT_KEY_NONEWorkspace.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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in their profilekeywords - the IDs of keywords for content to have in its profilematchAllCategories - indicates whether the content returned should match all categories (true) or any category (false)includeAncestorSiteAreas - indicates whether to include ancestor site areasincludeDescendantSiteAreas - indicates whether to include descendant site areassortKey1 - Specify one of sort keys as first sort prioritysortKey2 - Specify one of sort keys as second sort prioritysortKey3 - Specify one of sort keys as third sort prioritysortAscending - Specify true for ascending order and false for descending order
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)
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_NAMEWorkspace.SORT_KEY_CREATION_DATEWorkspace.SORT_KEY_PUBLISH_DATEWorkspace.SORY_KEY_DESCRIPTIONWorkspace.SORT_KEY_EXPIRY_DATEWorkspace.SORT_KEY_GENERAL_DATE_ONEWorkspace.SORT_KEY_GENERAL_DATE_TWOWorkspace.SORT_KEY_LASTMODIFIED_DATEWorkspace.SORT_KEY_TITLEWorkspace.SORT_KEY_NONEWorkspace.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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in their profilekeywords - the IDs of keywords for content to have in its profilematchAllCategories - 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 prioritysortKey2 - Specify one of sort keys as second sort prioritysortKey3 - Specify one of sort keys as third sort prioritysortAscending - Specify true for ascending order and false for descending order
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)
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_NAMEWorkspace.SORT_KEY_CREATION_DATEWorkspace.SORT_KEY_PUBLISH_DATEWorkspace.SORY_KEY_DESCRIPTIONWorkspace.SORT_KEY_EXPIRY_DATEWorkspace.SORT_KEY_GENERAL_DATE_ONEWorkspace.SORT_KEY_GENERAL_DATE_TWOWorkspace.SORT_KEY_LASTMODIFIED_DATEWorkspace.SORT_KEY_TITLEWorkspace.SORT_KEY_NONEWorkspace.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.
templateId - the ID of the template to matchsiteAreaIds - the IDs of the site areas to find content incategoryIds - the IDs of categories for content to have in their profilekeywords - the IDs of keywords for content to have in its profilematchAllCategories - 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 prioritysortKey2 - Specify one of sort keys as second sort prioritysortKey3 - Specify one of sort keys as third sort prioritysortAscending - Specify true for ascending order and false for descending orderworkflowStatusFilter - the constant to say whether to retrieve DRAFT, PUBLISHED, and/or EXPIRED
java.lang.String render(RenderingContext renderingContext)
throws ServiceNotAvailableException
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.
renderingContext - the context to render
String
ServiceNotAvailableExceptioncom.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)
java.lang.String render(RenderingContext renderingContext,
ContentComponent component)
throws ServiceNotAvailableException
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.
renderingContext - the RenderingContext to usecomponent - the WCM content component to render
String
ServiceNotAvailableExceptioncom.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)
java.lang.String render(RenderingContext renderingContext,
LibraryComponent component)
throws ServiceNotAvailableException
LibraryComponent using the
specified RenderingContext.
The rendered content is returned as a String, encoded according to the users locale.
renderingContext - the RenderingContext to usecomponent - the component to render
String
ServiceNotAvailableExceptioncom.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)
java.lang.String generateURL(RenderingContext context,
ContentComponent component)
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.
context - the RenderingContext to be usedcomponent - the component
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)
java.lang.String generateURL(RenderingContext context,
LibraryComponent component)
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.
context - the RenderingContext to be usedcomponent - the component
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)
<T extends Document> DocumentId<T> createDocumentId(java.lang.String stringId)
throws DocumentIdCreationException
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.
stringId - the String representation of the
required DocumentId, either the full serialization, or the simple id.
DocumentId object
DocumentIdCreationException - if the ID could not be created
DocumentNotFoundIdCreationException - if the item targeted by the
unique id (from DocumentId.getId()) could not be found.DocumentId.toString(),
DocumentId.getId()<T extends Document> DocumentIdIterator<T> createDocumentIdIterator(DocumentId<T>[] documentIds)
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.
RenderingContext createRenderingContext(ServletRequest request,
ServletResponse response,
java.util.Map requestParameters)
throws OperationFailedException,
AuthorizationException
request - the ServletRequest objectresponse - the ServletResponse objectrequestParameters - 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.
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
RenderingContext createRenderingContext(ServletRequest request,
ServletResponse response,
java.util.Map requestParameters,
java.lang.String wcmWebAppPath,
java.lang.String wcmServletPath)
throws OperationFailedException,
AuthorizationException
request - the ServletRequest objectresponse - the ServletResponse objectrequestParameters - 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
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
RenderingContext createRenderingContext(PortletRequest request,
PortletResponse response,
java.util.Map requestParameters)
throws OperationFailedException,
AuthorizationException
request - the PortletRequest objectresponse - the PortletResponse objectrequestParameters - 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.
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
RenderingContext createRenderingContext(PortletRequest request,
PortletResponse response,
java.util.Map requestParameters,
java.lang.String wcmWebAppPath,
java.lang.String wcmServletPath)
throws OperationFailedException,
AuthorizationException
request - the PortletRequest objectresponse - the PortletResponse objectrequestParameters - 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
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
<T extends WCMApiObject> DocumentType<T> fromString(java.lang.String typeName)
throws IllegalDocumentTypeException
DocumentType for the specified API interface/class
name. The interface/class name specified must be the fully qualified Java
interface name as a String.
typeName - the API interface/class name
DocumentType for the given interface/class name
IllegalDocumentTypeException
Reference[] getReferences(DocumentId<? extends Document> documentId)
throws OperationFailedException,
AuthorizationException
Reference instances that represent all references to the
specified DocumentId.
documentId - should not be null
Reference instances
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.
Reference[] getBranchReferences(DocumentId<? extends Document> documentId)
throws OperationFailedException,
AuthorizationException
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.
documentId - should not be null
Reference instances
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.
Reference[] getBranchReferences(DocumentLibrary library)
throws OperationFailedException,
AuthorizationException
Reference instances that are references from items outside of the
specified DocumentLibrary to the DocumentLibrary or any of the items within the branch.
library - should not be null
Reference instances
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.
Reference[] getReferencesFrom(DocumentId<? extends Document> documentId)
throws OperationFailedException,
AuthorizationException
Reference instances that represent all references from the
specified DocumentId.
documentId - should not be null
Reference instances
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.
void clearReferences(Reference[] references)
throws OperationFailedException,
AuthorizationException
Reference instances.
references - an array of Reference instances obtained
by calling getReferences(...).
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.
void replaceReferences(Reference[] references,
DocumentId<? extends Document> newRefereeId)
throws OperationFailedException,
AuthorizationException,
IllegalTypeChangeException
Reference instances
with the new object represented by the specified DocumentId.
references - an array of Reference instances obtained
by calling getReferences(...).newRefereeId - the DocumentId of the object that is
to be come the new referee.
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.boolean isMemberOfGroup(java.lang.String groupName)
Workspace is a member of the
group with the specified name. This method also checks nested groups.
groupName - the name of the group to check membership
UserProfile getUserProfile()
UserProfile for the user of this
Workspace. The UserProfile allows clients
to retrieve the users categories and keywords.
UserProfile for the user of this
WorkspaceDocumentLibrary getCurrentDocumentLibrary()
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.
DocumentLibrary being used by this
Workspacevoid setCurrentDocumentLibrary(DocumentLibrary library)
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.
library - the DocumentLibrary to usejava.util.Iterator<DocumentLibrary> getDocumentLibraries()
DocumentLibrary objects visible
to the user of this Workspace.
DocumentLibrary objectsDocumentLibrary getDocumentLibrary(java.lang.String libraryName)
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
libraryName - the name or title of the DocumentLibrary to
retrieve
DocumentLibrary object representing the library
with the given name or title, or null if it does not exist.boolean hasDocumentLibrary(java.lang.String libraryName)
DocumentLibrary with the specified name
libraryName - the name of the DocumentLibrary to search for
DocumentLibrary with the specified name, false otherwise@Deprecated void useLiveAccess(boolean liveAccess)
useUserAccess(boolean userAccess)
Sets the Access context to use for the following methods.
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.
liveAccess - boolean true/false to use execute(live) access/read access respectivelyvoid useUserAccess(boolean userAccess)
Sets the Access context to use for the following methods.
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.
userAccess - boolean true/false to use User access/Contributor access respectively
void move(DocumentId<? extends Document> documentId,
DocumentId<? extends Document> newParentId)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException
The following document types are supported:
documentId - the DocumentId of the document to be
movednewParentId - 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
void move(Placeable doc,
PlacementLocation location,
MoveOptions moveOptions)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException
Placeable document to the target location
according to the rules specified by the moveOptions parameter.
doc - the Placeable document to be moved.location - the PlacementLocation for the moved document.moveOptions - Specifies optional parameters for the move.
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.
void move(Document doc,
ParentLocation location,
MoveOptions moveOptions)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException
moveOptions parameter.
doc - the document to be moved.location - the ParentLocation for the moved document.moveOptions - Specifies optional parameters for the move.
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
void moveToLibrary(DocumentLibrary target,
DocumentId<? extends Document> docId)
throws AuthorizationException,
DocumentRetrievalException,
DuplicateChildException
IllegalDocumentTypeException
will be thrown.
target - the DocumentLibrary that the document
will be moved todocId - the DocumentId of the document to be moved
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
@Deprecated
void moveSiteFrameworkDocument(DocumentId docId,
DocumentId newParentId,
DocumentId siblingId,
int position)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException
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.
docId - the DocumentId of the document to be movednewParentId - the DocumentId of the parent for the
moved documentsiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (docId)
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
@Deprecated
void moveCategory(DocumentId categoryId,
DocumentId newParentId)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException
categoryId - the DocumentId of the category to be
copiednewParentId - 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 extends com.ibm.workplace.wcm.api.Document>, com.ibm.workplace.wcm.api.DocumentId extends com.ibm.workplace.wcm.api.Document>)
<T extends Document> T copy(DocumentId<T> documentId,
DocumentId newParentId)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException
The following document types are supported:
documentId - the DocumentId of the document to be
copiednewParentId - 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
Document copy(Placeable doc,
PlacementLocation location,
CopyOptions copyOptions)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException
Positionable document to the target location
according to the rules specified by the copyOptions parameter.
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.
Document
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.
<T extends Document> T copy(T doc,
ParentLocation location,
CopyOptions copyOptions)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException
copyOptions parameter.
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.
Document
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
<T extends Document> Document copyToLibrary(DocumentLibrary target,
DocumentId<T> docId)
throws AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException,
IllegalDocumentTypeException
IllegalDocumentTypeException will be thrown.
target - the DocumentLibrary that the document
will be copied todocId - the DocumentId of the document to be
copied
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
<T extends Document> Document copyToLibrary(DocumentLibrary target,
DocumentId<T> docId,
CopyOptions copyOptions)
throws AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException,
IllegalDocumentTypeException
IllegalDocumentTypeException will be thrown.
target - the DocumentLibrary that the document
will be copied todocId - the DocumentId of the document to be
copiedcopyOptions - 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
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
@Deprecated
Document copySiteFrameworkDocument(DocumentId docId,
DocumentId newParentId,
DocumentId siblingId,
int position)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException
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.
docId - the DocumentId of the document to be copiednewParentId - the DocumentId of the parent for the
new copysiblingId - the DocumentId of the sibling document,
if any. May be null, according to the rules statedposition - the position of the child (docId)
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
@Deprecated
Document copyCategory(DocumentId categoryId,
DocumentId newParentId)
throws IllegalDocumentTypeException,
AuthorizationException,
DocumentRetrievalException,
DuplicateChildException,
DocumentCreationException
categoryId - the DocumentId of the category to be
copiednewParentId - 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)
void lock(DocumentId<? extends Document> docId)
throws OperationFailedException
DocumentId.
docId - Document to be locked
OperationFailedException
void unlock(DocumentId<? extends Document> docId)
throws OperationFailedException
DocumentId.
docId - Document to be unlocked
OperationFailedException
boolean isLocked(DocumentId<? extends Document> docId)
throws OperationFailedException
DocumentId provided is locked or not
docId - Document to check whether it is locked
OperationFailedExceptionboolean isSystemWorkspace()
true if this Workspace will act with
system credentials
Indicates this Workspace will perform operations with
system credentials.
Workspace will act with
system credentials, otherwise false.
Taxonomy createTaxonomy()
throws DocumentCreationException,
AuthorizationException
Taxonomy. The new Taxonomy is returned.
Taxonomy object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
Category createCategory(DocumentId parentId)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
Category under the given parent.
The parent can be a Taxonomy or a Category.
parentId - ID of the parent Taxonomy or Category
Category object
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
PresentationTemplate createPresentationTemplate()
throws DocumentCreationException,
AuthorizationException
PresentationTemplate.
The parent folder can be set using Folder.addDocument(Document, boolean).
PresentationTemplate object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
AuthoringTemplate createAuthoringTemplate()
throws DocumentCreationException,
AuthorizationException
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).
AuthoringTemplate object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
SiteAreaTemplate createSiteAreaTemplate()
throws DocumentCreationException,
AuthorizationException
SiteAreaTemplate.
The parent folder can be set using Folder.addDocument(Document, boolean).
SiteAreaTemplate object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
boolean hasAccess(DocumentId<? extends Document> id,
Access access)
Workspace has the specified access to specified document.
id - the document to perform the access check onaccess - the access role to check
boolean hasAccess(DocumentId<? extends Document> id,
UserProfile profile,
Access access)
UserProfile has the specified access to specified document.
id - the document to perform the access check onprofile - the user profile to perform the access check foraccess - the access role to check
@Deprecated
boolean hasAccess(DocumentId<? extends Document> id,
int securityAccessType)
hasAccess(DocumentId, Access) instead
Workspace has the specified access to specified document.
This method supports the following access types:
Workspace.SECURITY_USER_ACCESS)Workspace.SECURITY_CONTRIBUTOR_ACCESS)
Workspace.SECURITY_EDITOR_ACCESS)Workspace.SECURITY_MANAGER_ACCESS)
id - the document to perform the access check onsecurityAccessType - the access type to check
@Deprecated
boolean hasAccess(DocumentId<? extends Document> id,
UserProfile user,
int securityAccessType)
hasAccess(DocumentId, UserProfile, Access) instead
UserProfile has the specified access to specified document.
This method supports the following access types:
Workspace.SECURITY_USER_ACCESS)Workspace.SECURITY_CONTRIBUTOR_ACCESS)
Workspace.SECURITY_EDITOR_ACCESS)Workspace.SECURITY_MANAGER_ACCESS)
id - the document to perform the access check onuser - the UserProfile to perform the access check forsecurityAccessType - the access type to check
@Deprecated
DocumentIdIterator findContentByWorkflowStage(DocumentId[] workflowStages,
java.lang.String[] users,
int userRoles)
throws IllegalDocumentTypeException
workflowStages - The WorkflowStages that we want to find content inusers - 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.
Content items in the given
workflow stage that are visible to the current user
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
@Deprecated
DocumentIdIterator findContentByWorkflowStage(DocumentId[] ids)
throws IllegalDocumentTypeException
ids - the list of IDs of the workflow stages
IllegalDocumentTypeExceptionvoid login()
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.
void logout()
This method should be used in conjunction with Workspace.login, see the Workspace.login() method for usage information
login()boolean isLoggedIntoWorkspace()
Workspace has been logged into on the current
thread.
true if Workspace.login has been called on this
Workspace on the current thread.
boolean hasUserAccess(DocumentId<? extends Document> documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repository
boolean hasContributorAccess(DocumentId<? extends Document> documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repository
boolean hasEditorAccess(DocumentId<? extends Document> documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repository
boolean hasManagerAccess(DocumentId<? extends Document> documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repositoryvoid useDistinguishedNames(boolean distinguishedNames)
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.
distinguishedNames - true for distinguished names, false for common namesboolean isDistinguishedNamesUsed()
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.
Workspace is set to use Distinguished Names,
otherwise false
<T extends Document> DocumentIdIterator<T> findItemsDeletedBefore(java.util.Date deletedBeforeDate,
DocumentType<T> documentType,
DocumentId workflowStage)
deletedBeforeDate - limits the results to documents deleted before the given date.
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.
null will default to all workflow stages. documentType - limits the results set by document type.
null will default to all document types.
<T extends Document> DocumentIdIterator<T> findItemsDeletedSince(java.util.Date deletedSinceDate,
DocumentType<T> documentType,
DocumentId workflowStage)
deletedSinceDate - limits the result to documents deleted since the given date.
null parameter will default to the current system date and time.documentType - limits the result set by document type.
null will default to all document types.workflowStage - constrains the result set to documents deleted while in the given workflow stage.
null will default to all workflow stages.
<T extends Document> DocumentIdIterator<T> findItemsDeletedBetween(java.util.Date deletedStartDate,
java.util.Date deletedEndDate,
DocumentType<T> documentType,
DocumentId workflowStage)
deletedStartDate - limits the result to documents deleted since the given date.
null parameter will default to the current system date and time.deletedEndDate - limits the result to documents deleted before the given date.
null parameter will default to the current system date and time.documentType - limits the result set by document type.
null will default to all document types.workflowStage - constrains the result set to documents deleted while in the given workflow stage.
null will default to all workflow stages.
java.lang.String[] purge(DocumentId<? extends Document> id)
throws DocumentPurgeException,
AuthorizationException
DocumentId.
id - document id to purge
DocumentPurgeException - due to any reason item not able to deleted in repository,
AuthorizationException - in case current API user is not authorized to purge the given document
DocumentIdIterator findAllByPath(java.lang.String namePath,
DocumentType documentType,
int workflowStatusFilter,
DocumentLibrary[] documentLibraries)
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 DocumentIds that the current user has 'USER' access to.
namePath - The relative name path to the items to return. For hierarchical items such as Content, SiteAreas,
Categorys, Folders PresentationTemplates, AuthoringTemplates,
and LibraryComponents, this is full path of names to the item excluding the DocumentLibrary, whereas
for non-hierarchical items such as Sites, Taxonomys, Workflows, WorkflowStagess
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 returnedworkflowStatusFilter - The workflow status filter to usedocumentLibraries - The DocumentLibrarys to query.
DocumentIdIterator for the items on the supplied relative path in the supplied document libraries.IdentityBuilder getIdentityBuilder()
QueryService getQueryService()
QueryService which is associated with this workspace.
VersioningService getVersioningService()
VersioningService which is associated with this workspace.
DocumentId getProjectId()
DocumentId of the Project associated with this Workspace
DocumentId of the Project associated with this Workspace OR NULL if one is not set
void setProjectId(DocumentId projectId)
throws IllegalDocumentTypeException
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
null will mean that no Project will be associated with this Workspace from henceforth.
projectId - the DocumentId of the Project to associate with this Workspace, or null to remove the Project association
IllegalDocumentTypeException - if the supplied DocumentId is not a project
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||