Project Wonder 5.0

er.directtoweb.assignments.defaults
Class ERDDefaultsEmbeddedAssignment

java.lang.Object
  extended by com.webobjects.directtoweb.Assignment
      extended by er.directtoweb.assignments.ERDAssignment
          extended by er.directtoweb.assignments.defaults.ERDDefaultsEmbeddedAssignment
All Implemented Interfaces:
com.webobjects.eocontrol.EOKeyValueArchiving, ERDComputingAssignmentInterface, java.io.Serializable

public class ERDDefaultsEmbeddedAssignment
extends ERDAssignment

This assignment calculates default values for embedded page configurations.

See Also:
Serialized Form

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
static com.webobjects.foundation.NSArray _DEPENDENT_KEYS
          holds the array of dependent keys
 
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
ERDDefaultsEmbeddedAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
          Public constructor
ERDDefaultsEmbeddedAssignment(java.lang.String key, java.lang.Object value)
          Public constructor
 
Method Summary
static java.lang.Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.EOKeyValueUnarchiver eokeyvalueunarchiver)
          Static constructor required by the EOKeyValueUnarchiver interface.
 com.webobjects.foundation.NSArray defaultEmbeddedDisplayPropertyKeys(com.webobjects.directtoweb.D2WContext c)
          Calculates the default embedded display property keys for a given context.
 java.lang.String defaultEmbeddedEditPageConfiguration(com.webobjects.directtoweb.D2WContext c)
          Calculates and returns the default embedded edit page configuration to be used for embedded edit pages.
 java.lang.String defaultEmbeddedEntityDisplayName(com.webobjects.directtoweb.D2WContext c)
          Calculates and returns the default embedded entity display name.
 java.lang.Object defaultEmbeddedEntityName(com.webobjects.directtoweb.D2WContext c)
          Calculates the default embedded entity name using the current object and propertyKey.
 java.lang.String defaultEmbeddedInspectPageConfiguration(com.webobjects.directtoweb.D2WContext c)
          Calculates and returns the default embedded inspect page configuration to be used for embedded inspect pages.
 java.lang.String defaultEmbeddedListPageConfiguration(com.webobjects.directtoweb.D2WContext c)
          Calculates and returns the default embedded list page configuration to be used for embedded list pages.
 com.webobjects.foundation.NSArray dependentKeys(java.lang.String keyPath)
          Implementation of the ERDComputingAssignmentInterface.
 java.lang.String keyForMethodLookup(com.webobjects.directtoweb.D2WContext c)
          By default the key path being requested is used as the key to lookup the method to call on the ERDAssignment subclass.
 ERXLocalizer localizerForContext(com.webobjects.directtoweb.D2WContext c)
          Gets the localizer for the current context.
 
Methods inherited from class er.directtoweb.assignments.ERDAssignment
booleanContextValueForKey, fire, localizedTemplateStringForKeyInContext, localizedValueForKeyInContext, localizedValueForKeyWithDefaultInContext, 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

_DEPENDENT_KEYS

public static final com.webobjects.foundation.NSArray _DEPENDENT_KEYS
holds the array of dependent keys

Constructor Detail

ERDDefaultsEmbeddedAssignment

public ERDDefaultsEmbeddedAssignment(com.webobjects.eocontrol.EOKeyValueUnarchiver u)
Public constructor

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

ERDDefaultsEmbeddedAssignment

public ERDDefaultsEmbeddedAssignment(java.lang.String key,
                                     java.lang.Object value)
Public constructor

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

decodeWithKeyValueUnarchiver

public static java.lang.Object decodeWithKeyValueUnarchiver(com.webobjects.eocontrol.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

dependentKeys

public com.webobjects.foundation.NSArray dependentKeys(java.lang.String keyPath)
Implementation of the ERDComputingAssignmentInterface. This assignment depends upon the context keys: "propertyKey", "object.entityName", and "embeddedEntityName". This array of keys is used when constructing the significant keys for the passed in keyPath.

Parameters:
keyPath - to compute significant keys for.
Returns:
array of context keys this assignment depends upon.

localizerForContext

public ERXLocalizer localizerForContext(com.webobjects.directtoweb.D2WContext c)
Gets the localizer for the current context. Implementation wise all this method does is get the current session from the context and then calls localizerForSession off of ERXLocalizer.

Overrides:
localizerForContext in class ERDAssignment
Parameters:
c - a D2W context
Returns:
localizer for the session stored in the context.

defaultEmbeddedEntityDisplayName

public java.lang.String defaultEmbeddedEntityDisplayName(com.webobjects.directtoweb.D2WContext c)
Calculates and returns the default embedded entity display name. The results are localized.

Parameters:
c - current context
Returns:
default localized embedded entity name.

defaultEmbeddedDisplayPropertyKeys

public com.webobjects.foundation.NSArray defaultEmbeddedDisplayPropertyKeys(com.webobjects.directtoweb.D2WContext c)
Calculates the default embedded display property keys for a given context. Implementation wise this method uses the embedded entity to determine what all of the class properties are minus all of the relationship keys.

Parameters:
c - current D2W context
Returns:
array of display keys for the current embedded entity.

defaultEmbeddedEntityName

public java.lang.Object defaultEmbeddedEntityName(com.webobjects.directtoweb.D2WContext c)
Calculates the default embedded entity name using the current object and propertyKey.

Parameters:
c - current context
Returns:
name of the entity pointed to by the propertyKey off of the object in the context.

defaultEmbeddedListPageConfiguration

public java.lang.String defaultEmbeddedListPageConfiguration(com.webobjects.directtoweb.D2WContext c)
Calculates and returns the default embedded list page configuration to be used for embedded list pages.

Parameters:
c - current context
Returns:
page configuration of the form: "ListEmbedded" + the the value of the current embeddedEntityname.

defaultEmbeddedInspectPageConfiguration

public java.lang.String defaultEmbeddedInspectPageConfiguration(com.webobjects.directtoweb.D2WContext c)
Calculates and returns the default embedded inspect page configuration to be used for embedded inspect pages.

Parameters:
c - current context
Returns:
page configuration of the form: "InspectEmbedded" + the the value of the current embeddedEntityname.

defaultEmbeddedEditPageConfiguration

public java.lang.String defaultEmbeddedEditPageConfiguration(com.webobjects.directtoweb.D2WContext c)
Calculates and returns the default embedded edit page configuration to be used for embedded edit pages.

Parameters:
c - current context
Returns:
page configuration of the form: "EditEmbedded" + the the value of the current embeddedEntityname.

keyForMethodLookup

public java.lang.String keyForMethodLookup(com.webobjects.directtoweb.D2WContext c)
By default the key path being requested is used as the key to lookup the method to call on the ERDAssignment subclass. However in the case of this assignment we want to use the string value of the value of the assignment as the key to lookup the method. For example if value of this assignment is "foo", then when this assignment is fired the method foo(D2WContext) will be called.

Overrides:
keyForMethodLookup in class ERDAssignment
Parameters:
c - current context
Returns:
key for method lookup, in this case the value of the assignment is returned.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.