|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.okiproject.serviceapi.rules.RulesFactory
Copyright (c) 2001 Massachusetts Institute of Technology
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The RulesFactory allows the application developer to create Rules objects in the Rules database, to get Rules objects from the Rules database given selection criteria, to ask questions of Rules such as what subject can do verb for predicate.
The key objects in Rules are Rules, Verbs, Subjects, and and Predicates. There are some other objects in Rules that play supporting rules. They are SubjectType, VerbType, PredicateType.
There are two methods to create Rules. One uses method uses Person, Function, and Qualifier. The other adds effective date and expiration date. For the method without the dates the effective date is today and there is no expiration date.
There are methods for getting Rules:
(1) getRulesSimpleForm This method is overloaded to allow for combinations of filtering arguments to find matching Rules. (2) getRulesForDoingVerbWithPredicate Given a Verb and a Predicate, finds a list of all Rules that would permit a person to do the Verb with the Predicate. This method is overloaded so that Rules for Verbs within a VerbType can be found. This uses a different algorithm than getRulesSimpleForm. Note that the Predicate in any found Rule might be a parent of the Predicate give as an argument. (3) getRulesGeneralForm Give a set of criteria/value pairs, this method finds all matching Rules. With the general form the application developer can do anything that the other two forms of getRules can do and a lot more.
Model
,
Predicate
,
Predicates
,
PredicateType
,
Rule
,
Rules
,
Subject
,
Subjects
,
SubjectType
,
Verb
,
Verbs
,
$Source: /cvs/oki/org/okiproject/serviceapi/doc/rules/org/okiproject/serviceapi/rules/RulesFactory.html,v $
, Serialized FormConstructor Summary | |
RulesFactory()
|
Method Summary | |
org.okiproject.serviceapi.common.Agent |
getAgent()
Method getAgent |
static RulesFactory |
getDefaultRulesFactory(org.okiproject.serviceapi.common.Agent agent)
Method getDefaultRulesFactory |
java.util.Map |
getProperties()
Method getProperties |
static RulesFactory |
getRulesFactory(org.okiproject.serviceapi.common.Agent agent,
java.util.Map props)
Method getRulesFactory |
void |
setAgent(org.okiproject.serviceapi.common.Agent agent)
Method setAgent |
void |
setProperties(java.util.Map properties)
Method setProperties |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RulesFactory()
Method Detail |
public static RulesFactory getDefaultRulesFactory(org.okiproject.serviceapi.common.Agent agent) throws java.lang.Exception
agent
- java.lang.Exception
- public static RulesFactory getRulesFactory(org.okiproject.serviceapi.common.Agent agent, java.util.Map props) throws java.lang.Exception
agent
- props
- java.lang.Exception
- public org.okiproject.serviceapi.common.Agent getAgent()
public void setAgent(org.okiproject.serviceapi.common.Agent agent)
agent
- public java.util.Map getProperties()
public void setProperties(java.util.Map properties)
properties
-
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |