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


java.lang.Object
   org.osbl.agent.model.Rule

Rule
public class Rule (Code)
A rule consists principally of two key components: Conditions and Actions. Conditions define under which circumstances the Actions should be executed. This class serves as an coherent unit of Conditions and Actions and allows other operations such as giving the Rule a name and specify wether other users should be able to view and use the Rule or not.
See Also:    Condition, Action
author:
   Sebastian Nozzi.



Constructor Summary
public  Rule(String name)
     Instantiates a new Rule with the given name.
public  Rule()
     Instantiates a new Rule (with an empty name).

Method Summary
public  booleanequals(Object obj)
     Provides a better implementation than the default, comparing the fields and then performing "equals" on the Conditions and Actions.
public  booleanevaluateConditions(RuleContext context)
     Evaluate Conditions from the internal List of Conditions. The evaluation stops as soon as one Condition evaluates to false.
Parameters:
  context - the RuleContext used to perform the evaluation.
public  voidexecuteActions(RuleContext context)
     Execute all Actions of the internal list of Actions.
Parameters:
  context - the RuleContext used to perform the evaluation.
public  List<Action>getActions()
     Gets the list of Actions.
public  List<Condition>getConditions()
     Gets the list of Conditions.
public  StringgetCreatorUser()
     Gets the creator user-id.
public  Hashtable<String, Object>getMetaInformation()
     Gets the meta-information repository.
public  StringgetName()
     Gets the name of the Rule.
public  booleanisPublic()
     Checks if is the Rule is marked as public.
public static  booleanpropertyEquals(Object thisProperty, Object otherProperty)
     Convenience static method to properly compare two properties of an object, taking into account that any of them could be "null".
public  voidrun(RuleContext rtc)
     Runs the Rule for the given RuleContext.
public  voidsetActions(List<Action> actions)
     Sets a new Action list.
public  voidsetConditions(List<Condition> conditions)
     Sets a new Condition list.
public  voidsetCreatorUser(String user)
     Sets the creator user-id.
public  voidsetMetaInformation(Hashtable<String, Object> metaInformation)
     Assigns a new meta-information repository.
public  voidsetName(String name)
     Sets the name of the Rule.
public  voidsetPublic(boolean isPublic)
     Marks the Rule as public.
public  StringtoString()
     If the Rule has a name, then it is used as String version, otherwise the default implementation is used.


Constructor Detail
Rule
public Rule(String name)(Code)
Instantiates a new Rule with the given name.
Parameters:
  name - Name of the new Rule.



Rule
public Rule()(Code)
Instantiates a new Rule (with an empty name).




Method Detail
equals
public boolean equals(Object obj)(Code)
Provides a better implementation than the default, comparing the fields and then performing "equals" on the Conditions and Actions. The included Conditions and Actions should also override "equals" and provide a better implementation.
Parameters:
  obj - the obj true, if equals
See Also:   java.lang.Object.equals(java.lang.Object)



evaluateConditions
public boolean evaluateConditions(RuleContext context)(Code)
Evaluate Conditions from the internal List of Conditions. The evaluation stops as soon as one Condition evaluates to false.
Parameters:
  context - the RuleContext used to perform the evaluation. It should havebeen populated with at least the target instance. true, if all Conditions evaluated to true.



executeActions
public void executeActions(RuleContext context)(Code)
Execute all Actions of the internal list of Actions.
Parameters:
  context - the RuleContext used to perform the evaluation. It should havebeen populated with at least the target instance.



getActions
public List<Action> getActions()(Code)
Gets the list of Actions. To add/remove Actions to a Rule use this method to get the List and opperate directly on it. the list of Actions.



getConditions
public List<Condition> getConditions()(Code)
Gets the list of Conditions. To add/remove Conditions to a rule use this method to get the List and opperate directly on it. the list of Conditions.



getCreatorUser
public String getCreatorUser()(Code)
Gets the creator user-id. The user-id is used for security purposes (for example an user can only edit/delete his/her own Rules in the system). the creator user-id



getMetaInformation
public Hashtable<String, Object> getMetaInformation()(Code)
Gets the meta-information repository. the meta-data repository



getName
public String getName()(Code)
Gets the name of the Rule. the name of the Rule.



isPublic
public boolean isPublic()(Code)
Checks if is the Rule is marked as public. Public Rules are usable (but not editable) by other users in the AgentSystem. true, if the Rule is public.



propertyEquals
public static boolean propertyEquals(Object thisProperty, Object otherProperty)(Code)
Convenience static method to properly compare two properties of an object, taking into account that any of them could be "null". It avoids potential NullPointerExceptions that can be caused by comparing properties using "equals".
Parameters:
  thisProperty - one property
Parameters:
  otherProperty - the other property true, if successful



run
public void run(RuleContext rtc)(Code)
Runs the Rule for the given RuleContext. It does the same as calling "evaluateConditions" and if successfull calling "executeActions".
Parameters:
  rtc - the rtc



setActions
public void setActions(List<Action> actions)(Code)
Sets a new Action list. The new list is used thus replacing all existing Actions.
Parameters:
  actions - the list of Actions.



setConditions
public void setConditions(List<Condition> conditions)(Code)
Sets a new Condition list. The new list is used thus replacing all existing Conditions.
Parameters:
  conditions - the list of Conditions



setCreatorUser
public void setCreatorUser(String user)(Code)
Sets the creator user-id. The user-id is used for security purposes (for example an user can only edit/delete his/her own Rules in the system).
Parameters:
  user - the new creator user-id.



setMetaInformation
public void setMetaInformation(Hashtable<String, Object> metaInformation)(Code)
Assigns a new meta-information repository.
Parameters:
  metaInformation - the meta-data repository



setName
public void setName(String name)(Code)
Sets the name of the Rule.
Parameters:
  name - the new name.



setPublic
public void setPublic(boolean isPublic)(Code)
Marks the Rule as public. Public Rules are usable (but not editable) by other users in the AgentSystem.
Parameters:
  isPublic - true if the Rule is to be published for all.



toString
public String toString()(Code)
If the Rule has a name, then it is used as String version, otherwise the default implementation is used. an user readable version, using the Rule's name, if available.
See Also:   java.lang.Object.toString



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.