Inherited by ERDDefaultActionAssignment, ERDDefaultCancelCreationMessageAssignment, ERDDefaultClassStringAssignment, ERDDefaultConfigurationNameAssignment, ERDDefaultDisplayNameAssignment, ERDDefaultEntityNameAssignment, ERDDefaultFormControlNameAssignment, ERDDefaultIDAssignment, ERDDefaultModelAssignment, ERDDefaultPropertyNameAssignment, ERDDefaultsEmbeddedAssignment, ERDImageNameAssignment, ERDLocalizedAssignment, ERDRelationshipSortAssignment, ERDSmartAttributeAssignment, ERDSmartRelationshipAssignment, ERDSortedManyToManyAssignment, ERDTabSectionsContentsAssignment, and ERMDDefaultCSSAssignment.

Public Member Functions | |
| ERDAssignment (String key, Object value) | |
| ERDAssignment (EOKeyValueUnarchiver u) | |
| Object | fire (D2WContext c) |
| String | keyForMethodLookup (D2WContext c) |
| Object | localizedTemplateStringForKeyInContext (String key, D2WContext c) |
| Object | localizedValueForKeyInContext (String key, D2WContext c) |
| Object | localizedValueForKeyWithDefaultInContext (String key, D2WContext c) |
| ERXLocalizer | localizerForContext (D2WContext c) |
Static Public Attributes | |
| static final Class[] | D2WContextClassArray = new Class[] { D2WContext.class } |
| static final Logger | log = Logger.getLogger("er.directtoweb.rules.ERDAssignment") |
Protected Member Functions | |
| boolean | booleanContextValueForKey (D2WContext c, String key, boolean defaultValue) |
Static Protected Member Functions | |
| static void | logDeprecatedMessage (Class oldClass, Class newClass) |
| ERDAssignment | ( | EOKeyValueUnarchiver | u | ) |
Public constructor
| u | key-value unarchiver used when unarchiving from rule files. |
| ERDAssignment | ( | String | key, | |
| Object | value | |||
| ) |
Public constructor
| key | context key | |
| value | of the assignment |
| boolean booleanContextValueForKey | ( | D2WContext | c, | |
| String | key, | |||
| boolean | defaultValue | |||
| ) | [protected] |
| Object fire | ( | D2WContext | c | ) |
Method called to fire an assignment. This method has been enhanced to dynamicly lookup the real method to call based on the return value of keyForMethodLookup. The default implementation will lookup the method based on the key path of the assignment. If you are building a generic assignment like a BooleanAssignment you should override this method seeing as you wouldn't care what the key path of the assignment is. If you would like to provide a different methodology for the method to be fired override the method keyForMethodLookup.
| c | current D2W context |
Reimplemented in ERDLocalizedAssignment.
| String keyForMethodLookup | ( | D2WContext | c | ) |
There are basically two choices to lookup the method to be called when an assignment is fired. The first is to use the keypath that is being requested to lookup the method, i.e. if the context is being asked for the key: displayNameForProperty then that method will be called on the particular assignment. The second method is to use the value of the assignment as the method to be called. Using the value of the assignment allows the passing of a parameter to your assignment method, this gives the flexibility to have several methods for the same key path.
| c | current context |
Reimplemented in ERDDefaultsEmbeddedAssignment.
| Object localizedTemplateStringForKeyInContext | ( | String | key, | |
| D2WContext | c | |||
| ) |
| Object localizedValueForKeyInContext | ( | String | key, | |
| D2WContext | c | |||
| ) |
Returns a localized value for a given key in a given context if localization is enabled. This implementation calls valueForKeyPath on the localizer for the given context. This method belongs to ERDLocaizableInterface.
| key | to be looked up on the context | |
| c | current context |
| Object localizedValueForKeyWithDefaultInContext | ( | String | key, | |
| D2WContext | c | |||
| ) |
Returns a localized value for a given key in a given context if localization is enabled. This implementation calls localizedStringForKeyWithDefault on the localizer for the given context. This method belongs to ERDLocalizableInterface.
| key | to be looked up on the context | |
| c | current context |
| ERXLocalizer localizerForContext | ( | D2WContext | c | ) |
Gets the localizer for a given context. The default implementation just returns the localizer for the current session of the given context. This method belongs to ERDLocaizableInterface.
| c | current context |
Reimplemented in ERDDefaultsEmbeddedAssignment.
| static void logDeprecatedMessage | ( | Class | oldClass, | |
| Class | newClass | |||
| ) | [static, protected] |
final Class [] D2WContextClassArray = new Class[] { D2WContext.class } [static] |
Cached context class array
final Logger log = Logger.getLogger("er.directtoweb.rules.ERDAssignment") [static] |
logging supprt
Reimplemented in ERDDefaultClassStringAssignment, ERDDefaultDisplayNameAssignment, ERDDefaultEntityNameAssignment, ERDDefaultFormControlNameAssignment, ERDDefaultIDAssignment, ERDDefaultModelAssignment, ERDDefaultPropertyNameAssignment, ERDDefaultsEmbeddedAssignment, ERDImageNameAssignment, ERDLocalizedAssignment, and ERMDDefaultCSSAssignment.
1.5.8