* Gathers D2W-related information from the current context. This is mainly useful for debugging.
* @param d2wContext the D2W context from which to derive the debugging information
* @return a dictionary of D2W-related keys to describe the state of the provided D2W context.
*/
public static synchronized NSMutableDictionary informationForD2WContext(D2WContext d2wContext) {
NSMutableDictionary info = new NSMutableDictionary();
if (d2wContext != null) {
String pageConfiguration = (String)d2wContext.valueForKeyPath("pageConfiguration");
info.setObjectForKey(pageConfiguration != null ? pageConfiguration : "null", "D2W-PageConfiguration");
String propertyKey = d2wContext.propertyKey();
info.setObjectForKey(propertyKey != null ? propertyKey : "null", "D2W-PropertyKey");
String entityName = (String)d2wContext.valueForKeyPath("entity.name");
info.setObjectForKey(entityName != null ? entityName : "null", "D2W-EntityName");
String task = (String)d2wContext.valueForKey("task");
info.setObjectForKey(task != null ? task : "null", "D2W-SubTask");
String subTask = (String)d2wContext.valueForKey("subTask");
info.setObjectForKey(subTask != null ? subTask : "null", "D2W-SubTask");
if ("tab".equals(subTask) || "wizard".equals("subTask")) {
String tabKey = (String)d2wContext.valueForKey("tabKey");
info.setObjectForKey(tabKey != null ? tabKey : "null", "D2W-TabKey");
NSArray tabSections = (NSArray)d2wContext.valueForKey("tabSectionsContents");
info.setObjectForKey(tabSections != null ? tabSections : "null", "D2W-TabSectionsContents");
} else {
NSArray displayPropertyKeys = (NSArray)d2wContext.valueForKey("displayPropertyKeys");
info.setObjectForKey(displayPropertyKeys != null ? displayPropertyKeys : "null", "D2W-DisplayPropertyKeys");
}
String componentName = (String)d2wContext.valueForKey("componentName");
info.setObjectForKey(componentName != null ? componentName : "null", "D2W-ComponentName");
if (componentName != null && componentName.indexOf("CustomComponent") > 0) {
String customComponentName = (String)d2wContext.valueForKey("customComponentName");
info.setObjectForKey(customComponentName != null ? customComponentName : "null", "D2W-ComponentName");
}
}
return info;
}