|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.webobjects.directtoweb.Assignment er.directtoweb.ERDAssignment er.directtoweb.ERDDefaultModelAssignment
A bunch of methods used for pulling default values from EOModels.
Provides defaults for the following keys:
smartAttribute
smartRelationship
smartDefaultRows
smartDefaultAttributeWidth
entity
dummyEntity
destinationEntity
entityForControllerName
entityForPageConfiguration
sortKeyForList
Nested Class Summary |
Nested classes inherited from class 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 ERXLogger |
log
logging support |
Fields inherited from class er.directtoweb.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 | |
protected int |
attributeWidthAsInt(D2WContext c)
|
static Object |
decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
Static constructor required by the EOKeyValueUnarchiver interface. |
NSArray |
dependentKeys(String keyPath)
Implementation of the ERDComputingAssignmentInterface . |
Object |
destinationEntity(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(D2WContext c)
Returns 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. |
Object |
entityForControllerName(D2WContext c)
Returns the default value for the entity based on the controllerName. |
protected Object |
entityForKey(D2WContext c,
String key)
|
Object |
entityForPageConfiguration(D2WContext c)
Returns the default value for the entity based on the pageConfiguration. |
protected boolean |
isTaskWithoutEntity(String task)
|
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. |
Object |
smartDefaultAttributeWidth(D2WContext c)
|
protected int |
smartDefaultAttributeWidthAsInt(D2WContext c)
|
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. |
Object |
sortKeyForList(D2WContext context)
Called when firing this assignment with the key-path: sortKeyForList. |
Methods inherited from class er.directtoweb.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 ERXLogger 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 assignmentMethod 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(D2WContext c)
protected int smartDefaultAttributeWidthAsInt(D2WContext c)
public Object smartDefaultAttributeWidth(D2WContext c)
public Object smartDefaultRows(D2WContext c)
public Object smartAttribute(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(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(D2WContext c)
c
- current D2W context
public Object entity(D2WContext c)
c
- current D2W context
protected boolean isTaskWithoutEntity(String task)
protected Object entityForKey(D2WContext c, String key)
public Object entityForControllerName(D2WContext c)
c
- current D2W context
public Object entityForPageConfiguration(D2WContext c)
c
- current D2W context
public Object destinationEntity(D2WContext c)
c
- current D2W context
public Object sortKeyForList(D2WContext context)
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |