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


java.lang.Object
   org.osbl.agent.logic.AgentSystem

AgentSystem
public class AgentSystem (Code)
The AgentSystem class serves as the central repository for Rules. There is only one AgentSystem instance per OSBL installation, using the singleton pattern. It is responsible for storing the Rules and offering basic operations for them. The Rules in memory are kept synchronized with a persistent storage. Currently the persistence mechanism is accomplished by serializing to an XML file and reading it back again. The same XML framework is used for importing and exporting individual Rules. The AgentSystem object provides basic operations for adding, retrieving and deleting Rules. Being a singleton object potentially accessible by many processes at the same time, those operations are all thread-safe (“synchronized�). Rules are stored in an non-hierarchical indiscriminate manner. The AgentSystem class knows nothing about Contexts. It is up to the callee to implement the corresponding recognition and filtering algorithms.
author:
   Sebastian Nozzi.




Method Summary
public  RuleXMLToRule(File ruleXMLFile)
     From a given XML document it reconstructs a Rule object.
Parameters:
  ruleXMLFile - the XML file containing a Rule.
public synchronized  voidaddRule(Rule newRule)
     Adds a Rule into the system.
public  ArrayList<Process>getProcessList()
     Convenience method to get the list of running (con:cern) Processes.
public synchronized  List<Rule>getPublicRulesOfOthers(String notThisUser)
     Gets the all published Rules from other users but the one specified.
Parameters:
  notThisUser - the user that is to be avoided.
public synchronized  List<Rule>getRules()
     Returns all Rules in the system.
public synchronized  List<Rule>getRulesForUser(String user)
     Gets the Rules that a given user has created.
Parameters:
  user - the user-id.
protected synchronized  List<Rule>getRulesForUser(String userId, boolean avoidUser)
     Either gets the Rules for one user, or all the Rules except for that user.
Parameters:
  userId - the user-id.
Parameters:
  avoidUser - whether to avoid that user or not.
public static  AgentSystemgetSingletonInstance()
     Gets the singleton instance.
protected  voidloadRules()
     Loads all Rules from the persistent store.
protected  voidpopulateProcessList()
     Populates the (con:cern) Process list.
public synchronized  voidremoveRule(Rule ruleToDelete)
     Removes a Rule from the system.
public  StringruleAsXML(Rule rule)
     Provides an XML-serialized version of a Rule.
Parameters:
  rule - the Rule to be serialized.
protected  voidsaveRules()
     Save the Rules to a persistent store.
public  FiletempRuleFile(Rule rule)
     Provides a temporary file with an exported Rule.
Parameters:
  rule - the Rule for which the file is to be generated.
public synchronized  voidupdateRules()
     In case Rules are indirectly modified (outside this class, which is very common) and the client wants to make sure that those changes are persistent and reflected across the system, it should call this method.



Method Detail
XMLToRule
public Rule XMLToRule(File ruleXMLFile)(Code)
From a given XML document it reconstructs a Rule object.
Parameters:
  ruleXMLFile - the XML file containing a Rule. the generated Rule.



addRule
public synchronized void addRule(Rule newRule)(Code)
Adds a Rule into the system.
Parameters:
  newRule - the new Rule.



getProcessList
public ArrayList<Process> getProcessList()(Code)
Convenience method to get the list of running (con:cern) Processes. Used by the DesignContexts that interact with con:cern. the list of Processes.



getPublicRulesOfOthers
public synchronized List<Rule> getPublicRulesOfOthers(String notThisUser)(Code)
Gets the all published Rules from other users but the one specified.
Parameters:
  notThisUser - the user that is to be avoided. the public Rules for all other users but the one specified.



getRules
public synchronized List<Rule> getRules()(Code)
Returns all Rules in the system. all the Rules.



getRulesForUser
public synchronized List<Rule> getRulesForUser(String user)(Code)
Gets the Rules that a given user has created.
Parameters:
  user - the user-id. the Rules for that user-id.



getRulesForUser
protected synchronized List<Rule> getRulesForUser(String userId, boolean avoidUser)(Code)
Either gets the Rules for one user, or all the Rules except for that user.
Parameters:
  userId - the user-id.
Parameters:
  avoidUser - whether to avoid that user or not. the Rules collected.



getSingletonInstance
public static AgentSystem getSingletonInstance()(Code)
Gets the singleton instance. the singleton instance



loadRules
protected void loadRules()(Code)
Loads all Rules from the persistent store.



populateProcessList
protected void populateProcessList()(Code)
Populates the (con:cern) Process list.



removeRule
public synchronized void removeRule(Rule ruleToDelete)(Code)
Removes a Rule from the system.
Parameters:
  ruleToDelete - the rule to delete.



ruleAsXML
public String ruleAsXML(Rule rule)(Code)
Provides an XML-serialized version of a Rule.
Parameters:
  rule - the Rule to be serialized. the resulting XML String.



saveRules
protected void saveRules()(Code)
Save the Rules to a persistent store.



tempRuleFile
public File tempRuleFile(Rule rule)(Code)
Provides a temporary file with an exported Rule.
Parameters:
  rule - the Rule for which the file is to be generated. a temporary file with an exported Rule.



updateRules
public synchronized void updateRules()(Code)
In case Rules are indirectly modified (outside this class, which is very common) and the client wants to make sure that those changes are persistent and reflected across the system, it should call this method.



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.