Inherited by ERDDefaultsAssignment.

Public Member Functions | |
| Object | attributeConstants (D2WContext c) |
| Object | defaultSortOrdering (D2WContext context) |
| NSArray | dependentKeys (String keyPath) |
| Object | destinationEntity (D2WContext c) |
| Object | dummyEntity (D2WContext c) |
| Object | entity (D2WContext c) |
| Object | entityForControllerName (D2WContext c) |
| Object | entityForPageConfiguration (D2WContext c) |
| ERDDefaultModelAssignment (String key, Object value) | |
| ERDDefaultModelAssignment (EOKeyValueUnarchiver u) | |
| Object | smartAttribute (D2WContext c) |
| Object | smartDefaultAttributeWidth (D2WContext c) |
| Object | smartDefaultRows (D2WContext c) |
| Object | smartRelationship (D2WContext c) |
| Object | sortKeyForList (D2WContext context) |
Static Public Member Functions | |
| static Object | decodeWithKeyValueUnarchiver (EOKeyValueUnarchiver eokeyvalueunarchiver) |
Static Public Attributes | |
| static final Logger | log = Logger.getLogger(ERDDefaultModelAssignment.class) |
Protected Member Functions | |
| int | attributeWidthAsInt (D2WContext c) |
| EOEntity | dummyEntity () |
| Object | entityForKey (D2WContext c, String key) |
| boolean | isTaskWithoutEntity (String task) |
| int | smartDefaultAttributeWidthAsInt (D2WContext c) |
Static Protected Attributes | |
| static final NSDictionary | keys |
Private Attributes | |
| EOEntity | _dummyEntity |
smartAttribute smartRelationship smartDefaultRows smartDefaultAttributeWidth entity dummyEntity destinationEntity entityForControllerName entityForPageConfiguration sortKeyForList | ERDDefaultModelAssignment | ( | EOKeyValueUnarchiver | u | ) |
Public constructor
| u | key-value unarchiver used when unarchiving from rule files. |
| ERDDefaultModelAssignment | ( | String | key, | |
| Object | value | |||
| ) |
Public constructor
| key | context key | |
| value | of the assignment |
| Object attributeConstants | ( | D2WContext | c | ) |
Returns the default value for the entity based on the controllerName.
| c | current D2W context |
| int attributeWidthAsInt | ( | D2WContext | c | ) | [protected] |
| static Object decodeWithKeyValueUnarchiver | ( | EOKeyValueUnarchiver | eokeyvalueunarchiver | ) | [static] |
Static constructor required by the EOKeyValueUnarchiver interface. If this isn't implemented then the default behavior is to construct the first super class that does implement this method. Very lame.
| eokeyvalueunarchiver | to be unarchived |
Reimplemented in ERDDefaultsAssignment.
| Object defaultSortOrdering | ( | D2WContext | context | ) |
Called when firing this assignment with the key-path: defaultSortOrdering.
| NSArray dependentKeys | ( | String | keyPath | ) |
Implementation of the ERDComputingAssignmentInterface. This array of keys is used when constructing the significant keys for the passed in keyPath.
| keyPath | to compute significant keys for. |
Implements ERDComputingAssignmentInterface.
| Object destinationEntity | ( | D2WContext | c | ) |
Returns the default value for the destination entity. This is a value add because we are now also able to set the destination entity in other rules.
| c | current D2W context |
| Object dummyEntity | ( | D2WContext | c | ) |
Returns a fake entity that can be used for tasks such as error/confirm.
| c | current D2W context |
| EOEntity dummyEntity | ( | ) | [protected] |
Utility to create a fake entity that can be used for tasks such as error/confirm.
| Object entity | ( | D2WContext | c | ) |
Returns a fake entity that can be used for tasks such as error/confirm.
| c | current D2W context |
| Object entityForControllerName | ( | D2WContext | c | ) |
Returns the default value for the entity based on the controllerName.
| c | current D2W context |
| Object entityForKey | ( | D2WContext | c, | |
| String | key | |||
| ) | [protected] |
| Object entityForPageConfiguration | ( | D2WContext | c | ) |
Returns the default value for the entity based on the pageConfiguration.
| c | current D2W context |
| boolean isTaskWithoutEntity | ( | String | task | ) | [protected] |
| Object smartAttribute | ( | D2WContext | c | ) |
Resolves the EOAttribute in a smarter manner using the current object from the context as well as the propertyKey to determine the current attribute. Works even with inheirtance. Works around the following problem: An entity A has a relationship b to an entity B, which has a subentity B1. B1 has an attribute k, which B does not have. If in an inspect page for entity A, you use b.k as a display key, then the D2W rules which are based on d2wContext.attribute will not fire properly. This is because attribute is null, instead of containing <EOAttribute entity="B1" name="k">. The reason D2W does not find it is that it uses the Model to find out the EOAttribute and starts from A. Following the relationship b, gives a B, and asking B for an attribute named k returns nil and you lose.
| c | current D2W context |
| Object smartDefaultAttributeWidth | ( | D2WContext | c | ) |
| int smartDefaultAttributeWidthAsInt | ( | D2WContext | c | ) | [protected] |
| Object smartDefaultRows | ( | D2WContext | c | ) |
| Object smartRelationship | ( | D2WContext | c | ) |
Resolves the EORelationship in a smarter manner using the current object from the context as well as the propertyKey to determine the current relationship. Works even with inheritance. Works around the following problem: An entity A has a relationship b to an entity B, which has a subentity B1. B1 has a relationship k, which B does not have. If in an inspect page for entity A, you use b.k as a display key, then the D2W rules which are based on d2wContext.relationship will not fire properly. This is because relationship is null, instead of containing <EORelationship entity="B1" name="k">. The reason D2W does not find it is that it uses the Model to find out the EORelationship and starts from A. Following the relationship b, gives a B, and asking B for a relationship named k returns null and you lose.
| c | current D2W context |
| Object sortKeyForList | ( | D2WContext | context | ) |
Called when firing this assignment with the key-path: sortKeyForList.
EOEntity _dummyEntity [private] |
final NSDictionary keys [static, protected] |
Initial value:
ERXDictionaryUtilities.dictionaryWithObjectsAndKeys( new Object [] { new NSArray(new Object[] {"propertyKey", "object.entityName", "entity.name"}), "smartAttribute", new NSArray(new Object[] {"propertyKey", "object.entityName", "entity.name"}), "smartRelationship", new NSArray(new Object[] {"smartAttribute"}), "attributeConstants", new NSArray(new Object[] {"smartAttribute"}), "smartDefaultRows", new NSArray(new Object[] {"smartAttribute"}), "smartDefaultAttributeWidth", new NSArray(new Object[] {"smartRelationship"}), "destinationEntity", new NSArray(new Object[] {"propertyKey", "keyWhenRelationship"}), "sortKeyForList", new NSArray(new Object[] {"controllerName"}), "entityForControllerName", new NSArray(new Object[] {"pageConfiguration"}), "entityForPageConfiguration", new NSArray(new Object[] {"pageConfiguration"}), "defaultSortOrdering", NSArray.EmptyArray, "entity", NSArray.EmptyArray, "dummyEntity" })
final Logger log = Logger.getLogger(ERDDefaultModelAssignment.class) [static] |
logging support
Reimplemented from ERDAssignment.
1.5.8