Java Doc for Controller.java in  » Workflow-Engines » osbl-1_0 » org » concern » 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 » Workflow Engines » osbl 1_0 » org.concern 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.concern.Controller

All known Subclasses:   org.concern.controller.Controller,
Controller
public interface Controller (Code)
The controller interface is the runtime client interface of con:cern. An implementation is responsible for controlling the process flow and invoking the activities. It provides access to the log and the current state information of the subjects in process.

Methods, that import the transactional context: o createSubject o lockSubject o destroySubject o getSubjects(..) o complete o notify o getLog o getArchive o matchPrecondition o matchPostcondition
author:
   hengels[at]mercatis[dot]de
version:
   $Revision: 881 $



Field Summary
final public static  intSTATE_DESTROYED
    
final public static  intSTATE_RUNNING
    
final public static  intSTATE_STALLED
    
final public static  intSTATE_SUSPENDED
    


Method Summary
 voidannounceSubject(String userValue)
     Tell the controller, that a subjects has changed.
 voidbackward(String userValue, String activityName)
    
 voidbackward(String userValue, String activityName, Map<String, String> logAnnotations)
    
 booleancomplete(String userValue, String activityName)
     Complete an asynchronous activtiy.
 booleancomplete(String userValue, String activityName, Map<String, String> logAnnotations)
     Complete an asynchronous activtiy.
 IntegercreateSubject(String userValue)
     Create a new subject in the process.
 voiddestroySubject(String userValue)
     Mark the subject destroyed.
 voidforward(String userValue, String activityName)
    
 voidforward(String userValue, String activityName, Map<String, String> logAnnotations)
    
 List<Log>getArchive(String userValue)
     Subjects, that have reached been destroyed are removed from the process.
 List<String>getEnlistments(String userValue)
    
 List<Log>getLog(String userValue)
     The controller logs every successful or unsuccessful execution of an activity as well as the creation, destroyal and stall of subjects.
 List<String>getOptions(String userValue)
    
 org.concern.model.ProcessgetProcess()
     Return the process description.
 StringgetProcessName()
     A process is identified by a unique name.
 List<String>getSubjects(int state)
     Retrieve a list of all subjects, that are currently in the process.
 List<String>getSubjects(String activity)
     Get the ids of the subjects, that are enlisted for the specified asynchronous actvity.
 List<String>getTasks(String userValue)
    
 booleanisBackwardPossible(String userValue, String activityName)
    
 booleanisForwardPossible(String userValue, String activityName)
    
 booleanisKnownSubject(String userValue)
     Determines if Controller.createSubject(String) has already been called for the specified userValue.
 voidlockSubject(String userValue)
     Write-lock the specified subject for the duration of the current transaction.
 voidlog(Log log)
     Append a message to the protocol of the specified subject.
 BooleanmatchCondition(String userValue, String conditionName)
     Check if the subject matches the specified condition.
 booleanmatchPostcondition(String userValue, String activityName)
     Check if the subject matches the postcondition of the specified activity.
 booleanmatchPrecondition(String userValue, String activityName)
     Check if the subject matches the precondition of the specified activity.
 booleannotify(String userValue, String eventName)
     Notify the controller that an event has occured.
 booleannotify(String userValue, String eventName, Map<String, String> logAnnotations)
     Notify the controller that an event has occured. If the logAnnotations property is not null, then those annotations will be stored in the log entry for the notification.
Parameters:
  userValue -
Parameters:
  eventName -
Parameters:
  logAnnotations - may contain client specific information to be stored with the log entry that will be created for this notification.
 voidprocess(String userValue)
     Process the specified subject immediately.
 voidreload()
    
 voidreset(String userValue, String activityName)
    
 voidresumeSubject(String userValue)
    
 voidreviveSubject(String userValue)
     Restore the subject from the archive into the pool of running instances.
 voidscheduleAnnouncement(String userValue, long duration)
    
 voidstart()
     Start the controller.
 voidstop()
     Free all resources.
 voidsuspendSubject(String userValue)
    

Field Detail
STATE_DESTROYED
final public static int STATE_DESTROYED(Code)



STATE_RUNNING
final public static int STATE_RUNNING(Code)



STATE_STALLED
final public static int STATE_STALLED(Code)



STATE_SUSPENDED
final public static int STATE_SUSPENDED(Code)





Method Detail
announceSubject
void announceSubject(String userValue) throws UnknownSubjectException, ControllerException(Code)
Tell the controller, that a subjects has changed. This method has to be called in order to tell the controller, that the particular subject should be examined for further execution.
Parameters:
  userValue - identifies the subject



backward
void backward(String userValue, String activityName) throws UnknownSubjectException, ControllerException(Code)



backward
void backward(String userValue, String activityName, Map<String, String> logAnnotations) throws UnknownSubjectException, ControllerException(Code)



complete
boolean complete(String userValue, String activityName) throws org.concern.UnknownSubjectException, org.concern.ControllerException(Code)
Complete an asynchronous activtiy. The controller checks the postcondition an logs the successful completion of the activity.
Parameters:
  userValue - identifies the subject
Parameters:
  activityName - the activity true if the postcondition is matching, false otherwise
throws:
  org.concern.UnknownSubjectException -
throws:
  org.concern.ControllerException -



complete
boolean complete(String userValue, String activityName, Map<String, String> logAnnotations) throws org.concern.UnknownSubjectException, org.concern.ControllerException(Code)
Complete an asynchronous activtiy. The controller checks the postcondition and logs the successful completion of the activity. If the logAnnotations property is not null, then those annotations will be stored in the log entry for the completed activity.
Parameters:
  userValue - identifies the subject
Parameters:
  activityName - the activity
Parameters:
  logAnnotations - may contain client specific information to be stored with the log entry that will be created for this activity. This parameter may also be null. true if the postcondition is matching, false otherwise
throws:
  org.concern.UnknownSubjectException -
throws:
  org.concern.ControllerException -



createSubject
Integer createSubject(String userValue) throws org.concern.SubjectCreationException, ControllerException(Code)
Create a new subject in the process. The userValue is used by both, the activities and the client to identify the subject. Candidates are a primary key, a distinguished name, a filename, whatever .. depending on the datastore, that holds the subject's business information.
Parameters:
  userValue - identifies the subject an internal id
throws:
  org.concern.SubjectCreationException -



destroySubject
void destroySubject(String userValue) throws UnknownSubjectException, ControllerException(Code)
Mark the subject destroyed. When it is processed next, it will be moved to the archive.
Parameters:
  userValue - identifies the subject
throws:
  UnknownSubjectException -
throws:
  ControllerException -



forward
void forward(String userValue, String activityName) throws UnknownSubjectException, ControllerException(Code)



forward
void forward(String userValue, String activityName, Map<String, String> logAnnotations) throws UnknownSubjectException, ControllerException(Code)



getArchive
List<Log> getArchive(String userValue) throws ControllerException, UnknownSubjectException(Code)
Subjects, that have reached been destroyed are removed from the process. Their log is archived.
Parameters:
  userValue - identifies the subject a list of org.concern.Log records
throws:
  org.concern.ControllerException -



getEnlistments
List<String> getEnlistments(String userValue) throws org.concern.UnknownSubjectException, ControllerException(Code)
Return a list of names of the asynchronous activities, for which the subject is enlisted
Parameters:
  userValue - identifies the subject the enlistments
throws:
  org.concern.UnknownSubjectException -



getLog
List<Log> getLog(String userValue) throws org.concern.UnknownSubjectException, ControllerException(Code)
The controller logs every successful or unsuccessful execution of an activity as well as the creation, destroyal and stall of subjects.
Parameters:
  userValue - identifies the subject a list of org.concern.Log records
throws:
  org.concern.UnknownSubjectException -



getOptions
List<String> getOptions(String userValue) throws org.concern.UnknownSubjectException, ControllerException(Code)
Return a list of names of the optional asynchronous activities, for which the subject is enlisted
Parameters:
  userValue - identifies the subject the tasks
throws:
  org.concern.UnknownSubjectException -



getProcess
org.concern.model.Process getProcess()(Code)
Return the process description. the process description



getProcessName
String getProcessName()(Code)
A process is identified by a unique name. A separate controller instance is required for every process. the name of the process that is controlled by this controller



getSubjects
List<String> getSubjects(int state) throws ControllerException(Code)
Retrieve a list of all subjects, that are currently in the process. a list with the userValues of all subjects
Parameters:
  state - one of STATE_RUNNING, STATE_IDLE, STATE_DESTROYED



getSubjects
List<String> getSubjects(String activity) throws ControllerException(Code)
Get the ids of the subjects, that are enlisted for the specified asynchronous actvity.
Parameters:
  activity - the activity name a list of subject ids



getTasks
List<String> getTasks(String userValue) throws org.concern.UnknownSubjectException, ControllerException(Code)
Return a list of names of the none optional asynchronous activities, for which the subject is enlisted
Parameters:
  userValue - identifies the subject the tasks
throws:
  org.concern.UnknownSubjectException -



isBackwardPossible
boolean isBackwardPossible(String userValue, String activityName) throws UnknownSubjectException, ControllerException(Code)



isForwardPossible
boolean isForwardPossible(String userValue, String activityName) throws UnknownSubjectException, ControllerException(Code)



isKnownSubject
boolean isKnownSubject(String userValue) throws ControllerException(Code)
Determines if Controller.createSubject(String) has already been called for the specified userValue.
Parameters:
  userValue - identifies the subject true if createSubject(...) has alreadybeen called for the specified userValue.
throws:
  ControllerException -



lockSubject
void lockSubject(String userValue) throws UnknownSubjectException, ControllerException(Code)
Write-lock the specified subject for the duration of the current transaction.
Parameters:
  userValue -
throws:
  UnknownSubjectException -
throws:
  ControllerException -



log
void log(Log log) throws UnknownSubjectException, ControllerException(Code)
Append a message to the protocol of the specified subject.
Parameters:
  log - the record to be logged



matchCondition
Boolean matchCondition(String userValue, String conditionName) throws org.concern.UnknownSubjectException, org.concern.ControllerException(Code)
Check if the subject matches the specified condition.
Parameters:
  userValue - identifies the subject
Parameters:
  conditionName - the activity match
throws:
  org.concern.UnknownSubjectException -
throws:
  org.concern.ControllerException -



matchPostcondition
boolean matchPostcondition(String userValue, String activityName) throws org.concern.UnknownSubjectException, org.concern.ControllerException(Code)
Check if the subject matches the postcondition of the specified activity.
Parameters:
  userValue - identifies the subject
Parameters:
  activityName - the activity match
throws:
  org.concern.UnknownSubjectException -
throws:
  org.concern.ControllerException -



matchPrecondition
boolean matchPrecondition(String userValue, String activityName) throws org.concern.UnknownSubjectException, org.concern.ControllerException(Code)
Check if the subject matches the precondition of the specified activity.
Parameters:
  userValue - identifies the subject
Parameters:
  activityName - the activity match
throws:
  org.concern.UnknownSubjectException -
throws:
  org.concern.ControllerException -



notify
boolean notify(String userValue, String eventName) throws UnknownSubjectException, ControllerException(Code)
Notify the controller that an event has occured.
Parameters:
  userValue -
Parameters:
  eventName -
throws:
  UnknownSubjectException -



notify
boolean notify(String userValue, String eventName, Map<String, String> logAnnotations) throws UnknownSubjectException, ControllerException(Code)
Notify the controller that an event has occured. If the logAnnotations property is not null, then those annotations will be stored in the log entry for the notification.
Parameters:
  userValue -
Parameters:
  eventName -
Parameters:
  logAnnotations - may contain client specific information to be stored with the log entry that will be created for this notification. This parameter may also be null.
throws:
  UnknownSubjectException -



process
void process(String userValue) throws org.concern.UnknownSubjectException, org.concern.ControllerException(Code)
Process the specified subject immediately. When this method returns, all actions are performed.
Parameters:
  userValue - identifies the subject
throws:
  org.concern.UnknownSubjectException -
throws:
  org.concern.ControllerException -



reload
void reload()(Code)
Reread the parameters from the parameter resolver



reset
void reset(String userValue, String activityName) throws UnknownSubjectException, ControllerException(Code)



resumeSubject
void resumeSubject(String userValue) throws UnknownSubjectException, ControllerException(Code)



reviveSubject
void reviveSubject(String userValue) throws UnknownSubjectException, ControllerException(Code)
Restore the subject from the archive into the pool of running instances.
Parameters:
  userValue - identifies the subject
throws:
  UnknownSubjectException -
throws:
  ControllerException -



scheduleAnnouncement
void scheduleAnnouncement(String userValue, long duration) throws UnknownSubjectException, ControllerException(Code)

Parameters:
  userValue - identifies the subject
Parameters:
  duration - in seconds



start
void start()(Code)
Start the controller.



stop
void stop() throws ControllerException(Code)
Free all resources.
throws:
  ControllerException -



suspendSubject
void suspendSubject(String userValue) throws UnknownSubjectException, ControllerException(Code)



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