Project Wonder 2.0

er.directtoweb
Class ERDDefaultDisplayNameAssignment

java.lang.Object
  extended bycom.webobjects.directtoweb.Assignment
      extended byer.directtoweb.ERDAssignment
          extended byer.directtoweb.ERDDefaultDisplayNameAssignment
All Implemented Interfaces:
EOKeyValueArchiving, ERDComputingAssignmentInterface, ERDLocalizableAssignmentInterface, Serializable

public class ERDDefaultDisplayNameAssignment
extends ERDAssignment
implements ERDLocalizableAssignmentInterface

Beautify the display names for the various keys in D2W a better way.

Author:
ak
See Also:
Serialized Form

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 dependent keys of the assignment
 
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
ERDDefaultDisplayNameAssignment(EOKeyValueUnarchiver u)
          Public constructor
ERDDefaultDisplayNameAssignment(String key, Object value)
          Public constructor
 
Method Summary
static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
          Static constructor required by the EOKeyValueUnarchiver interface.
 NSArray dependentKeys(String keyPath)
          Implementation of the ERDComputingAssignmentInterface.
 Object displayNameForConfirmDeleteConfiguration(D2WContext c)
           
 Object displayNameForCreateConfiguration(D2WContext c)
           
 Object displayNameForDestinationEntity(D2WContext c)
           
 Object displayNameForEditConfiguration(D2WContext c)
           
 Object displayNameForEntity(D2WContext c)
           
 Object displayNameForInspectConfiguration(D2WContext c)
           
 Object displayNameForKeyPath(D2WContext c)
           
 Object displayNameForPageConfiguration(D2WContext c)
           
 Object displayNameForProperty(D2WContext c)
           
 Object displayNameForSectionKey(D2WContext c)
           
 Object displayNameForTabKey(D2WContext c)
           
protected  Object localizedValueForDisplayNameOfKeyPath(String keyPath, D2WContext c)
          Helper to get pull the value, pretty-print it and run it through the localizer.
 
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

keys

protected static final NSDictionary keys
holds the dependent keys of the assignment

Constructor Detail

ERDDefaultDisplayNameAssignment

public ERDDefaultDisplayNameAssignment(EOKeyValueUnarchiver u)
Public constructor

Parameters:
u - key-value unarchiver used when unarchiving from rule files.

ERDDefaultDisplayNameAssignment

public ERDDefaultDisplayNameAssignment(String key,
                                       Object value)
Public constructor

Parameters:
key - context key
value - of the assignment
Method Detail

dependentKeys

public NSArray dependentKeys(String keyPath)
Implementation of the ERDComputingAssignmentInterface. This array of keys is used when constructing the significant keys for the passed in keyPath.

Specified by:
dependentKeys in interface ERDComputingAssignmentInterface
Parameters:
keyPath - to compute significant keys for.
Returns:
array of context keys this assignment depends upon.

decodeWithKeyValueUnarchiver

public static Object decodeWithKeyValueUnarchiver(EOKeyValueUnarchiver eokeyvalueunarchiver)
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.

Parameters:
eokeyvalueunarchiver - to be unarchived
Returns:
decoded assignment of this class

localizedValueForDisplayNameOfKeyPath

protected Object localizedValueForDisplayNameOfKeyPath(String keyPath,
                                                       D2WContext c)
Helper to get pull the value, pretty-print it and run it through the localizer.


displayNameForProperty

public Object displayNameForProperty(D2WContext c)
Returns:
a beautified, localized display name for the current propertyKey

displayNameForKeyPath

public Object displayNameForKeyPath(D2WContext c)
Returns:
a beautified, localized display name for the key path of the current propertyKey

displayNameForEntity

public Object displayNameForEntity(D2WContext c)
Returns:
a beautified, localized display name for the current entity.name

displayNameForDestinationEntity

public Object displayNameForDestinationEntity(D2WContext c)
Returns:
a beautified, localized display name for the current destinationEntity

displayNameForSectionKey

public Object displayNameForSectionKey(D2WContext c)
Returns:
a beautified, localized display name for the current sectionKey

displayNameForTabKey

public Object displayNameForTabKey(D2WContext c)
Returns:
a beautified, localized display name for the current tabKey

displayNameForPageConfiguration

public Object displayNameForPageConfiguration(D2WContext c)
Returns:
a beautified, localized display name for the current pageConfiguration

displayNameForEditConfiguration

public Object displayNameForEditConfiguration(D2WContext c)
Returns:
a beautified, localized display name for the current editConfigurationName

displayNameForInspectConfiguration

public Object displayNameForInspectConfiguration(D2WContext c)
Returns:
a beautified, localized display name for the current inspectConfigurationName

displayNameForCreateConfiguration

public Object displayNameForCreateConfiguration(D2WContext c)
Returns:
a beautified, localized display name for the current createConfigurationName

displayNameForConfirmDeleteConfiguration

public Object displayNameForConfirmDeleteConfiguration(D2WContext c)
Returns:
a beautified, localized display name for the current confirmDeleteConfigurationName

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.