er.directtoweb
Class ERD2WModel._PatchedRule
java.lang.Object
com.webobjects.directtoweb.Rule
er.directtoweb.ERD2WModel._PatchedRule
- All Implemented Interfaces:
- EOKeyValueArchiving, Serializable
- Enclosing class:
- ERD2WModel
- public static class ERD2WModel._PatchedRule
- extends Rule
Rule class that works around two problems:
- when you have an assignment class that is not present in the classpath
then the model will not load, making for very strange errors. We replace the
missing class with the normal assignment class and log the error.
- when evaluating rule priorities, the default is to place rules containing
pageConfiguration
keys so high up that they will get prefered over rules without such a condition, but with a higher author setting.
This is pretty ridiculous and leads to having to set ... AND (pageConfigurstion like '*')
in all the conditions.
We place rules with a pageConfiguration
so high that they will be higher than rules with the same author setting
but lower than a rule with a higher setting.
In order to be usable with the D2WClient and Rule editor, we also patch the encoded
dictionary so these tools find no trace of the patched rules.
- Author:
- ak
- See Also:
- Serialized Form
Methods inherited from class com.webobjects.directtoweb.Rule |
_lhsToString, author, canFireInContext, compareRules, createAssignment, dataTypesInvolved, dynamicPagesInvolved, fire, firstDynamicPageNameInvolved, firstEntityInvolved, firstPropertyKeyInvolved, firstTaskInvolved, hasSameSettingsAs, isEntityPermissionRule, isEntityRule, isLookRule, isStartupRule, isTaskRule, lhs, rhs, rhsKeyPath, rhsKeyPathHash, setLhs, setRhs, tasksInvolved |
ERD2WModel._PatchedRule
public ERD2WModel._PatchedRule()
ERD2WModel._PatchedRule
public ERD2WModel._PatchedRule(EOKeyValueUnarchiver eokeyvalueunarchiver)
decodeWithKeyValueUnarchiver
public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
encodeWithKeyValueArchiver
public void encodeWithKeyValueArchiver(EOKeyValueArchiver eokeyvaluearchiver)
- Overridden to patch the normal rule class name into the generated dictionary.
- See Also:
EOKeyValueArchiving.encodeWithKeyValueArchiver(com.webobjects.eocontrol.EOKeyValueArchiver)
priority
public int priority()
- Overridden to work around
- See Also:
Rule.priority()
assignmentClassName
public String assignmentClassName()
cloneRule
public ERD2WModel._PatchedRule cloneRule()
toString
public String toString()
- Builds a string like:
100: ((entity.name = 'Bug') and (task = 'edit')) => isInspectable = true [com.directtowen.BooleanAssignment]
- Returns:
- a nice description of the rule
Copyright © 2002 – 2004 Project Wonder.