|
Project Wonder 5.0 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.webobjects.directtoweb.Assignment
er.directtoweb.assignments.ERDAssignment
er.directtoweb.assignments.defaults.ERDDefaultModelAssignment
public class ERDDefaultModelAssignment
A bunch of methods used for pulling default values from EOModels.
Provides defaults for the following keys:
smartAttributesmartRelationshipsmartDefaultRowssmartDefaultAttributeWidthentitydummyEntitydestinationEntityentityForControllerNameentityForPageConfigurationsortKeyForList
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving |
|---|
com.webobjects.eocontrol.EOKeyValueArchiving._NullValueSupport, com.webobjects.eocontrol.EOKeyValueArchiving._NumberSupport, com.webobjects.eocontrol.EOKeyValueArchiving._TimestampSupport, com.webobjects.eocontrol.EOKeyValueArchiving.Awaking, com.webobjects.eocontrol.EOKeyValueArchiving.FinishInitialization, com.webobjects.eocontrol.EOKeyValueArchiving.Support |
| Field Summary | |
|---|---|
protected static com.webobjects.foundation.NSDictionary |
keys
holds the array of keys this assignment depends upon |
static org.apache.log4j.Logger |
log
logging support |
| Fields inherited from class er.directtoweb.assignments.ERDAssignment |
|---|
D2WContextClassArray |
| Fields inherited from class com.webobjects.directtoweb.Assignment |
|---|
KeyPathKey, ValueKey |
| Fields inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving |
|---|
_CLASS |
| Constructor Summary | |
|---|---|
ERDDefaultModelAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
Public constructor |
|
ERDDefaultModelAssignment(java.lang.String key,
java.lang.Object value)
Public constructor |
|
| Method Summary | |
|---|---|
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(com.webobjects.eocontrol.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. |
com.webobjects.foundation.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 com.webobjects.eoaccess.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. |
| Methods inherited from class er.directtoweb.assignments.ERDAssignment |
|---|
booleanContextValueForKey, fire, keyForMethodLookup, localizedTemplateStringForKeyInContext, localizedValueForKeyInContext, localizedValueForKeyWithDefaultInContext, localizerForContext, logDeprecatedMessage |
| Methods inherited from class com.webobjects.directtoweb.Assignment |
|---|
encodeWithKeyValueArchiver, keyPath, toString, value, value |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.log4j.Logger log
protected static final com.webobjects.foundation.NSDictionary keys
| Constructor Detail |
|---|
public ERDDefaultModelAssignment(com.webobjects.eocontrol.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 assignment| Method Detail |
|---|
public com.webobjects.foundation.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(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
eokeyvalueunarchiver - to be unarchived
protected 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 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
c - current D2W context
public 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:
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
c - current D2W context
protected com.webobjects.eoaccess.EOEntity dummyEntity()
public java.lang.Object dummyEntity(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public java.lang.Object entity(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
protected 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 context
public java.lang.Object attributeConstants(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public java.lang.Object entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public java.lang.Object destinationEntity(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public java.lang.Object sortKeyForList(com.webobjects.directtoweb.D2WContext context)
public java.lang.Object defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||