ERDDefaultsEmbeddedAssignment Class Reference

Inherits er::directtoweb::assignments::ERDAssignment.

Collaboration diagram for ERDDefaultsEmbeddedAssignment:

Collaboration graph
[legend]

List of all members.

Public Member Functions

NSArray defaultEmbeddedDisplayPropertyKeys (D2WContext c)
String defaultEmbeddedEditPageConfiguration (D2WContext c)
String defaultEmbeddedEntityDisplayName (D2WContext c)
Object defaultEmbeddedEntityName (D2WContext c)
String defaultEmbeddedInspectPageConfiguration (D2WContext c)
String defaultEmbeddedListPageConfiguration (D2WContext c)
NSArray dependentKeys (String keyPath)
 ERDDefaultsEmbeddedAssignment (String key, Object value)
 ERDDefaultsEmbeddedAssignment (EOKeyValueUnarchiver u)
String keyForMethodLookup (D2WContext c)
ERXLocalizer localizerForContext (D2WContext c)

Static Public Member Functions

static Object decodeWithKeyValueUnarchiver (EOKeyValueUnarchiver eokeyvalueunarchiver)

Static Public Attributes

static final NSArray _DEPENDENT_KEYS = new NSArray(new String[] {"embeddedEntityName", "object.entityName", "propertyKey", "pageConfiguration"})

Static Package Attributes

static final Logger log = Logger.getLogger(ERDDefaultsEmbeddedAssignment.class)


Detailed Description

This assignment calculates default values for embedded page configurations.

Constructor & Destructor Documentation

ERDDefaultsEmbeddedAssignment ( EOKeyValueUnarchiver  u  ) 

Public constructor

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

ERDDefaultsEmbeddedAssignment ( String  key,
Object  value 
)

Public constructor

Parameters:
key context key
value of the assignment


Member Function Documentation

static Object decodeWithKeyValueUnarchiver ( EOKeyValueUnarchiver  eokeyvalueunarchiver  )  [static]

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

NSArray defaultEmbeddedDisplayPropertyKeys ( 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.

String defaultEmbeddedEditPageConfiguration ( 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.

String defaultEmbeddedEntityDisplayName ( 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.

Object defaultEmbeddedEntityName ( 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.

String defaultEmbeddedInspectPageConfiguration ( 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.

String defaultEmbeddedListPageConfiguration ( 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.

NSArray dependentKeys ( 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.

Implements ERDComputingAssignmentInterface.

String keyForMethodLookup ( 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.

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

Reimplemented from ERDAssignment.

ERXLocalizer localizerForContext ( 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.

Parameters:
c a D2W context
Returns:
localizer for the session stored in the context.

Reimplemented from ERDAssignment.


Member Data Documentation

final NSArray _DEPENDENT_KEYS = new NSArray(new String[] {"embeddedEntityName", "object.entityName", "propertyKey", "pageConfiguration"}) [static]

holds the array of dependent keys

final Logger log = Logger.getLogger(ERDDefaultsEmbeddedAssignment.class) [static, package]

logging support

Reimplemented from ERDAssignment.


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:50 2012 for Project Wonder by  doxygen 1.5.8