Java Doc for WorkflowManager.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » workflow » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.workflow 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ecyrd.jspwiki.workflow.WorkflowManager

WorkflowManager
public class WorkflowManager implements WikiEventListener(Code)

Monitor class that tracks running Workflows. The WorkflowManager also keeps track of the names of users or groups expected to approve particular Workflows.


author:
   Andrew Jaquith


Field Summary
final protected static  StringPROPERTY_APPROVER_PREFIX
     The prefix to use for looking up jspwiki.properties approval roles.

Constructor Summary
public  WorkflowManager()
     Constructs a new WorkflowManager, with an empty workflow cache.

Method Summary
public  voidactionPerformed(WikiEvent event)
     Listens for com.ecyrd.jspwiki.event.WorkflowEvent objects emitted by Workflows.
protected synchronized  voidadd(Workflow workflow)
     Protected helper method that adds a newly created Workflow to the cache, and sets its workflowManager and Id properties if not set.
public  PrincipalgetApprover(String messageKey)
     Looks up and resolves the actor who approves a Decision for a particular Workflow, based on the Workflow's message key.
public  ListgetCompletedWorkflows()
     Returns a collection of finished workflows; that is, those that have aborted or completed.
public  DecisionQueuegetDecisionQueue()
    
protected  WikiEnginegetEngine()
    
public  CollectiongetOwnerWorkflows(WikiSession session)
     Returns the current workflows a wiki session owns.
public  CollectiongetWorkflows()
     Returns a collection of the currently active workflows.
public  voidinitialize(WikiEngine engine, Properties props)
     Initializes the WorkflowManager using a specfied WikiEngine and properties.
protected synchronized  voidremove(Workflow workflow)
     Protected helper method that removes a specified Workflow from the cache, and moves it to the workflow history list.
public  booleanrequiresApproval(String messageKey)
     Returns true if a workflow matching a particular key contains an approval step.
Parameters:
  messageKey - the name of the workflow; corresponds to the value returned byWorkflow.getMessageKey.
public  voidstart(Workflow workflow)
     Adds a new workflow to the set of workflows and starts it.

Field Detail
PROPERTY_APPROVER_PREFIX
final protected static String PROPERTY_APPROVER_PREFIX(Code)
The prefix to use for looking up jspwiki.properties approval roles.




Constructor Detail
WorkflowManager
public WorkflowManager()(Code)
Constructs a new WorkflowManager, with an empty workflow cache. New Workflows are automatically assigned unique identifiers, starting with 1.




Method Detail
actionPerformed
public void actionPerformed(WikiEvent event)(Code)
Listens for com.ecyrd.jspwiki.event.WorkflowEvent objects emitted by Workflows. In particular, this method listens for com.ecyrd.jspwiki.event.WorkflowEvent.CREATED , com.ecyrd.jspwiki.event.WorkflowEvent.ABORTED and com.ecyrd.jspwiki.event.WorkflowEvent.COMPLETED events. If a workflow is created, it is automatically added to the cache. If one is aborted or completed, it is automatically removed.
Parameters:
  event - the event passed to this listener



add
protected synchronized void add(Workflow workflow)(Code)
Protected helper method that adds a newly created Workflow to the cache, and sets its workflowManager and Id properties if not set.
Parameters:
  workflow - the workflow to add



getApprover
public Principal getApprover(String messageKey) throws WikiException(Code)
Looks up and resolves the actor who approves a Decision for a particular Workflow, based on the Workflow's message key. If not found, or if Principal is Unresolved, throws WikiException. This particular implementation always returns the GroupPrincipal Admin
Parameters:
  messageKey - the Decision's message key the actor who approves Decisions
throws:
  WikiException - if the message key was not found, or thePrincipal value corresponding to the key could not be resolved



getCompletedWorkflows
public List getCompletedWorkflows()(Code)
Returns a collection of finished workflows; that is, those that have aborted or completed. the finished workflows



getDecisionQueue
public DecisionQueue getDecisionQueue()(Code)
Returns the DecisionQueue associated with this WorkflowManager the decision queue



getEngine
protected WikiEngine getEngine()(Code)
Protected helper method that returns the associated WikiEngine the wiki engine



getOwnerWorkflows
public Collection getOwnerWorkflows(WikiSession session)(Code)
Returns the current workflows a wiki session owns. These are workflows whose Workflow.getOwner method returns a Principal also possessed by the wiki session (see com.ecyrd.jspwiki.WikiSession.getPrincipals ). If the wiki session is not authenticated, this method returns an empty Collection.
Parameters:
  session - the wiki session the collection workflows the wiki session owns, which may be empty



getWorkflows
public Collection getWorkflows()(Code)
Returns a collection of the currently active workflows. the current workflows



initialize
public void initialize(WikiEngine engine, Properties props)(Code)
Initializes the WorkflowManager using a specfied WikiEngine and properties. Any properties that begin with WorkflowManager.PROPERTY_APPROVER_PREFIX will be assumed to be Decisions that require approval. For a given property key, everything after the prefix denotes the Decision's message key. The property value indicates the Principal (Role, GroupPrincipal, WikiPrincipal) that must approve the Decision. For example, if the property key/value pair is jspwiki.approver.workflow.saveWikiPage=Admin, the Decision's message key is workflow.saveWikiPage. The Principal Admin will be resolved via com.ecyrd.jspwiki.auth.AuthorizationManager.resolvePrincipal(String) .
Parameters:
  engine - the wiki engine to associate with this WorkflowManager
Parameters:
  props - the wiki engine's properties



remove
protected synchronized void remove(Workflow workflow)(Code)
Protected helper method that removes a specified Workflow from the cache, and moves it to the workflow history list. This method defensively checks to see if the workflow has not yet been removed.
Parameters:
  workflow - the workflow to remove



requiresApproval
public boolean requiresApproval(String messageKey)(Code)
Returns true if a workflow matching a particular key contains an approval step.
Parameters:
  messageKey - the name of the workflow; corresponds to the value returned byWorkflow.getMessageKey. the result



start
public void start(Workflow workflow) throws WikiException(Code)
Adds a new workflow to the set of workflows and starts it. The new workflow is automatically assigned a unique ID. If another workflow with the same ID already exists, this method throws a WikIException.
Parameters:
  workflow - the workflow to start
throws:
  WikiException - if a workflow the automatically assignedID already exist; this should not happen normally



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.