public class ERDDefaultModelAssignment extends ERDAssignment
smartAttributesmartRelationshipsmartDefaultRowssmartDefaultAttributeWidthentitydummyEntitydestinationEntityentityForControllerNameentityForPageConfigurationsortKeyForListEOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support| Modifier and Type | Field and Description |
|---|---|
protected static NSDictionary |
keys
holds the array of keys this assignment depends upon
|
static org.apache.log4j.Logger |
log
logging support
|
D2WContextClassArray_CLASS| Constructor and Description |
|---|
ERDDefaultModelAssignment(EOKeyValueUnarchiver u)
Public constructor
|
ERDDefaultModelAssignment(java.lang.String key,
java.lang.Object value)
Public constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
attributeConstants(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the controllerName.
|
protected int |
attributeWidthAsInt(com.webobjects.directtoweb.D2WContext c) |
static java.lang.Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver
interface.
|
java.lang.Object |
defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
Called when firing this assignment with the key-path:
defaultSortOrdering.
|
NSArray |
dependentKeys(java.lang.String keyPath)
Implementation of the
ERDComputingAssignmentInterface. |
java.lang.Object |
destinationEntity(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the destination entity.
|
protected EOEntity |
dummyEntity()
Utility to create a fake entity that can be used for tasks such as error/confirm.
|
java.lang.Object |
dummyEntity(com.webobjects.directtoweb.D2WContext c)
Returns a fake entity that can be used for tasks such as error/confirm.
|
java.lang.Object |
entity(com.webobjects.directtoweb.D2WContext c)
Returns a fake entity that can be used for tasks such as error/confirm.
|
java.lang.Object |
entityForControllerName(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the controllerName.
|
protected java.lang.Object |
entityForKey(com.webobjects.directtoweb.D2WContext c,
java.lang.String key) |
java.lang.Object |
entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the pageConfiguration.
|
protected boolean |
isTaskWithoutEntity(java.lang.String task) |
java.lang.Object |
smartAttribute(com.webobjects.directtoweb.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. |
java.lang.Object |
smartDefaultAttributeWidth(com.webobjects.directtoweb.D2WContext c) |
protected int |
smartDefaultAttributeWidthAsInt(com.webobjects.directtoweb.D2WContext c) |
java.lang.Object |
smartDefaultRows(com.webobjects.directtoweb.D2WContext c) |
java.lang.Object |
smartRelationship(com.webobjects.directtoweb.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. |
java.lang.Object |
sortKeyForList(com.webobjects.directtoweb.D2WContext context)
Called when firing this assignment with the key-path:
sortKeyForList.
|
booleanContextValueForKey, fire, keyForMethodLookup, localizedTemplateStringForKeyInContext, localizedValueForKeyInContext, localizedValueForKeyWithDefaultInContext, localizerForContext, logDeprecatedMessagepublic static final org.apache.log4j.Logger log
protected static final NSDictionary keys
public ERDDefaultModelAssignment(EOKeyValueUnarchiver u)
u - key-value unarchiver used when unarchiving
from rule files.public ERDDefaultModelAssignment(java.lang.String key,
java.lang.Object value)
key - context keyvalue - of the assignmentpublic NSArray dependentKeys(java.lang.String keyPath)
ERDComputingAssignmentInterface. This array
of keys is used when constructing the
significant keys for the passed in keyPath.keyPath - to compute significant keys for.public static java.lang.Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
eokeyvalueunarchiver - to be unarchivedprotected int attributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
protected int smartDefaultAttributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
public java.lang.Object smartDefaultAttributeWidth(com.webobjects.directtoweb.D2WContext c)
public java.lang.Object smartDefaultRows(com.webobjects.directtoweb.D2WContext c)
public java.lang.Object smartAttribute(com.webobjects.directtoweb.D2WContext c)
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 inheritance.
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 contextpublic java.lang.Object smartRelationship(com.webobjects.directtoweb.D2WContext c)
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:c - current D2W contextprotected EOEntity dummyEntity()
public java.lang.Object dummyEntity(com.webobjects.directtoweb.D2WContext c)
c - current D2W contextpublic java.lang.Object entity(com.webobjects.directtoweb.D2WContext c)
c - current D2W contextprotected boolean isTaskWithoutEntity(java.lang.String task)
protected java.lang.Object entityForKey(com.webobjects.directtoweb.D2WContext c,
java.lang.String key)
public java.lang.Object entityForControllerName(com.webobjects.directtoweb.D2WContext c)
c - current D2W contextpublic java.lang.Object attributeConstants(com.webobjects.directtoweb.D2WContext c)
c - current D2W contextpublic java.lang.Object entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
c - current D2W contextpublic java.lang.Object destinationEntity(com.webobjects.directtoweb.D2WContext c)
c - current D2W contextpublic java.lang.Object sortKeyForList(com.webobjects.directtoweb.D2WContext context)
public java.lang.Object defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
Copyright © 2002 – 2022 Project Wonder.