ERDirectToWeb Class Reference

Inherits er::extensions::ERXFrameworkPrincipal.

Collaboration diagram for ERDirectToWeb:

Collaboration graph
[legend]

List of all members.

Classes

class  D2WException

Public Member Functions

void configureTraceRuleFiring (NSNotification n)
void finishInitialization ()
void resetModel (NSNotification n)
void sortRules (NSNotification n)

Static Public Member Functions

static boolean booleanForKey (D2WContext context, String key)
static void configureTraceRuleFiring ()
static NSMutableArray convertedPropertyKeyArray (NSArray keyArray, char startChar, char endChar)
static String convertedPropertyKeyFromString (String s, char start, char end)
static String createConfigurationForEntityNamed (String entityName)
static WOComponent csvExportPageForD2WContext (D2WContext context, WOSession session)
static boolean d2wComponentNameDebuggingEnabled (WOSession s)
static synchronized Object d2wContextValueForKey (String key, String entityName, NSDictionary extraValuesForContext)
static Object d2wContextValueForKey (String key, String entityName)
static boolean d2wDebuggingEnabled (WOSession s)
static boolean d2wPropertyKeyDebuggingEnabled (WOSession s)
static boolean detailedPageMetricsEnabled ()
static NSArray displayableArrayForKeyPathArray (NSArray array, String entityForReportName)
static synchronized String displayNameForPropertyKey (String key, String entityName)
static WOComponent errorPageForException (Throwable e, WOSession session)
static synchronized
NSMutableDictionary 
informationForContext (WOContext context)
static synchronized
NSMutableDictionary 
informationForD2WContext (D2WContext d2wContext)
static WOComponent pageForTaskSubTaskAndEntityNamed (String task, String subtask, String entityName, WOSession session)
static boolean pageMetricsEnabled ()
static WOComponent printerFriendlyPageForD2WContext (D2WContext context, WOSession session)
static QueryPageInterface queryPageWithFetchSpecificationForEntityNamed (String fsName, String entityName, WOSession session)
static synchronized void reportException (Exception ex, D2WContext d2wContext)
static String resolveUnit (String userInfoUnitString, EOEnterpriseObject object, String prefixKeyPath)
static void setD2wComponentNameDebuggingEnabled (WOSession s, boolean enabled)
static void setD2wDebuggingEnabled (WOSession s, boolean enabled)
static void setD2wPropertyKeyDebuggingEnabled (WOSession s, boolean enabled)
static void setDetailedPageMetricsEnabled (boolean value)
static void setPageMetricsEnabled (boolean value)
static boolean shouldRaiseException (boolean defaultValue)
static NSArray< EOSortOrdering > sortOrderings (D2WContext d2wContext)
static String userInfoUnit (EOEnterpriseObject object, String key)
static void warmUpRuleCache ()

Static Public Attributes

static final Logger componentNameLog = Logger.getLogger("er.directtoweb.ERD2WDebugEnabled.componentName")
static final NSSelector D2WCONTEXT_SELECTOR = new NSSelector("d2wContext")
static final String D2WDEBUGGING_ENABLED_KEY = "ERDirectToWeb_d2wDebuggingEnabled"
static final String D2WDISPLAY_COMPONENTNAMES_KEY = "ERDirectToWeb_displayComponentNames"
static final String D2WDISPLAY_DETAILED_PAGE_METRICS_KEY = "ERDirectToWeb_displayDetailedPageMetrics"
static final String D2WDISPLAY_PAGE_METRICS_KEY = "ERDirectToWeb_displayPageMetrics"
static final String D2WDISPLAY_PROPERTYKEYS_KEY = "ERDirectToWeb_displayPropertyKeys"
static final Logger debugLog = Logger.getLogger("er.directtoweb.ERD2WDebugEnabled")
static final Logger log = Logger.getLogger("er.directtoweb.ERDirectToWeb")
static final Logger propertyKeyLog = Logger.getLogger("er.directtoweb.ERD2WDebugEnabled.propertyKey")
static final Class REQUIRES [] = new Class[] {ERXExtensions.class}
static Logger trace

Static Package Functions

 [static initializer]

Private Member Functions

void configureTraceRuleFiringRapidTurnAround ()
void fixClasses ()
void fixClasses (String oldName, String newName)

Static Private Member Functions

static D2WContext d2wContext ()

Static Private Attributes

static D2WContext _context


Detailed Description

Principle class of the ERDirectToWeb framework. This class is loaded when the NSBundle of this framework is loaded. When loaded this class configures the directtoweb runtime to use the ERD2WModel and ERD2WFactory subclasses instead of the default implementations. See each class for a description of the additions/improvements made to the base implementation. This class also has a bunch of utility methods that are used throughout this framework.

Member Function Documentation

[static initializer] (  )  [static, package]

static boolean booleanForKey ( D2WContext  context,
String  key 
) [static]

static void configureTraceRuleFiring (  )  [static]

void configureTraceRuleFiring ( NSNotification  n  ) 

void configureTraceRuleFiringRapidTurnAround (  )  [private]

static NSMutableArray convertedPropertyKeyArray ( NSArray  keyArray,
char  startChar,
char  endChar 
) [static]

Converts a given array of keys to a format usable for section and tab display. For example ("(foo)", bar, baz) is transformed to a list of ERD2WContainers usable for section display. The format ((foo, bar, baz)) is also understood.

Parameters:
keyArray the NSArray to convert
startChar the start char
endChar the end char to check for
Returns:
nested NSMutableArray.

static String convertedPropertyKeyFromString ( String  s,
char  start,
char  end 
) [static]

