er.directtoweb
Class ERD2WContextDictionary
java.lang.Object
er.directtoweb.ERD2WContextDictionary
- public class ERD2WContextDictionary
- extends Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_context
protected D2WContext _context
_pageConfiguration
protected String _pageConfiguration
_pageLevelKeys
protected NSMutableArray _pageLevelKeys
_componentLevelKeys
protected NSMutableArray _componentLevelKeys
_dictionary
protected NSMutableDictionary _dictionary
_allKeys
protected NSMutableDictionary _allKeys
ERD2WContextDictionary
public ERD2WContextDictionary(String pageConfigurationName,
NSArray pageKeys,
NSArray componentKeys)
ERD2WContextDictionary
public ERD2WContextDictionary(String pageConfiguration,
NSDictionary dictionary)
addPageLevelValues
protected void addPageLevelValues()
componentLevelValuesForKey
protected NSDictionary componentLevelValuesForKey(String propertyKey)
- 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
-
dictionary
public NSDictionary dictionary()
addPropertyKeys
protected void addPropertyKeys(NSMutableDictionary componentLevelKeys,
NSArray array)
rulesForLevel
public NSArray rulesForLevel(int level)
addRulesForPropertyKeys
protected void addRulesForPropertyKeys(int level,
NSMutableArray rules,
NSArray keys)
context
public D2WContext context()
Copyright © 2002 – 2004 Project Wonder.