Package org.alfresco.repo.workflow
Class PackageManager
java.lang.Object
org.alfresco.repo.workflow.PackageManager
This helper class is used to manage a workflow package. The manager is a
stateful object which accumulates all the changes to be made to the package
(such as adding and removing package items). These changes are then applied
to the package when either the create() or update() method is called.
- Since:
- 3.4
- Author:
- Nick Smith
-
Constructor Summary
ConstructorsConstructorDescriptionPackageManager(WorkflowService workflowService, NodeService nodeService, BehaviourFilter behaviourFilter, org.apache.commons.logging.Log logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidTakes a comma-separated list ofNodeRefids and adds the specified NodeRefs to the package.voidvoidaddItemsAsStrings(List<String> itemStrs) Creates a new Workflow package using the specifiedcontainer.voidremoveItem(String itemStr) voidremoveItem(NodeRef item) voidremoveItems(String items) Takes a comma-separated list ofNodeRefids and adds the specified NodeRefs to the package.voidremoveItems(List<NodeRef> items) voidremoveItemsAsStrings(List<String> itemStrs) voidApplies the specified modifications to the package.
-
Constructor Details
-
PackageManager
public PackageManager(WorkflowService workflowService, NodeService nodeService, BehaviourFilter behaviourFilter, org.apache.commons.logging.Log logger)
-
-
Method Details
-
addItems
-
addItems
Takes a comma-separated list ofNodeRefids and adds the specified NodeRefs to the package.- Parameters:
items- String
-
addItemsAsStrings
-
addItem
-
addItem
-
removeItems
-
removeItems
Takes a comma-separated list ofNodeRefids and adds the specified NodeRefs to the package.- Parameters:
items- String
-
removeItemsAsStrings
-
removeItem
-
removeItem
-
create
Creates a new Workflow package using the specifiedcontainer. If thecontaineris null then a new container node is created. Applies the specified updates to the package after it is created.- Parameters:
container- NodeRef- Returns:
- the package
NodeRef. - Throws:
WorkflowException- if the specified container is already package.
-
update
Applies the specified modifications to the package.- Parameters:
packageRef- NodeRef
-