Checks if a given property key is in the format (foo) or [foo] and returns the stripped string.

Parameters:
s the String to convert
start the start char
end the end char to check for
Returns:
stripped String or null if the string does not start with start and ends with end.

static String createConfigurationForEntityNamed ( String  entityName  )  [static]

static WOComponent csvExportPageForD2WContext ( D2WContext  context,
WOSession  session 
) [static]

static boolean d2wComponentNameDebuggingEnabled ( WOSession  s  )  [static]

static D2WContext d2wContext (  )  [static, private]

static synchronized Object d2wContextValueForKey ( String  key,
String  entityName,
NSDictionary  extraValuesForContext 
) [static]

static Object d2wContextValueForKey ( String  key,
String  entityName 
) [static]

static boolean d2wDebuggingEnabled ( WOSession  s  )  [static]

static boolean d2wPropertyKeyDebuggingEnabled ( WOSession  s  )  [static]

static boolean detailedPageMetricsEnabled (  )  [static]

static NSArray displayableArrayForKeyPathArray ( NSArray  array,
String  entityForReportName 
) [static]

static synchronized String displayNameForPropertyKey ( String  key,
String  entityName 
) [static]

static WOComponent errorPageForException ( Throwable  e,
WOSession  session 
) [static]

void finishInitialization (  )  [virtual]

Overridden by subclasses to provide framework initialization.

Implements ERXFrameworkPrincipal.

void fixClasses (  )  [private]

void fixClasses ( String  oldName,
String  newName 
) [private]

static synchronized NSMutableDictionary informationForContext ( WOContext  context  )  [static]

Gathers D2W-related information from the current context. This is mainly useful for debugging.

Parameters:
context the current context
Returns:
a dictionary of D2W-related keys to describe the D2W state of the context.

static synchronized NSMutableDictionary informationForD2WContext ( D2WContext  d2wContext  )  [static]

Gathers D2W-related information from the current context. This is mainly useful for debugging.

Parameters:
d2wContext the D2W context from which to derive the debugging information
Returns:
a dictionary of D2W-related keys to describe the state of the provided D2W context.

static WOComponent pageForTaskSubTaskAndEntityNamed ( String  task,
String  subtask,
String  entityName,
WOSession  session 
) [static]

static boolean pageMetricsEnabled (  )  [static]

static WOComponent printerFriendlyPageForD2WContext ( D2WContext  context,
WOSession  session 
) [static]

static QueryPageInterface queryPageWithFetchSpecificationForEntityNamed ( String  fsName,
String  entityName,
WOSession  session 
) [static]

static synchronized void reportException ( Exception  ex,
D2WContext  d2wContext 
) [static]

Logs some debugging info and and throws a D2WException that wraps the original exception. This is useful when your app fails very deep inside of a repetition of switch components and you need to find out just what the state of the D2WContext is.

Parameters:
ex 
d2wContext componentName customComponentName

void resetModel ( NSNotification  n  ) 

static String resolveUnit ( String  userInfoUnitString,
EOEnterpriseObject  object,
String  prefixKeyPath 
) [static]

static void setD2wComponentNameDebuggingEnabled ( WOSession  s,
boolean  enabled 
) [static]

static void setD2wDebuggingEnabled ( WOSession  s,
boolean  enabled 
) [static]

static void setD2wPropertyKeyDebuggingEnabled ( WOSession  s,
boolean  enabled 
) [static]

static void setDetailedPageMetricsEnabled ( boolean  value  )  [static]

static void setPageMetricsEnabled ( boolean  value  )  [static]

static boolean shouldRaiseException ( boolean  defaultValue  )  [static]

Checks the system property er.directtoweb.ERDirectToWeb.shouldRaiseExceptions.

Parameters:
defaultValue 

static NSArray<EOSortOrdering> sortOrderings ( D2WContext  d2wContext  )  [static]

Returns a valid sort ordering based on the defaultSortOrdering key.

Parameters:
d2wContext 
Returns:

void sortRules ( NSNotification  n  ) 

static String userInfoUnit ( EOEnterpriseObject  object,
String  key 
) [static]

static void warmUpRuleCache (  )  [static]


Member Data Documentation

D2WContext _context [static, private]

final Logger componentNameLog = Logger.getLogger("er.directtoweb.ERD2WDebugEnabled.componentName") [static]

final NSSelector D2WCONTEXT_SELECTOR = new NSSelector("d2wContext") [static]

final String D2WDEBUGGING_ENABLED_KEY = "ERDirectToWeb_d2wDebuggingEnabled" [static]

final String D2WDISPLAY_COMPONENTNAMES_KEY = "ERDirectToWeb_displayComponentNames" [static]

final String D2WDISPLAY_DETAILED_PAGE_METRICS_KEY = "ERDirectToWeb_displayDetailedPageMetrics" [static]

final String D2WDISPLAY_PAGE_METRICS_KEY = "ERDirectToWeb_displayPageMetrics" [static]

final String D2WDISPLAY_PROPERTYKEYS_KEY = "ERDirectToWeb_displayPropertyKeys" [static]

final Logger debugLog = Logger.getLogger("er.directtoweb.ERD2WDebugEnabled") [static]

final Logger log = Logger.getLogger("er.directtoweb.ERDirectToWeb") [static]

logging support

Reimplemented from ERXFrameworkPrincipal.

final Logger propertyKeyLog = Logger.getLogger("er.directtoweb.ERD2WDebugEnabled.propertyKey") [static]

final Class REQUIRES[] = new Class[] {ERXExtensions.class} [static]

Logger trace [static]


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