|
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 |
|---|
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support |
| Field Summary | |
|---|---|
protected static NSDictionary |
keys
holds the array of keys this assignment depends upon |
static 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(EOKeyValueUnarchiver u)
Public constructor |
|
ERDDefaultModelAssignment(String key,
Object value)
Public constructor |
|
| Method Summary | |
|---|---|
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 Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver interface. |
Object |
defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
Called when firing this assignment with the key-path: defaultSortOrdering. |
NSArray |
dependentKeys(String keyPath)
Implementation of the ERDComputingAssignmentInterface. |
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. |
Object |
dummyEntity(com.webobjects.directtoweb.D2WContext c)
Returns a fake entity that can be used for tasks such as error/confirm. |
Object |
entity(com.webobjects.directtoweb.D2WContext c)
Returns a fake entity that can be used for tasks such as error/confirm. |
Object |
entityForControllerName(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the controllerName. |
protected Object |
entityForKey(com.webobjects.directtoweb.D2WContext c,
String key)
|
Object |
entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
Returns the default value for the entity based on the pageConfiguration. |
protected boolean |
isTaskWithoutEntity(String task)
|
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. |
Object |
smartDefaultAttributeWidth(com.webobjects.directtoweb.D2WContext c)
|
protected int |
smartDefaultAttributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
|
Object |
smartDefaultRows(com.webobjects.directtoweb.D2WContext c)
|
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. |
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 Logger log
protected static final NSDictionary keys
| Constructor Detail |
|---|
public ERDDefaultModelAssignment(EOKeyValueUnarchiver u)
u - key-value unarchiver used when unarchiving
from rule files.
public ERDDefaultModelAssignment(String key,
Object value)
key - context keyvalue - of the assignment| Method Detail |
|---|
public NSArray dependentKeys(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 Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
eokeyvalueunarchiver - to be unarchived
protected int attributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
protected int smartDefaultAttributeWidthAsInt(com.webobjects.directtoweb.D2WContext c)
public Object smartDefaultAttributeWidth(com.webobjects.directtoweb.D2WContext c)
public Object smartDefaultRows(com.webobjects.directtoweb.D2WContext c)
public 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 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 EOEntity dummyEntity()
public Object dummyEntity(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public Object entity(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
protected boolean isTaskWithoutEntity(String task)
protected Object entityForKey(com.webobjects.directtoweb.D2WContext c,
String key)
public Object entityForControllerName(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public Object attributeConstants(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public Object entityForPageConfiguration(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public Object destinationEntity(com.webobjects.directtoweb.D2WContext c)
c - current D2W context
public Object sortKeyForList(com.webobjects.directtoweb.D2WContext context)
public Object defaultSortOrdering(com.webobjects.directtoweb.D2WContext context)
|
Last updated: Wed, Feb 22, 2012 07:00 AM EST | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||