Project Wonder 5.0.0.8660

er.directtoweb
Class ERDirectToWeb

java.lang.Object
  extended by er.extensions.ERXFrameworkPrincipal
      extended by er.directtoweb.ERDirectToWeb

public class ERDirectToWeb
extends ERXFrameworkPrincipal

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.


Nested Class Summary
static class ERDirectToWeb.D2WException
          Subclass of NSForwardException that can hold a d2wContext.
 
Nested classes/interfaces inherited from class er.extensions.ERXFrameworkPrincipal
ERXFrameworkPrincipal.Observer
 
Field Summary
static Logger componentNameLog
           
static NSSelector D2WCONTEXT_SELECTOR
           
static String D2WDEBUGGING_ENABLED_KEY
           
static String D2WDISPLAY_COMPONENTNAMES_KEY
           
static String D2WDISPLAY_PROPERTYKEYS_KEY
           
static Logger debugLog
           
static Logger log
          logging support
static Logger propertyKeyLog
           
static Class[] REQUIRES
           
static Logger trace
           
 
Constructor Summary
ERDirectToWeb()
           
 
Method Summary
static boolean booleanForKey(D2WContext context, String key)
           
static void configureTraceRuleFiring()
           
 void configureTraceRuleFiring(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 WOComponent csvExportPageForD2WContext(D2WContext context, WOSession session)
          Deprecated. use ERD2WFactory.erFactory().csvExportPageForD2WContext(D2WContext context, WOSession session)
static boolean d2wComponentNameDebuggingEnabled(WOSession s)
           
static Object d2wContextValueForKey(String key, String entityName)
           
static Object d2wContextValueForKey(String key, String entityName, NSDictionary extraValuesForContext)
           
static boolean d2wDebuggingEnabled(WOSession s)
           
static boolean d2wPropertyKeyDebuggingEnabled(WOSession s)
           
static NSArray displayableArrayForKeyPathArray(NSArray array, String entityForReportName)
           
static String displayNameForPropertyKey(String key, String entityName)
           
static WOComponent errorPageForException(Throwable e, WOSession session)
          Deprecated. use ERD2WFactory.erFactory().errorPageForException(Throwable e, WOSession session)
 void finishInitialization()
          Overridden by subclasses to provide framework initialization.
static WOComponent pageForTaskSubTaskAndEntityNamed(String task, String subtask, String entityName, WOSession session)
          Deprecated. use ERD2WFactory.erFactory().pageForTaskSubTaskAndEntityNamed(String task, String subtask, String entityName, WOSession session)
static WOComponent printerFriendlyPageForD2WContext(D2WContext context, WOSession session)
          Deprecated. use ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(D2WContext context, WOSession session)
static QueryPageInterface queryPageWithFetchSpecificationForEntityNamed(String fsName, String entityName, WOSession session)
          Deprecated. use ERD2WFactory.erFactory().queryPageWithFetchSpecificationForEntityNamed(String fsName, String entityName, WOSession session)
static void reportException(Exception ex, D2WContext d2wContext)
          Logs some debugging info and and throws a D2WException that wraps the original exception.
 void resetModel(NSNotification n)
           
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 boolean shouldRaiseException(boolean defaultValue)
          Checks the system property er.directtoweb.ERDirectToWeb.shouldRaiseExceptions.
 void sortRules(NSNotification n)
           
static String userInfoUnit(EOEnterpriseObject object, String key)
           
static void warmUpRuleCache()
           
 
Methods inherited from class er.extensions.ERXFrameworkPrincipal
initialize, setUpFrameworkPrincipalClass, sharedInstance, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REQUIRES

public static final Class[] REQUIRES

log

public static final Logger log
logging support


D2WDEBUGGING_ENABLED_KEY

public static final String D2WDEBUGGING_ENABLED_KEY
See Also:
Constant Field Values

D2WDISPLAY_COMPONENTNAMES_KEY

public static final String D2WDISPLAY_COMPONENTNAMES_KEY
See Also:
Constant Field Values

D2WDISPLAY_PROPERTYKEYS_KEY

public static final String D2WDISPLAY_PROPERTYKEYS_KEY
See Also:
Constant Field Values

debugLog

public static final Logger debugLog

componentNameLog

public static final Logger componentNameLog

propertyKeyLog

public static final Logger propertyKeyLog

D2WCONTEXT_SELECTOR

public static final NSSelector D2WCONTEXT_SELECTOR

trace

public static Logger trace
Constructor Detail

ERDirectToWeb

public ERDirectToWeb()
Method Detail

finishInitialization

public void finishInitialization()
Description copied from class: ERXFrameworkPrincipal
Overridden by subclasses to provide framework initialization.

Specified by:
finishInitialization in class ERXFrameworkPrincipal

resetModel

public void resetModel(NSNotification n)

sortRules

public void sortRules(NSNotification n)

setD2wDebuggingEnabled

public static void setD2wDebuggingEnabled(WOSession s,
                                          boolean enabled)

d2wDebuggingEnabled

public static boolean d2wDebuggingEnabled(WOSession s)

setD2wComponentNameDebuggingEnabled

public static void setD2wComponentNameDebuggingEnabled(WOSession s,
                                                       boolean enabled)

d2wComponentNameDebuggingEnabled

public static boolean d2wComponentNameDebuggingEnabled(WOSession s)

setD2wPropertyKeyDebuggingEnabled

public static void setD2wPropertyKeyDebuggingEnabled(WOSession s,
                                                     boolean enabled)

d2wPropertyKeyDebuggingEnabled

public static boolean d2wPropertyKeyDebuggingEnabled(WOSession s)

resolveUnit

public static String resolveUnit(String userInfoUnitString,
                                 EOEnterpriseObject object,
                                 String prefixKeyPath)

convertedPropertyKeyFromString

public 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.

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

convertedPropertyKeyArray

public static NSMutableArray convertedPropertyKeyArray(NSArray keyArray,
                                                       char startChar,
                                                       char endChar)
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.

booleanForKey

public static boolean booleanForKey(D2WContext context,
                                    String key)

userInfoUnit

public static String userInfoUnit(EOEnterpriseObject object,
                                  String key)

printerFriendlyPageForD2WContext

public static WOComponent printerFriendlyPageForD2WContext(D2WContext context,
                                                           WOSession session)
Deprecated. use ERD2WFactory.erFactory().printerFriendlyPageForD2WContext(D2WContext context, WOSession session)


csvExportPageForD2WContext

public static WOComponent csvExportPageForD2WContext(D2WContext context,
                                                     WOSession session)
Deprecated. use ERD2WFactory.erFactory().csvExportPageForD2WContext(D2WContext context, WOSession session)


pageForTaskSubTaskAndEntityNamed

public static WOComponent pageForTaskSubTaskAndEntityNamed(String task,
                                                           String subtask,
                                                           String entityName,
                                                           WOSession session)
Deprecated. use ERD2WFactory.erFactory().pageForTaskSubTaskAndEntityNamed(String task, String subtask, String entityName, WOSession session)


queryPageWithFetchSpecificationForEntityNamed

public static QueryPageInterface queryPageWithFetchSpecificationForEntityNamed(String fsName,
                                                                               String entityName,
                                                                               WOSession session)
Deprecated. use ERD2WFactory.erFactory().queryPageWithFetchSpecificationForEntityNamed(String fsName, String entityName, WOSession session)


errorPageForException

public static WOComponent errorPageForException(Throwable e,
                                                WOSession session)
Deprecated. use ERD2WFactory.erFactory().errorPageForException(Throwable e, WOSession session)


reportException

public static void reportException(Exception ex,
                                   D2WContext d2wContext)
Logs some debugging info and and throws a D2WException that wraps the original exception. This is usefull 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 -

shouldRaiseException

public static boolean shouldRaiseException(boolean defaultValue)
Checks the system property er.directtoweb.ERDirectToWeb.shouldRaiseExceptions.

Parameters:
defaultValue -

displayNameForPropertyKey

public static String displayNameForPropertyKey(String key,
                                               String entityName)

d2wContextValueForKey

public static Object d2wContextValueForKey(String key,
                                           String entityName)

d2wContextValueForKey

public static Object d2wContextValueForKey(String key,
                                           String entityName,
                                           NSDictionary extraValuesForContext)

createConfigurationForEntityNamed

public static String createConfigurationForEntityNamed(String entityName)

warmUpRuleCache

public static void warmUpRuleCache()

configureTraceRuleFiring

public void configureTraceRuleFiring(NSNotification n)

configureTraceRuleFiring

public static void configureTraceRuleFiring()

displayableArrayForKeyPathArray

public static NSArray displayableArrayForKeyPathArray(NSArray array,
                                                      String entityForReportName)

Last updated: Sat, Nov 22, 2008 • 04:41 AM EST

Copyright © 2002 – 2007 Project Wonder.