public class ERDirectToWeb extends ERXFrameworkPrincipal
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.Modifier and Type | Class and Description |
---|---|
static class |
ERDirectToWeb.D2WException
Subclass of NSForwardException that can hold a d2wContext.
|
ERXFrameworkPrincipal.Observer
Modifier and Type | Field and Description |
---|---|
static Logger |
componentNameLog |
static com.webobjects.foundation.NSSelector |
D2WCONTEXT_SELECTOR |
static String |
D2WDEBUGGING_ENABLED_KEY |
static String |
D2WDISPLAY_COMPONENTNAMES_KEY |
static String |
D2WDISPLAY_DETAILED_PAGE_METRICS_KEY |
static String |
D2WDISPLAY_PAGE_METRICS_KEY |
static String |
D2WDISPLAY_PROPERTYKEYS_KEY |
static Logger |
debugLog |
static Logger |
log
logging support
|
static Logger |
propertyKeyLog |
static Class[] |
REQUIRES |
static Logger |
trace |
initializedFrameworks, launchingFrameworks
Constructor and Description |
---|
ERDirectToWeb() |
Modifier and Type | Method and Description |
---|---|
static boolean |
booleanForKey(com.webobjects.directtoweb.D2WContext context,
String key) |
static void |
configureTraceRuleFiring() |
void |
configureTraceRuleFiring(com.webobjects.foundation.NSNotification n) |
static NSMutableArray |
convertedPropertyKeyArray(NSArray keyArray,
char startChar,
char endChar)
Converts a given array of keys to a format usable for section and tab display.
|
static String |
convertedPropertyKeyFromString(String s,
char start,
char end)
Checks if a given property key is in the format (foo) or [foo] and returns the stripped string.
|
static String |
createConfigurationForEntityNamed(String entityName) |
static boolean |
d2wComponentNameDebuggingEnabled(com.webobjects.appserver.WOSession s) |
static Object |
d2wContextValueForKey(String key,
String entityName) |
static Object |
d2wContextValueForKey(String key,
String entityName,
NSDictionary extraValuesForContext) |
static boolean |
d2wDebuggingEnabled(com.webobjects.appserver.WOSession s) |
static boolean |
d2wPropertyKeyDebuggingEnabled(com.webobjects.appserver.WOSession s) |
static boolean |
detailedPageMetricsEnabled() |
static NSArray |
displayableArrayForKeyPathArray(NSArray array,
String entityForReportName) |
static String |
displayNameForPropertyKey(String key,
String entityName) |
void |
finishInitialization()
Overridden by subclasses to provide framework initialization.
|
static NSMutableDictionary |
informationForContext(com.webobjects.appserver.WOContext context)
Gathers D2W-related information from the current context.
|
static NSMutableDictionary |
informationForD2WContext(com.webobjects.directtoweb.D2WContext d2wContext)
Gathers D2W-related information from the current context.
|
static boolean |
pageMetricsEnabled() |
static void |
reportException(Exception ex,
com.webobjects.directtoweb.D2WContext d2wContext)
Logs some debugging info and and throws a D2WException that wraps the original exception.
|
void |
resetModel(com.webobjects.foundation.NSNotification n) |
static String |
resolveUnit(String userInfoUnitString,
com.webobjects.eocontrol.EOEnterpriseObject object,
String prefixKeyPath) |
static void |
setD2wComponentNameDebuggingEnabled(com.webobjects.appserver.WOSession s,
boolean enabled) |
static void |
setD2wDebuggingEnabled(com.webobjects.appserver.WOSession s,
boolean enabled) |
static void |
setD2wPropertyKeyDebuggingEnabled(com.webobjects.appserver.WOSession s,
boolean enabled) |
static void |
setDetailedPageMetricsEnabled(boolean value) |
static void |
setPageMetricsEnabled(boolean value) |
static boolean |
shouldRaiseException(boolean defaultValue)
Checks the system property
er.directtoweb.ERDirectToWeb.shouldRaiseExceptions . |
static NSArray<com.webobjects.eocontrol.EOSortOrdering> |
sortOrderings(com.webobjects.directtoweb.D2WContext d2wContext)
Returns a valid sort ordering based on the
defaultSortOrdering key. |
void |
sortRules(com.webobjects.foundation.NSNotification n) |
static void |
warmUpRuleCache() |
didFinishInitialization, hasFrameworkInstalled, initialize, setUpFrameworkPrincipalClass, sharedInstance, toString
public static final Class[] REQUIRES
public static final Logger log
public static final String D2WDEBUGGING_ENABLED_KEY
public static final String D2WDISPLAY_COMPONENTNAMES_KEY
public static final String D2WDISPLAY_PROPERTYKEYS_KEY
public static final String D2WDISPLAY_PAGE_METRICS_KEY
public static final String D2WDISPLAY_DETAILED_PAGE_METRICS_KEY
public static final Logger debugLog
public static final Logger componentNameLog
public static final Logger propertyKeyLog
public static final com.webobjects.foundation.NSSelector D2WCONTEXT_SELECTOR
public static Logger trace
public void finishInitialization()
ERXFrameworkPrincipal
finishInitialization
in class ERXFrameworkPrincipal
public void resetModel(com.webobjects.foundation.NSNotification n)
public void sortRules(com.webobjects.foundation.NSNotification n)
public static void setD2wDebuggingEnabled(com.webobjects.appserver.WOSession s, boolean enabled)
public static boolean d2wDebuggingEnabled(com.webobjects.appserver.WOSession s)
public static void setD2wComponentNameDebuggingEnabled(com.webobjects.appserver.WOSession s, boolean enabled)
public static boolean d2wComponentNameDebuggingEnabled(com.webobjects.appserver.WOSession s)
public static void setD2wPropertyKeyDebuggingEnabled(com.webobjects.appserver.WOSession s, boolean enabled)
public static boolean d2wPropertyKeyDebuggingEnabled(com.webobjects.appserver.WOSession s)
public static boolean pageMetricsEnabled()
public static void setPageMetricsEnabled(boolean value)
public static boolean detailedPageMetricsEnabled()
public static void setDetailedPageMetricsEnabled(boolean value)
public static String resolveUnit(String userInfoUnitString, com.webobjects.eocontrol.EOEnterpriseObject object, String prefixKeyPath)
public static String convertedPropertyKeyFromString(String s, char start, char end)
s
- the String to convertstart
- the start charend
- the end char to check forstart
and ends with end
.public static NSMutableArray convertedPropertyKeyArray(NSArray keyArray, char startChar, char endChar)
keyArray
- the NSArray to convertstartChar
- the start charendChar
- the end char to check forpublic static NSArray<com.webobjects.eocontrol.EOSortOrdering> sortOrderings(com.webobjects.directtoweb.D2WContext d2wContext)
defaultSortOrdering
key.d2wContext
- public static boolean booleanForKey(com.webobjects.directtoweb.D2WContext context, String key)
public static void reportException(Exception ex, com.webobjects.directtoweb.D2WContext d2wContext)
ex
- d2wContext
- public static NSMutableDictionary informationForContext(com.webobjects.appserver.WOContext context)
context
- the current contextpublic static NSMutableDictionary informationForD2WContext(com.webobjects.directtoweb.D2WContext d2wContext)
d2wContext
- the D2W context from which to derive the debugging informationpublic static boolean shouldRaiseException(boolean defaultValue)
er.directtoweb.ERDirectToWeb.shouldRaiseExceptions
.defaultValue
- public static String displayNameForPropertyKey(String key, String entityName)
public static Object d2wContextValueForKey(String key, String entityName, NSDictionary extraValuesForContext)
public static String createConfigurationForEntityNamed(String entityName)
public static void warmUpRuleCache()
public void configureTraceRuleFiring(com.webobjects.foundation.NSNotification n)
public static void configureTraceRuleFiring()
Copyright © 2002 – 2020 Project Wonder.