|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents a view of the WCM repository for a particular user.
| Field Summary | |
static java.lang.String |
COPYRIGHT
Copyright statement |
static java.lang.String |
KEY_DESCRIPTION
|
static java.lang.String |
KEY_NAME
|
static java.lang.String |
KEY_PUBLISH_DATE
|
static java.lang.String |
WCM_ERROR_KEY
|
static java.lang.String |
WCM_RENDERINGCONTEXT_KEY
|
static java.lang.String |
WCM_WORKSPACE_KEY
|
| Method Summary | |
DocumentIdIterator |
contentSearch(DocumentId p_templateId,
DocumentId[] p_siteAreaIds,
DocumentId[] p_categoryIds,
java.lang.String[] p_keywords)
Returns an iterator of IDs of objects that match the given search criteria. |
DocumentIdIterator |
contentSearch(DocumentId p_templateId,
DocumentId[] p_siteAreaIds,
DocumentId[] p_categoryIds,
java.lang.String[] p_keywords,
boolean p_matchAllKeys)
Returns an iterator of IDs of objects that match the given search criteria. |
DocumentIdIterator |
contentSearch(DocumentId p_templateId,
DocumentId[] p_siteAreaIds,
DocumentId[] p_categoryIds,
java.lang.String[] p_keywords,
boolean p_matchAllKeys,
java.lang.String p_sortKey1,
java.lang.String p_sortKey2,
java.lang.String p_sortKey3,
boolean p_asscending)
Returns an iterator of IDs of objects that match the given search criteria. |
Content |
createContent(DocumentId p_authoringTemplateId)
Creates a new Content object, based on an
AuthoringTemplate. |
DocumentId |
createDocumentId(java.lang.String p_stringId)
Creates a new DocumentId object from a String
representation of the ID. |
LibraryFileComponent |
createFileComponent()
Creates a new LibraryFileComponent. |
LibraryHTMLComponent |
createHTMLComponent()
Creates a new LibraryHTMLComponent. |
LibraryImageComponent |
createImageComponent()
Creates a new LibraryImageComponent. |
RenderingContext |
createRenderingContext(javax.portlet.PortletRequest p_request,
javax.portlet.PortletResponse p_response,
java.util.Map p_requestParameters)
Creates a new rendering context. |
RenderingContext |
createRenderingContext(javax.portlet.PortletRequest p_request,
javax.portlet.PortletResponse p_response,
java.util.Map p_requestParameters,
java.lang.String p_wcmWebAppPath,
java.lang.String p_wcmServletPath)
Creates a new rendering context. |
RenderingContext |
createRenderingContext(javax.servlet.ServletRequest p_request,
javax.servlet.ServletResponse p_response,
java.util.Map p_requestParameters)
Creates a new rendering context. |
RenderingContext |
createRenderingContext(javax.servlet.ServletRequest p_request,
javax.servlet.ServletResponse p_response,
java.util.Map p_requestParameters,
java.lang.String p_wcmWebAppPath,
java.lang.String p_wcmServletPath)
Creates a new rendering context. |
Site |
createSite()
Creates a new Site. |
SiteArea |
createSiteArea()
Creates a new SiteArea. |
java.lang.String[] |
delete(DocumentId p_id)
Deletes an editable document from the WCM repository. |
boolean |
exists(DocumentId p_id)
Tests the existence of an object in the repository. |
DocumentIdIterator |
findByName(DocumentType p_type,
java.lang.String p_name)
Returns an iterator of IDs of all objects of the given type with the specified name. |
DocumentIdIterator |
findByType(DocumentType p_type)
Returns an iterator of IDs of all objects of the given type. |
DocumentIdIterator |
findComponentByName(java.lang.String p_name)
Returns an iterator of IDs of all library components with the specified name. |
DocumentIdIterator |
findContentByAuthoringTemplate(DocumentId p_id)
Returns an iterator of IDs of Content which has been
created using the specified authoring template. |
DocumentIdIterator |
findContentByCategory(DocumentId p_id)
Returns an iterator of IDs of all Content that has the
given Category in its profile. |
DocumentIdIterator |
findContentByPath(java.lang.String p_path)
Returns an iterator of IDs of Content with the given path. |
DocumentIdIterator |
findContentByWorkflowStage(DocumentId p_id)
Returns an iterator of IDs of Content in a specified
WorkflowStage. |
DocumentIdIterator |
findContentModifiedBetween(java.util.Date p_startDate,
java.util.Date p_endDate)
Returns an iterator of IDs of all Content that have been
modified between the specified start and end dates. |
DocumentIdIterator |
findContentModifiedSince(java.util.Date p_modifiedDate)
Returns an iterator of IDs of all Content that have been
modified since the specified date. |
DocumentType |
fromString(java.lang.String p_typeName)
Returns the DocumentType for the specified API interface/class
name. |
java.lang.String |
generateURL(RenderingContext p_context,
ContentComponent p_component)
Generate the URL to the given component, in the context of the path in the RenderingContext. |
java.lang.String |
generateURL(RenderingContext p_context,
LibraryComponent p_component)
Generate the URL to the given component, in the context of the path in the RenderingContext. |
Document |
getById(DocumentId p_id)
Retrieves the object with the given ID from the repository. |
java.lang.String[] |
getMemberNames()
Returns a list of names of all users and groups available to WCM. |
java.lang.String[] |
getMemberNames(java.lang.String p_filter)
Returns a list of names of all users and groups available to WCM. |
UserProfile |
getUserProfile()
Returns the UserProfile for the user of this
Workspace. |
boolean |
isDistinguishedNamesUsed()
Checks whether or not the workspace is set to use DNs for user related methods |
boolean |
isMemberOfGroup(java.lang.String p_groupName)
Indicates if the user of this Workspace is a member of the
group with the specified name. |
java.lang.String |
render(RenderingContext p_renderingContext)
Renders the content, according to the RenderingContext that
is passed in. |
java.lang.String |
render(RenderingContext p_renderingContext,
ContentComponent p_component)
Renders the given WCM content component using the specified rendering context. |
java.lang.String |
render(RenderingContext p_renderingContext,
LibraryComponent p_component)
Renders the specified WCM LibraryComponent using the
specified RenderingContext. |
java.lang.String[] |
save(Document p_object)
Saves an editable document to the WCM repository. |
void |
useDistinguishedNames(boolean shouldUseDn)
Sets the Workspace to use full distinguished names for get/set methods that use user information. |
void |
useLiveAccess(boolean liveAccess)
Sets the Access context to use for the following methods: |
| Field Detail |
public static final java.lang.String COPYRIGHT
public static final java.lang.String WCM_WORKSPACE_KEY
public static final java.lang.String WCM_RENDERINGCONTEXT_KEY
public static final java.lang.String WCM_ERROR_KEY
public static final java.lang.String KEY_NAME
public static final java.lang.String KEY_PUBLISH_DATE
public static final java.lang.String KEY_DESCRIPTION
| Method Detail |
public Content createContent(DocumentId p_authoringTemplateId)
throws DocumentCreationException,
AuthorizationException,
IllegalDocumentTypeException
Content object, based on an
AuthoringTemplate. The template ID that is specified must
be for a template that already exists in the WCM system.
p_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
public SiteArea createSiteArea()
throws DocumentCreationException,
AuthorizationException
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 accessSiteFrameworkContainer.insertSiteArea(DocumentId p_priorChildId, DocumentId p_siteAreaId)
public 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
public 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
public 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
public 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
public java.lang.String[] save(Document p_object)
throws DocumentSaveException,
AuthorizationException
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.
p_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
public java.lang.String[] delete(DocumentId p_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.
p_id - the ID of the object to delete
DocumentDeleteException - if the object could not be deleted, or
is not an editable object
AuthorizationException - if the user does not have accesspublic boolean exists(DocumentId p_id)
p_id - the ID of the object
public Document getById(DocumentId p_id)
throws DocumentRetrievalException,
AuthorizationException
p_id - the ID of the object to retrieve
null
DocumentRetrievalException - if the object cannot be retrieved
AuthorizationException - if the user does not have access to the
requested objectpublic DocumentIdIterator findByType(DocumentType p_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.
p_type - the type of object
public DocumentIdIterator findByName(DocumentType p_type,
java.lang.String p_name)
null will never be returned.
p_type - the type of objectp_name - the name of the object to find
public DocumentIdIterator findComponentByName(java.lang.String p_name)
null will never be returned.
p_name - the name of the library component to retrieve
public DocumentIdIterator findContentModifiedSince(java.util.Date p_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.
p_modifiedDate - the date with which to compare Content
last modified date
public DocumentIdIterator findContentModifiedBetween(java.util.Date p_startDate,
java.util.Date p_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.
p_startDate - the date at the beginning of the rangep_endDate - the data at the end of the range
public java.lang.String[] getMemberNames()
null will never be returned.
String array of names of users and groupspublic java.lang.String[] getMemberNames(java.lang.String p_filter)
null will never be returned.
p_filter - the filter for searching users and groups
String array of names of users and groupspublic DocumentIdIterator findContentByPath(java.lang.String p_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.
p_path - the path to the content, site or site area.
public DocumentIdIterator findContentByAuthoringTemplate(DocumentId p_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.
p_id - the ID of the AuthoringTemplate
Content based on the
specified AuthoringTemplate that are visibile to the
current user
IllegalDocumentTypeException
public DocumentIdIterator findContentByWorkflowStage(DocumentId p_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.
p_id - the ID of the WorkflowStage
Content items in the gievn
stage that are visibile to the current user
IllegalDocumentTypeException
public DocumentIdIterator findContentByCategory(DocumentId p_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.
p_id - the ID of the Category
Content with this category
that are visibile to the current user
IllegalDocumentTypeException
public DocumentIdIterator contentSearch(DocumentId p_templateId,
DocumentId[] p_siteAreaIds,
DocumentId[] p_categoryIds,
java.lang.String[] p_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.
p_templateId - the ID of the template to matchp_siteAreaIds - the IDs of the site areas to find content inp_categoryIds - the IDs of categories for content to have in
their profilep_keywords - the IDs of keywords for content to have in its
profile
public DocumentIdIterator contentSearch(DocumentId p_templateId,
DocumentId[] p_siteAreaIds,
DocumentId[] p_categoryIds,
java.lang.String[] p_keywords,
boolean p_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.
p_templateId - the ID of the template to matchp_siteAreaIds - the IDs of the site areas to find content inp_categoryIds - the IDs of categories for content to have in
their profilep_keywords - the IDs of keywords for content to have in its
profilep_matchAllKeys - indicates whether the search is an "and" search. True for "and",
false for "or".
public DocumentIdIterator contentSearch(DocumentId p_templateId,
DocumentId[] p_siteAreaIds,
DocumentId[] p_categoryIds,
java.lang.String[] p_keywords,
boolean p_matchAllKeys,
java.lang.String p_sortKey1,
java.lang.String p_sortKey2,
java.lang.String p_sortKey3,
boolean p_asscending)
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.
Specify sort keys order Name, Publish Date, Description using key1, key2, key3 and ascending/descending order
p_templateId - the ID of the template to matchp_siteAreaIds - the IDs of the site areas to find content inp_categoryIds - the IDs of categories for content to have in
their profilep_keywords - the IDs of keywords for content to have in its
profilep_matchAllKeys - indicates whether the search is an "and" search. True for "and",
false for "or".p_sortKey1 - Specify one of sort keys Workspace.KEY_NAME, Workspace.KEY_PUBLISH_DATE, Workspace.KEY_DESCRIPTIONp_sortKey2 - Specify one of sort keys Workspace.KEY_NAME, Workspace.KEY_PUBLISH_DATE, Workspace.KEY_DESCRIPTIONp_sortKey3 - Specify one of sort keys Workspace.KEY_NAME, Workspace.KEY_PUBLISH_DATE, Workspace.KEY_DESCRIPTION
public java.lang.String render(RenderingContext p_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.
p_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)
public java.lang.String render(RenderingContext p_renderingContext,
ContentComponent p_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.
p_renderingContext - the RenderingContext to usep_component - 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)
public java.lang.String render(RenderingContext p_renderingContext,
LibraryComponent p_component)
throws ServiceNotAvailableException
LibraryComponent using the
specified RenderingContext.
The rendered content is returned as a String, encoded according to the users locale.
p_renderingContext - the RenderingContext to usep_component - 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)
public java.lang.String generateURL(RenderingContext p_context,
ContentComponent p_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.
p_context - the RenderingContext to be usedp_component - 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)
public java.lang.String generateURL(RenderingContext p_context,
LibraryComponent p_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.
p_context - the RenderingContext to be usedp_component - 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)
public DocumentId createDocumentId(java.lang.String p_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.
p_stringId - the String representation of the
required DocumentId
DocumentId object
DocumentIdCreationException - if the ID could not be createdDocumentId.toString()
public RenderingContext createRenderingContext(javax.servlet.ServletRequest p_request,
javax.servlet.ServletResponse p_response,
java.util.Map p_requestParameters)
throws OperationFailedException,
AuthorizationException
p_request - the ServletRequest objectp_response - the ServletResponse objectp_requestParameters - the request parameters for the request
as a map of name=single-value parameters.
The parameters of this Map will override the existing
parameters of the request. This Map can also contain additional
parameters.
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
public RenderingContext createRenderingContext(javax.servlet.ServletRequest p_request,
javax.servlet.ServletResponse p_response,
java.util.Map p_requestParameters,
java.lang.String p_wcmWebAppPath,
java.lang.String p_wcmServletPath)
throws OperationFailedException,
AuthorizationException
p_request - the ServletRequest objectp_response - the ServletResponse objectp_requestParameters - the request parameters for the request
as a map of name=single-value parameters.
The parameters of this Map will override the existing
parameters of the request. This Map can also contain additional
parameters.p_wcmWebAppPath - the URL up to the web application (ie. up to
and including the context path)p_wcmServletPath - the servlet path
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
public RenderingContext createRenderingContext(javax.portlet.PortletRequest p_request,
javax.portlet.PortletResponse p_response,
java.util.Map p_requestParameters)
throws OperationFailedException,
AuthorizationException
p_request - the PortletRequest objectp_response - the PortletResponse objectp_requestParameters - the request parameters for the request
as a map of name=single-value parameters.
The parameters of this Map will override the existing
parameters of the request. This Map can also contain additional
parameters.
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
public RenderingContext createRenderingContext(javax.portlet.PortletRequest p_request,
javax.portlet.PortletResponse p_response,
java.util.Map p_requestParameters,
java.lang.String p_wcmWebAppPath,
java.lang.String p_wcmServletPath)
throws OperationFailedException,
AuthorizationException
p_request - the PortletRequest objectp_response - the PortletResponse objectp_requestParameters - the request parameters for the request
as a map of name=single-value parameters.
The parameters of this Map will override the existing
parameters of the request. This Map can also contain additional
parameters.p_wcmWebAppPath - the URL up to the web application (ie. up to
and including the context path)p_wcmServletPath - the servlet path
RenderingContext
OperationFailedException - If the RenderingContext cannot
be created
AuthorizationException - If the user does not have access to the
Rendering Context.
public DocumentType fromString(java.lang.String p_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.
p_typeName - the API interface/class name
DocumentType for the given interface/class name
IllegalDocumentTypeExceptionpublic boolean isMemberOfGroup(java.lang.String p_groupName)
Workspace is a member of the
group with the specified name. This method also checks nested groups.
p_groupName - the name of the group to check membership
public 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
Workspacepublic void useLiveAccess(boolean liveAccess)
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 respectivelypublic void useDistinguishedNames(boolean shouldUseDn)
shouldUseDn - represents whether to use DN for these methodspublic boolean isDistinguishedNamesUsed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||