WOHelperFunctionRegistry Class Reference

Collaboration diagram for WOHelperFunctionRegistry:

Collaboration graph
[legend]

List of all members.

Public Member Functions

synchronized Object _helperInstanceForFrameworkNamed (Object targetObject, String helperFunction, String keyPath, String frameworkName) throws SecurityException, IllegalArgumentException, InstantiationException, IllegalAccessException
synchronized void setHelperInstanceForClassInFrameworkNamed (Object helperInstance, Class targetObjectClass, String frameworkName)

Static Public Member Functions

static synchronized
WOHelperFunctionRegistry 
registry ()

Static Public Attributes

static final String APP_FRAMEWORK_NAME = "app"
static Logger log = Logger.getLogger(WOHelperFunctionRegistry.class)

Protected Member Functions

synchronized Object __cachedHelperInstanceForFrameworkNamed (Object key, String frameworkName)
synchronized Object _cachedHelperInstanceForFrameworkNamed (Class targetClass, String helperFunction, String frameworkName)
synchronized Object _cachedHelperInstanceForFrameworkNamed (Class targetClass, String frameworkName)
boolean classImplementsMethod (Class theClass, String methodName)
Class helperClassForClass (Class helpedClass, String helperFunction)
synchronized void setHelperInstanceForClassInFrameworkNamed (Object helperInstance, String helperFunction, Class targetObjectClass, String frameworkName)

Private Member Functions

 WOHelperFunctionRegistry ()

Private Attributes

Map _applicationHelperInstanceCache

Static Private Attributes

static WOHelperFunctionRegistry _instance


Detailed Description

HelperFunctionRegistry provides a central point for registering and resolving helper functions.

Author:
mschrag

Constructor & Destructor Documentation

WOHelperFunctionRegistry (  )  [private]


Member Function Documentation

synchronized Object __cachedHelperInstanceForFrameworkNamed ( Object  key,
String  frameworkName 
) [protected]

synchronized Object _cachedHelperInstanceForFrameworkNamed ( Class  targetClass,
String  helperFunction,
String  frameworkName 
) [protected]

synchronized Object _cachedHelperInstanceForFrameworkNamed ( Class  targetClass,
String  frameworkName 
) [protected]

synchronized Object _helperInstanceForFrameworkNamed ( Object  targetObject,
String  helperFunction,
String  keyPath,
String  frameworkName 
) throws SecurityException, IllegalArgumentException, InstantiationException, IllegalAccessException

boolean classImplementsMethod ( Class  theClass,
String  methodName 
) [protected]

Class helperClassForClass ( Class  helpedClass,
String  helperFunction 
) [protected]

Attempts to locate a helper class for helpedClass that implements helperFunction. If it cannot find a class called <className>Helper implementing helperFunction, it looks for a helper for each of the interfaces implemented by the class, and starts the process over with the superclass if that fails.

Parameters:
helpedClass 
helperFunction 
Returns:

static synchronized WOHelperFunctionRegistry registry (  )  [static]

synchronized void setHelperInstanceForClassInFrameworkNamed ( Object  helperInstance,
String  helperFunction,
Class  targetObjectClass,
String  frameworkName 
) [protected]

Sets the helper object to use for the given class.

Parameters:
helperInstance an instance of the helper class (i.e. PersonHelper)
helperFunction the helper function being requested (i.e. formattedName)
targetObjectClass the class that maps to this helper instance (i.e. Person.class)
frameworkName the scoping of the helper instance (null, or "app" = global)

synchronized void setHelperInstanceForClassInFrameworkNamed ( Object  helperInstance,
Class  targetObjectClass,
String  frameworkName 
)

Sets the helper object to use for the given class.

Parameters:
helperInstance an instance of the helper class (i.e. PersonHelper)
targetObjectClass the class that maps to this helper instance (i.e. Person.class)
frameworkName the scoping of the helper instance (null, or "app" = global)


Member Data Documentation

final String APP_FRAMEWORK_NAME = "app" [static]

Logger log = Logger.getLogger(WOHelperFunctionRegistry.class) [static]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:38 2012 for Project Wonder by  doxygen 1.5.8