ERD2WContextDictionary Class Reference

Collaboration diagram for ERD2WContextDictionary:

Collaboration graph
[legend]

List of all members.

Classes

class  Configuration

Public Member Functions

D2WContext context ()
NSDictionary dictionary ()
String dictionaryString ()
 ERD2WContextDictionary (String pageConfiguration, NSDictionary dictionary)
 ERD2WContextDictionary (String pageConfigurationName, NSArray pageKeys, NSArray componentKeys)
NSArray rulesForLevel (int level)
String toString ()

Protected Member Functions

void addPageLevelValues ()
void addPropertyKeys (NSMutableDictionary componentLevelKeys, NSArray array)
void addRulesForPropertyKeys (int level, NSMutableArray rules, NSArray keys)
NSDictionary componentLevelValuesForKey (String propertyKey)

Protected Attributes

NSMutableDictionary _allKeys
NSMutableArray _componentLevelKeys
D2WContext _context
NSMutableDictionary _dictionary
String _pageConfiguration
NSMutableArray _pageLevelKeys

Private Member Functions

Assignment createAssigment (String key, Object value)

Static Private Attributes

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


Detailed Description

Converts given entries of a D2WContext with a specified page configuration to a dictionary and to rules again.
Very useful for debugging and testing. You can effectively dump a context for a given page configuration into a .plist file once you are content with your page, then make tons of changes to the rules and all the while test the changed value against all your stored dictionaries, which should make you more confident to make changes like *true* => componentName = "D2WString" [100]
Also, given a dictionary, you can re-create the rules for creating these entries with any given level.
Reads in your d2wclientConfiguration.plists files from every bundle and also reads in the values given in the editors and supports fields.
So be sure to keep the entries to those files up to date :)
 NSArray pageKeys = new NSArray(new Object [] {"pageWrapperName", "pageName", "headComponentName", "displayPropertyKeys"});
 NSArray componentKeys = new NSArray(new Object [] {"componentName", "customComponentName"});
 ERD2WContextDictionary dict = new ERD2WContextDictionary("CreateModuleGroup", pageKeys, componentKeys);
 String value = NSPropertyListSerialization.stringFromPropertyList(dict.dictionary());
 
RENAMEME: to something more sensible??
Author:
ak

Constructor & Destructor Documentation

ERD2WContextDictionary ( String  pageConfigurationName,
NSArray  pageKeys,
NSArray  componentKeys 
)

ERD2WContextDictionary ( String  pageConfiguration,
NSDictionary  dictionary 
)


Member Function Documentation

void addPageLevelValues (  )  [protected]

void addPropertyKeys ( NSMutableDictionary  componentLevelKeys,
NSArray  array 
) [protected]

void addRulesForPropertyKeys ( int  level,
NSMutableArray  rules,
NSArray  keys 
) [protected]

NSDictionary componentLevelValuesForKey ( String  propertyKey  )  [protected]

Returns the keys for the given property key. To find which keys are requiered, the componentName key is used to get the editors and supports.

Parameters:
propertyKey 

D2WContext context (  ) 

Assignment createAssigment ( String  key,
Object  value 
) [private]

NSDictionary dictionary (  ) 

String dictionaryString (  ) 

NSArray rulesForLevel ( int  level  ) 

String toString (  ) 


Member Data Documentation

D2WContext _context [protected]

final Logger log = Logger.getLogger(ERD2WContextDictionary.class) [static, private]


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

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