|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.wps.services.Service com.ibm.workplace.wcm.api.ProjectService
@Deprecated public abstract class ProjectService
ProjectService enables access to the WCM API through Portal services.
Here is an example of how to retrieve the ProjectService
:
try { // Construct and inital Context InitialContext ctx = new InitialContext(); // Retrieve WebContentService using JNDI name ProjectService service = (ProjectService) ctx.lookup("portal:service/wcm/ProjectService"); } catch (NamingException ne) { System.out.print("Naming Exception: " + ne); }
Field Summary |
---|
Fields inherited from interface com.ibm.workplace.wcm.api.WcmProjectService |
---|
JNDI_NAME |
Constructor Summary | |
---|---|
ProjectService()
Deprecated. Constructor |
Method Summary | |
---|---|
abstract Document |
addItemToProject(Workspace workspace,
Project project,
WorkflowedDocument workflowedDocument)
Deprecated. Add a Document into the given Project . |
abstract void |
cancelDeletion(Workspace workspace,
Project project,
Document document)
Deprecated. Clear deletion marking from a Document on a Project |
abstract Project |
createProject(Workspace workspace)
Deprecated. Create a new Project object. |
abstract Project |
createProject(Workspace workspace,
DocumentId projectTemplateDocumentId)
Deprecated. Create a Project using the specified ProjectTemplate . |
abstract ProjectTemplate |
createProjectTemplate(Workspace workspace)
Deprecated. Creates a new ProjectTemplate . |
abstract void |
deleteProject(Workspace workspace,
Project project)
Deprecated. Delete Project object from WCM repository. |
abstract ResultIterator<Project> |
findProjectsByName(Workspace workspace,
java.lang.String name)
Deprecated. Obtain existing Project (s) from WCM repository by their name. |
abstract ResultIterator<Project> |
findProjectsByState(Workspace workspace,
ProjectStateSelectors.State projectState)
Deprecated. Obtain a Project from WCM repository with its project state. |
abstract ResultIterator<Project> |
findProjectsByTitle(Workspace workspace,
java.lang.String title)
Deprecated. Obtain existing Project (s) from WCM repository by their title. |
abstract Project |
getProjectById(Workspace workspace,
DocumentId projectDocumentId)
Deprecated. Obtain a Project from WCM repository by its DocumentId |
abstract void |
markItemForDeletion(Workspace workspace,
Project project,
Document document)
Deprecated. Set a Document into deleted state. |
abstract void |
removeItemFromProject(Workspace workspace,
Project project,
Document document)
Deprecated. Remove a Document from Project |
abstract void |
saveProject(Workspace workspace,
Project project)
Deprecated. Add or update a Project in the WCM repository. |
Methods inherited from class com.ibm.wps.services.Service |
---|
destroy, expand, init, init, init, inspect |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.workplace.wcm.api.WcmProjectService |
---|
createProjectTemplate, markItemForDeletion |
Constructor Detail |
---|
public ProjectService()
Method Detail |
---|
public abstract ProjectTemplate createProjectTemplate(Workspace workspace) throws com.ibm.workplace.wcm.api.exceptions.DocumentCreationException, com.ibm.workplace.wcm.api.exceptions.AuthorizationException
ProjectTemplate
.
A typical usage of this method is as follows:
Workspace workspace = WCM_API.getRepository().getWorkspace(username, password); InitialContext ctx = new InitialContext(); Workspace workspace = (ProjectService) ctx.lookup("portal:service/wcm/ProjectService"); ProjectTemplate projectTemplate = projectService.createProjectTemplate(workspace); projectTemplate.setName(name); ProjectPrototype prototype = projectTemplate.getPrototype(); prototype.setPublishOptions(PublishOptions.MANUAL); prototype.setApprovalMode(ApprovalMode.REQUIRE_ALL_APPROVALS); prototype.setCommentMode(CommentMode.ENABLED); prototype.setWorkflowActionsForState(State.REVIEW, actionIds); prototype.setWorkflowActionsForState(State.REJECTED, actionIds); workspace.save(projectTemplate);
createProjectTemplate
in interface WcmProjectService
workspace
- workspace
ProjectTemplate
object.
com.ibm.workplace.wcm.api.exceptions.DocumentCreationException
- if the object cannot be created.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the user does not have minimum Editor access.public abstract Project createProject(Workspace workspace) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.DocumentCreationException
Project
object. The default project template attributes will be used.
createProject
in interface WcmProjectService
workspace
- workspace
Project
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.DocumentCreationException
- if the item could not be createdpublic abstract Project createProject(Workspace workspace, DocumentId projectTemplateDocumentId) throws com.ibm.workplace.wcm.api.exceptions.DocumentCreationException, com.ibm.workplace.wcm.api.exceptions.AuthorizationException
Project
using the specified ProjectTemplate
.
The created Project
will inherit all attributes
defined on the ProjectPrototype
of the given ProjectTemplate
.
createProject
in interface WcmProjectService
workspace
- workspaceprojectTemplateDocumentId
- the document id of a ProjectTemplate
.
Project
instance created from the given ProjectTemplate
.
java.lang.IllegalArgumentException
- if the given id is null
or is not a ProjectTemplate
com.ibm.workplace.wcm.api.exceptions.DocumentCreationException
- if the project can not be created or
the specified ProjectTemplate
does not exist.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have sufficient access.public abstract void saveProject(Workspace workspace, Project project) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.DuplicateChildException, com.ibm.workplace.wcm.api.exceptions.DocumentSaveException, com.ibm.workplace.wcm.api.exceptions.ProjectException
Project
in the WCM repository.
saveProject
in interface WcmProjectService
workspace
- workspaceproject
- Project
object to save
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.DuplicateChildException
- if another item with the same name already exists
com.ibm.workplace.wcm.api.exceptions.DocumentSaveException
- if an error occurs while saving the item
com.ibm.workplace.wcm.api.exceptions.ProjectException
- if an internal error occurspublic abstract void deleteProject(Workspace workspace, Project project) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException, com.ibm.workplace.wcm.api.exceptions.DocumentDeleteException, com.ibm.workplace.wcm.api.exceptions.DocumentDeleteReferentialIntegrityException, com.ibm.workplace.wcm.api.exceptions.ProjectException
Project
object from WCM repository.
deleteProject
in interface WcmProjectService
workspace
- workspaceproject
- Project
to delete
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException
- if the item could not be found
com.ibm.workplace.wcm.api.exceptions.DocumentDeleteException
- if the item could not be deleted
com.ibm.workplace.wcm.api.exceptions.DocumentDeleteReferentialIntegrityException
- if the item cannot be deleted because another item refers to it
com.ibm.workplace.wcm.api.exceptions.ProjectException
- if an internal error occurspublic abstract Document addItemToProject(Workspace workspace, Project project, WorkflowedDocument workflowedDocument) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.IllegalDocumentTypeException, com.ibm.workplace.wcm.api.exceptions.DocumentIsLockedException, com.ibm.workplace.wcm.api.exceptions.MaximumProjectItemsReachedException, com.ibm.workplace.wcm.api.exceptions.ProjectException
Document
into the given Project
.
If a new and unsaved Item is passed to this method then the add to Project will only committed after a Workspace.save() is called on the Item.
addItemToProject
in interface WcmProjectService
workspace
- workspaceproject
- Project
to which the Document
is added.workflowedDocument
- WorkflowedDocument
to add to Project
Document
actually added into the Project
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.IllegalDocumentTypeException
- if the document of this type cannot be added to a project
com.ibm.workplace.wcm.api.exceptions.DocumentIsLockedException
- the item is locked by another user and cannot be added to a project by this user
com.ibm.workplace.wcm.api.exceptions.MaximumProjectItemsReachedException
- if no more items can be added to the project
com.ibm.workplace.wcm.api.exceptions.ProjectException
- if an internal error has occurred
FirstStageContainsPublishActionException
- if the workflowed document has a workflow with the first stage having a published action
java.lang.IllegalArgumentException
- if the specified WorkflowedDocument
or Project
is nullpublic abstract void removeItemFromProject(Workspace workspace, Project project, Document document) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.DocumentIsLockedException, com.ibm.workplace.wcm.api.exceptions.ProjectException
Document
from Project
removeItemFromProject
in interface WcmProjectService
workspace
- workspaceproject
- Project
from which the Document
is removed.document
- Document
to be removed from Project
.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.DocumentIsLockedException
- the item is locked by another user and cannot be removed from a project by this user
com.ibm.workplace.wcm.api.exceptions.ProjectException
- if an internal error has occurred
java.lang.IllegalArgumentException
- if the specified Document
or Project
is nullpublic abstract void markItemForDeletion(Workspace workspace, Project project, Document document) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException, com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException, com.ibm.workplace.wcm.api.exceptions.DocumentDeleteException, com.ibm.workplace.wcm.api.exceptions.DocumentDeleteReferentialIntegrityException, com.ibm.workplace.wcm.api.exceptions.ProjectException
Document
into deleted state.
markItemForDeletion
in interface WcmProjectService
workspace
- workspaceproject
- Project
in which a item resides in.document
- Document
to be marked as deleted.
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException
- if the item could not be found
com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
- if an error occurs while locating the item
com.ibm.workplace.wcm.api.exceptions.DocumentDeleteException
- if the item could not be deleted
com.ibm.workplace.wcm.api.exceptions.DocumentDeleteReferentialIntegrityException
- if the item cannot be deleted because another item refers to it
com.ibm.workplace.wcm.api.exceptions.ProjectException
- if an internal error occurspublic abstract void cancelDeletion(Workspace workspace, Project project, Document document) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.ProjectException
Document
on a Project
- Specified by:
cancelDeletion
in interface WcmProjectService
- Parameters:
workspace
- workspaceproject
- Project
in which a item resides in.document
- Document
to be cancelled from deletion marking.
- Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.ProjectException
- if an internal error has occurred- Since:
- 7.0
public abstract ResultIterator<Project> findProjectsByName(Workspace workspace, java.lang.String name) throws com.ibm.workplace.wcm.api.exceptions.QueryServiceException
Project
(s) from WCM repository by their name.
findProjectsByName
in interface WcmProjectService
workspace
- workspacename
- Project
name to be retrieved.
Project
object(s) with the given name
com.ibm.workplace.wcm.api.exceptions.QueryServiceException
- if an error occurs doing the querypublic abstract ResultIterator<Project> findProjectsByTitle(Workspace workspace, java.lang.String title) throws com.ibm.workplace.wcm.api.exceptions.QueryServiceException
Project
(s) from WCM repository by their title.
findProjectsByTitle
in interface WcmProjectService
workspace
- workspacetitle
- Project
title to be retrieved.
Project
object(s) with the given title
com.ibm.workplace.wcm.api.exceptions.QueryServiceException
- if an error occurs doing the querypublic abstract Project getProjectById(Workspace workspace, DocumentId projectDocumentId) throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException, com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
Project
from WCM repository by its DocumentId
getProjectById
in interface WcmProjectService
workspace
- workspaceprojectDocumentId
- Id of Project
to be retrieved.
Project
object
com.ibm.workplace.wcm.api.exceptions.AuthorizationException
- if the current user does not have permission
com.ibm.workplace.wcm.api.exceptions.DocumentRetrievalException
- if an error occurs while locating the itempublic abstract ResultIterator<Project> findProjectsByState(Workspace workspace, ProjectStateSelectors.State projectState) throws com.ibm.workplace.wcm.api.exceptions.QueryServiceException
Project
from WCM repository with its project state.
findProjectsByState
in interface WcmProjectService
workspace
- workspaceprojectState
- project state defined by ProjectStateSelectors.State
com.ibm.workplace.wcm.api.exceptions.QueryServiceException
- if an error occurs doing the query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |