|
|||||||||
| 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 |
ROLE_APPROVER
Constant for Content Approver |
static int |
ROLE_AUTHOR
Constant for Content Author |
static int |
ROLE_OWNER
Constant for Content Owner |
static int |
SECURITY_CONTRIBUTOR_ACCESS
security CONTRIBUTOR access |
static int |
SECURITY_DELETE_ACCESS
Deprecated. Use manager access |
static int |
SECURITY_EDIT_ACCESS
Deprecated. Use editor access |
static int |
SECURITY_EDITOR_ACCESS
security EDITOR access |
static int |
SECURITY_MANAGER_ACCESS
security MANAGER access |
static int |
SECURITY_READ_ACCESS
Deprecated. Use contributor access |
static int |
SECURITY_USER_ACCESS
security USER access |
static java.lang.String |
WCM_ERROR_KEY
|
static java.lang.String |
WCM_RENDERINGCONTEXT_KEY
|
static java.lang.String |
WCM_WORKSPACE_KEY
|
static int |
WORKFLOWSTATUS_ALL
workflow status for draft, published or expired. |
static int |
WORKFLOWSTATUS_DRAFT
workflow status for draft These constants can be bit-OR'ed together |
static int |
WORKFLOWSTATUS_EXPIRED
workflow status for expired. |
static int |
WORKFLOWSTATUS_PUBLISHED
workflow status for published These constants can be bit-OR'ed together |
| Method Summary | |
|---|---|
void |
clearReferences(Reference[] references)
Clears all the refences represented by the array of Reference instances. |
DocumentIdIterator |
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 |
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. |
Document |
copyCategory(DocumentId categoryId,
DocumentId newParentId)
Copies a category and adds it under a new parent. |
Document |
copySiteFrameworkDocument(DocumentId docId,
DocumentId newParentId,
DocumentId siblingId,
int position)
This method copies hierarchical items ( SiteArea,
Content, or ContentLink to another library. |
Document |
copyToLibrary(DocumentLibrary target,
DocumentId docId)
This method copies non-hierarchical or root items to another library. |
Category |
createCategory(DocumentId parentId)
Creates a new Category under the given parent. |
Content |
createContent(DocumentId authoringTemplateId)
Deprecated. use createContent(authoringTemplateId, parentSiteAreaId, siblingId, position) instead. |
Content |
createContent(DocumentId authoringTemplateId,
DocumentId parentSiteAreaId,
DocumentId siblingId,
int position)
Creates a new Content object, based on an
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. |
LibraryDateComponent |
createDateComponent()
Creates a new LibraryDateComponent. |
DocumentId |
createDocumentId(java.lang.String stringId)
Creates a new DocumentId object from a String
representation of the ID. |
DocumentIdIterator |
createDocumentIdIterator(DocumentId[] documentIds)
create a new DocumentIdIterator from an array of given
DocumentId |
LibraryDocumentManagerComponent |
createDocumentManagerComponent()
Creates a new LibraryDocumentManagerComponent. |
LibraryFileComponent |
createFileComponent()
Creates a new LibraryFileComponent. |
LibraryHTMLComponent |
createHTMLComponent()
Creates a new LibraryHTMLComponent. |
LibraryImageComponent |
createImageComponent()
Creates a new LibraryImageComponent. |
LibraryLinkComponent |
createLinkComponent()
Creates a new LibraryLinkComponent. |
LibraryNumericComponent |
createNumericComponent()
Creates a new LibraryNumericComponent. |
PresentationTemplate |
createPresentationTemplate()
Creates a new PresentationTemplate. |
RenderingContext |
createRenderingContext(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response,
java.util.Map requestParameters)
Creates a new rendering context. |
RenderingContext |
createRenderingContext(javax.portlet.PortletRequest request,
javax.portlet.PortletResponse response,
java.util.Map requestParameters,
java.lang.String wcmWebAppPath,
java.lang.String wcmServletPath)
Creates a new rendering context. |
RenderingContext |
createRenderingContext(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
java.util.Map requestParameters)
Creates a new rendering context. |
RenderingContext |
createRenderingContext(javax.servlet.ServletRequest request,
javax.servlet.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. |
LibraryShortTextComponent |
createShortTextComponent()
Creates a new LibraryShortTextComponent. |
Site |
createSite()
Creates a new Site. |
SiteArea |
createSiteArea()
Deprecated. use createSiteArea(parentId) instead |
SiteArea |
createSiteArea(DocumentId parentId,
DocumentId siblingId,
int position)
Creates a new SiteArea under the given parent. |
LibraryStyleSheetComponent |
createStyleSheetComponent()
Creates a new LibraryStyleSheetComponent. |
Taxonomy |
createTaxonomy()
Creates a new Taxonomy. |
LibraryTextComponent |
createTextComponent()
Creates a new LibraryTextComponent. |
LibraryUserSelectionComponent |
createUserSelectionComponent()
Creates a new LibraryUserSelectionComponent. |
java.lang.String[] |
delete(DocumentId id)
Deletes an editable document from the WCM repository. |
boolean |
exists(DocumentId id)
Tests the existence of an object in the repository. |
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 p_workflowStatusFilter)
Returns an iterator of IDs of all objects of the given type with the specified name that match the given workflow status filter. |
DocumentIdIterator |
findByPath(java.lang.String p_path,
int p_workflowStatusFilter)
Returns an iterator of DocumentId for a given 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 p_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)
Returns an iterator of IDs of all library components with the specified name. |
DocumentIdIterator |
findContentByAuthoringTemplate(DocumentId id)
Returns an iterator of IDs of Content which has been
created using the specified authoring template. |
DocumentIdIterator |
findContentByAuthoringTemplate(DocumentId id,
int p_workflowStatusFilter)
Returns an iterator of IDs of Content which has been
created using the specified authoring template that match the given
workflow status filter. |
DocumentIdIterator |
findContentByCategory(DocumentId id)
Returns an iterator of IDs of all Content that has the
given Category in its profile. |
DocumentIdIterator |
findContentByCategory(DocumentId id,
int p_workflowStatusFilter)
Returns an iterator of IDs of all Content that has the
given Category in its profile that match the given
workflow status filter. |
DocumentIdIterator |
findContentByPath(java.lang.String path)
Returns an iterator of IDs of Content with the given path. |
DocumentIdIterator |
findContentByWorkflowStage(DocumentId id)
Returns an iterator of IDs of Content in a specified
WorkflowStage. |
DocumentIdIterator |
findContentByWorkflowStage(DocumentId[] ids)
Returns an iterator of all content in the given workflow stages. |
DocumentIdIterator |
findContentByWorkflowStage(DocumentId[] workflowStages,
java.lang.String[] users,
int userRoles)
Find content by workflow stage for users in particular roles. |
DocumentIdIterator |
findContentModifiedBetween(java.util.Date startDate,
java.util.Date endDate)
Returns an iterator of IDs of all Content that have been
modified between the specified start and end dates. |
DocumentIdIterator |
findContentModifiedBetween(java.util.Date startDate,
java.util.Date endDate,
int p_workflowStatusFilter)
Returns an iterator of IDs of all Content that have been
modified between the specified start and end dates that match the given
workflow status filter. |
DocumentIdIterator |
findContentModifiedSince(java.util.Date modifiedDate)
Returns an iterator of IDs of all Content that have been
modified since the specified date. |
DocumentIdIterator |
findContentModifiedSince(java.util.Date modifiedDate,
int p_workflowStatusFilter)
Returns an iterator of IDs of all Content that have been
modified since the specified date that match the given workflow status
filter. |
DocumentIdIterator |
findDocumentsByWorkflowStage(DocumentId[] ids)
Returns an iterator of all Documents in the given workflow stages. |
DocumentIdIterator |
findDocumentsByWorkflowStage(DocumentId[] workflowStages,
java.lang.String[] users,
int userRoles)
Find Documents by workflow stage for users in particular roles. |
DocumentIdIterator |
findDocumentsModifiedBetween(java.util.Date startDate,
java.util.Date endDate)
Returns an iterator of IDs of all Documents that have been
modified between the specified start and end dates. |
DocumentIdIterator |
findDocumentsModifiedBetween(java.util.Date startDate,
java.util.Date endDate,
int workflowStatusFilter)
Returns an iterator of IDs of all Documents that have been
modified between the specified start and end dates. |
DocumentIdIterator |
findDocumentsModifiedSince(java.util.Date modifiedDate)
Returns an iterator of IDs of all Documents that have been
modified since the specified date. |
DocumentIdIterator |
findDocumentsModifiedSince(java.util.Date modifiedDate,
int workflowStatusFilter)
Returns an iterator of IDs of all Documents that have been
modified since the specified date. |
DocumentIdIterator |
findItemsDeletedBefore(java.util.Date deletedBeforeDate,
DocumentType documentType,
DocumentId workflowStage)
Returns a DocumentIdIterator of deleted documents restricted by date, document type and workflow stage. |
DocumentType |
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. |
Document |
getById(DocumentId id)
Return object for the given Id. |
Document |
getById(DocumentId id,
boolean asReference)
Return object for the given Id. |
DocumentIterator |
getByIds(DocumentIdIterator documentIdIterator,
boolean asReference)
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 |
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
null if a DocumentLibrary with that name
does not exist or the caller does not have access |
DocumentId |
getDraftIdByPublishedId(DocumentId p_id)
Returns the DocumentId of the draft document associated
with the supplied published/expired DocumentId |
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 p_id,
boolean p_maintainCase,
boolean p_decodeURL)
Returns the path of the document with the given id. |
DocumentId |
getPublishedIdByDraftId(DocumentId p_id)
Returns the DocumentId of the published or expired document associated
with the supplied draft DocumentId |
Reference[] |
getReferences(DocumentId documentId)
Returns an array of Reference instances that represent all references to the
specified DocumentId. |
Reference[] |
getReferencesFrom(DocumentId documentId)
Returns an array of Reference instances that represent all references from the
specified DocumentId. |
UserProfile |
getUserProfile()
Returns the UserProfile for the user of this
Workspace. |
boolean |
hasAccess(DocumentId id,
int securityAccessType)
Checks if the user of the Workspace has the specified access to specified document. |
boolean |
hasAccess(DocumentId id,
UserProfile user,
int securityAccessType)
Checks if the UserProfile has the specified access to specified document. |
boolean |
hasContributorAccess(DocumentId documentId)
Checks if user associated with the workspace has Contributor Acccess to the given DocumentId |
boolean |
hasEditorAccess(DocumentId documentId)
Checks if user associated with the workspace has Editor Acccess to the given DocumentId |
boolean |
hasManagerAccess(DocumentId documentId)
Checks if user associated with the workspace has Manager Acccess to the given DocumentId |
boolean |
hasUserAccess(DocumentId 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 docId)
Indicates whether the DocumentId provided is locked or not |
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 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 |
moveCategory(DocumentId categoryId,
DocumentId newParentId)
Moves a category and adds it under a new parent. |
void |
moveSiteFrameworkDocument(DocumentId docId,
DocumentId newParentId,
DocumentId siblingId,
int position)
This method moves hierarchical items ( SiteArea,
Content, or ContentLink to another library. |
void |
moveToLibrary(DocumentLibrary target,
DocumentId docId)
This method moves non-hierarchical or root items to another library. |
java.lang.String[] |
purge(DocumentId 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 newRefereeId)
Replaces all the refences 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. |
void |
setCurrentDocumentLibrary(DocumentLibrary library)
Sets the current DocumentLibrary for this
Workspace. |
void |
unlock(DocumentId 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
static final java.lang.String WCM_RENDERINGCONTEXT_KEY
static final java.lang.String WCM_ERROR_KEY
static final int ROLE_OWNER
static final int ROLE_AUTHOR
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 SECURITY_READ_ACCESS
static final int SECURITY_EDIT_ACCESS
static final int SECURITY_DELETE_ACCESS
static final int SECURITY_USER_ACCESS
static final int SECURITY_CONTRIBUTOR_ACCESS
static final int SECURITY_EDITOR_ACCESS
static final int SECURITY_MANAGER_ACCESS
| Method Detail |
|---|
Content createContent(DocumentId authoringTemplateId)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
createContent(authoringTemplateId, 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.
authoringTemplateId - the 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
IllegalDocumentTypeException - if the template is not an AuthoringTemplate
Content createContent(DocumentId authoringTemplateId,
DocumentId parentSiteAreaId,
DocumentId siblingId,
int position)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
Content object, based on an
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.PREVIOUS or
ChildPosition.NEXT, 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.
authoringTemplateId - the 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 (docId)
Content object based on the specified template
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
IllegalDocumentTypeException - if specified template is not an
AuthoringTemplate, 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.PREVIOUS or
ChildPosition.NEXT, 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)
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
createSiteArea(parentId) instead
SiteArea. This simply creates the object, it
does not position it in the site framework. The SiteArea
may be positioned in the site framework by finding the desired
parent object, and calling the insertSiteArea method.
SiteArea object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
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.
If the ChildPosition is ChildPosition.PREVIOUS or
ChildPosition.NEXT, 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.
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 (docId)
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
Site createSite()
throws DocumentCreationException,
AuthorizationException
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.
LibraryFileComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryImageComponent createImageComponent()
throws DocumentCreationException,
AuthorizationException
LibraryImageComponent. The image that this
library component refers to can then be set through the
LibraryImageComponent itself.
LibraryImageComponent object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
LibraryDocumentManagerComponent createDocumentManagerComponent()
throws DocumentCreationException,
AuthorizationException
LibraryDocumentManagerComponent. The DocumentManager document that this
library component refers to can then be set through the
LibraryDocumentManagerComponent itself.
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.
LibraryHTMLComponent 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.
LibraryHTMLComponent 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.
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.
LibraryNumericComponent 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.
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.
LibraryShortTextComponent 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.
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.
LibraryUserSelectionComponent 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.
LibraryStyleSheetComponent 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[] delete(DocumentId id)
throws DocumentDeleteException,
AuthorizationException
Editable interface, or the
EditableLibraryComponent interface.
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 id)
id - the ID of the object
DocumentId getPublishedIdByDraftId(DocumentId p_id)
throws DocumentRetrievalException,
IllegalDocumentTypeException
DocumentId of the published or expired document associated
with the supplied draft DocumentId
p_id - The id of the draft document whose published equilivant 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
DocumentId getDraftIdByPublishedId(DocumentId p_id)
throws DocumentRetrievalException,
IllegalDocumentTypeException
DocumentId of the draft document associated
with the supplied published/expired DocumentId
p_id - The id of the published/expired document whose draft equilivant 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
Document getById(DocumentId 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
Document getById(DocumentId 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
DocumentIterator getByIds(DocumentIdIterator 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)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.
type - the type of object
DocumentIdIterator findByType(DocumentType type,
int p_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.
type - the type of objectp_workflowStatusFilter - 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.
type - the type of objectname - the name of the object to find
DocumentIdIterator findByName(DocumentType type,
java.lang.String name,
int p_workflowStatusFilter)
null will never be returned.
type - the type of objectname - the name of the object to findp_workflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
DocumentIdIterator findComponentByName(java.lang.String name)
null will never be returned.
name - the name of the library component to retrieve
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
DocumentIdIterator findContentModifiedSince(java.util.Date modifiedDate,
int p_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 datep_workflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
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
DocumentIdIterator findContentModifiedBetween(java.util.Date startDate,
java.util.Date endDate,
int p_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 rangep_workflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
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
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
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
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
java.lang.String[] getMemberNames()
null will never be returned.
String array of names of users and groupsjava.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 p_id,
boolean p_maintainCase,
boolean p_decodeURL)
throws DocumentRetrievalException,
IllegalDocumentTypeException
p_id - The document whose path should be returnedp_maintainCase - Specifies whether the case of the path should be maintainedp_decodeURL - Specifies whether the returned URL should be decoded
Note: Maintaining the case is slower and isn't required for use in WCM Rendering, however it is required for searching for 'Draft' items by path OR generating URLs to prerendered content on unix platforms, due to the case sensitivity of that platform
DocumentRetrievalException - if a document with the given id can't be located
IllegalDocumentTypeException - if specified id is not a
Content, ContentLink, Site Area or Site.
DocumentIdIterator findByPath(java.lang.String p_path,
int p_workflowStatusFilter)
DocumentId for a given 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.
p_path - the 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.p_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 p_path is null.DocumentIdIterator findContentByPath(java.lang.String path)
Content with the given path.
If the 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.
path - the path to the content, site or site area.
DocumentIdIterator findContentByAuthoringTemplate(DocumentId id)
throws IllegalDocumentTypeException
Content which has been
created using the specified authoring template. If the user does not
have access to the specified AuthoringTemplate, or any
of the Content based on the specified template, then the
iterator will contain no elements. null will never
be returned.
id - the ID of the AuthoringTemplate
Content based on the
specified AuthoringTemplate that are visible to the
current user
IllegalDocumentTypeException - if the ID is not of type
Authoring Template.
DocumentIdIterator findContentByAuthoringTemplate(DocumentId id,
int p_workflowStatusFilter)
throws IllegalDocumentTypeException
Content 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 AuthoringTemplate, or any
of the Content based on the specified template, then the
iterator will contain no elements. null will never
be returned.
id - the ID of the AuthoringTemplatep_workflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
Content based on the
specified AuthoringTemplate that are visible to the
current user
IllegalDocumentTypeException - if the ID is not of type
Authoring Template.
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
retrict 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.
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
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
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.
id - the ID of the Category
Content with this category
that are visible to the current user
IllegalDocumentTypeException - if the ID is not of type Category.
DocumentIdIterator findContentByCategory(DocumentId id,
int p_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.
id - the ID of the Categoryp_workflowStatusFilter - the constant to say whether to retrieve
DRAFT, PUBLISHED, and/or EXPIRED
Content with this category
that are visible to the current user
IllegalDocumentTypeException - if the ID is not of type Category.
DocumentIdIterator contentSearch(DocumentId templateId,
DocumentId[] siteAreaIds,
DocumentId[] categoryIds,
java.lang.String[] keywords)
All Content documents that meet the specified search criteria will be returned, regardless of their status (search results can include unpublished documents).
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 contentSearch(DocumentId templateId,
DocumentId[] siteAreaIds,
DocumentId[] categoryIds,
java.lang.String[] keywords,
boolean matchAllKeys)
All Content documents that meet the specified search criteria will be returned, regardless of their status (search results can include unpublished documents).
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".
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
ServiceNotAvailableExceptioncreateRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map),
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
ServiceNotAvailableExceptioncreateRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map),
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
ServiceNotAvailableExceptioncreateRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map),
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
createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map),
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
createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map),
createRenderingContext(javax.servlet.ServletRequest, javax.servlet.ServletResponse, java.util.Map, java.lang.String, java.lang.String)
DocumentId 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 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.
stringId - the String representation of the
required DocumentId
DocumentId object
DocumentIdCreationException - if the ID could not be createdDocumentId.toString()DocumentIdIterator createDocumentIdIterator(DocumentId[] 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(javax.servlet.ServletRequest request,
javax.servlet.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(javax.servlet.ServletRequest request,
javax.servlet.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(javax.portlet.PortletRequest request,
javax.portlet.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(javax.portlet.PortletRequest request,
javax.portlet.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.
DocumentType 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 documentId)
throws OperationFailedException,
AuthorizationException
Reference instances that represent all references to the
specified DocumentId.
documentId -
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 documentId)
throws OperationFailedException,
AuthorizationException
Reference instances that represent all references from the
specified DocumentId.
documentId -
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 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.
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 getDocumentLibraries()
DocumentLibrary objects visible
to the user of this Workspace.
DocumentLibrary objectsDocumentLibrary getDocumentLibrary(java.lang.String libraryName)
DocumentLibrary with the specified name, or
null if a DocumentLibrary with that name
does not exist or the caller does not have access
libraryName - the name of the DocumentLibrary to
retrieve
DocumentLibrary object representing the library
with the given name, or null if it does not exist.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 moveToLibrary(DocumentLibrary target,
DocumentId 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
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.PREVIOUS or
ChildPosition.NEXT, 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
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
Document copyToLibrary(DocumentLibrary target,
DocumentId 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
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
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
- 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
void lock(DocumentId docId)
throws OperationFailedException
DocumentId.
docId - Document to be locked
OperationFailedException
void unlock(DocumentId docId)
throws OperationFailedException
DocumentId.
docId - Document to be unlocked
OperationFailedException
boolean isLocked(DocumentId 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.
PresentationTemplate object
DocumentCreationException - if the object cannot be created
AuthorizationException - if the user does not have access
boolean hasAccess(DocumentId id,
int securityAccessType)
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
boolean hasAccess(DocumentId id,
UserProfile user,
int securityAccessType)
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
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
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 hasUserAccess(DocumentId documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repository
boolean hasContributorAccess(DocumentId documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repository
boolean hasEditorAccess(DocumentId documentId)
throws OperationFailedException
documentId - DocumentID to perform the access check for
OperationFailedException - if error occured when accessing repository
boolean hasManagerAccess(DocumentId 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
DocumentIdIterator findItemsDeletedBefore(java.util.Date deletedBeforeDate,
DocumentType 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.
java.lang.String[] purge(DocumentId 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||