org.alfresco.repo.workflow
Class WorkflowPackageImpl

java.lang.Object
  extended by org.alfresco.repo.workflow.WorkflowPackageImpl
All Implemented Interfaces:
WorkflowPackageComponent

public class WorkflowPackageImpl
extends java.lang.Object
implements WorkflowPackageComponent

Alfresco implementation of Workflow Package where the package is stored within the Alfresco Repository.


Constructor Summary
WorkflowPackageImpl()
           
 
Method Summary
 org.alfresco.service.cmr.repository.NodeRef createPackage(org.alfresco.service.cmr.repository.NodeRef container)
          Create a Workflow Package (a container of content to route through the Workflow).
 org.alfresco.service.cmr.repository.NodeRef createSystemWorkflowContainer()
          Creates the System Workflow Container
 void deletePackage(org.alfresco.service.cmr.repository.NodeRef container)
          Deletes a Workflow Package The workflow package aspect is removed, and if the container was previously created by the workflow service (i.e.
 java.util.List getWorkflowIdsForContent(org.alfresco.service.cmr.repository.NodeRef packageItem)
          Gets the Workflows that act upon the specified Repository content.
 void setImporterBootstrap(ImporterBootstrap bootstrap)
           
 void setMessageService(MessageService messageService)
           
 void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
           
 void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
           
 boolean setWorkflowForPackage(WorkflowInstance instance)
          Initialises the workflow package node on the WorkflowInstance, adding the appropriate aspect and setting the appropriate properties to mark it as a package for the given WorkflowInstance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowPackageImpl

public WorkflowPackageImpl()
Method Detail

setImporterBootstrap

public void setImporterBootstrap(ImporterBootstrap bootstrap)
Parameters:
bootstrap - the importer bootstrap for the store to place workflow items into

setSearchService

public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Parameters:
searchService - search service

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Parameters:
nodeService - node service

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)

setNamespaceService

public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Parameters:
namespaceService - namespace service

setTenantService

public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
Parameters:
tenantService - tenant service

setMessageService

public void setMessageService(MessageService messageService)
Parameters:
messageService - the messageService to set

createPackage

public org.alfresco.service.cmr.repository.NodeRef createPackage(org.alfresco.service.cmr.repository.NodeRef container)
Create a Workflow Package (a container of content to route through the Workflow). If an existing container is supplied, it's supplemented with the workflow package aspect.

Specified by:
createPackage in interface WorkflowPackageComponent
Parameters:
container - (optional) a pre-created container (e.g. folder, versioned folder or layered folder)
Returns:
the workflow package

deletePackage

public void deletePackage(org.alfresco.service.cmr.repository.NodeRef container)
Deletes a Workflow Package The workflow package aspect is removed, and if the container was previously created by the workflow service (i.e. not provided from elsewhere), it will be deleted.

Specified by:
deletePackage in interface WorkflowPackageComponent

getWorkflowIdsForContent

public java.util.List getWorkflowIdsForContent(org.alfresco.service.cmr.repository.NodeRef packageItem)
Gets the Workflows that act upon the specified Repository content.

Specified by:
getWorkflowIdsForContent in interface WorkflowPackageComponent
Parameters:
packageItem - the repository content item to get workflows for
Returns:
list of workflows which act upon the specified content

createSystemWorkflowContainer

public org.alfresco.service.cmr.repository.NodeRef createSystemWorkflowContainer()
Creates the System Workflow Container

Returns:
the system workflow container

setWorkflowForPackage

public boolean setWorkflowForPackage(WorkflowInstance instance)
Initialises the workflow package node on the WorkflowInstance, adding the appropriate aspect and setting the appropriate properties to mark it as a package for the given WorkflowInstance.

Specified by:
setWorkflowForPackage in interface WorkflowPackageComponent
Parameters:
instance - the workflow instance to which the package belongs.
Returns:
true if the package node was modified.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.