Class GadgetHandlers
java.lang.Object
org.glassfish.admingui.common.gadget.GadgetHandlers
This class provides access to GadgetModules. It also has a
nice JSON utility for converting JavaBean Objects (and primitives,
Collections, Maps, Strings, etc.) to JSON.
- Author:
- Ken Paulsen (ken.paulsen@sun.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgetGadgetModule(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns aGadgetModulefor the named gadget.static org.glassfish.admingui.connector.GadgetModulegetGadgetModule(URL url) This method returns aGadgetModulefor the given URL.static ObjectinvokeHandler(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will invoke another handler.static ObjectparseString(String test)
-
Constructor Details
-
GadgetHandlers
public GadgetHandlers()Default constructor.
-
-
Method Details
-
getGadgetModule
public static void getGadgetModule(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns a
GadgetModulefor the named gadget. Thenameshould either be a complete URL, or a context-root relative path to the gadget XML file (this also includes .xml files stored in .jar's / plugins). -
getGadgetModule
This method returns a
GadgetModulefor the given URL. -
invokeHandler
public static Object invokeHandler(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will invoke another handler. This allows a generic handler to invoke another one and return the response(s), if any.
The following are the inputs are supported:
- handler - (required) This input specifies the handler which should be invoked.
- args - (required) This specifies all of the arguments to be passed to the handler (both input and output arguments). The value of this should be a String formatted as a comma separated list of name-value pairs (which are themselves separated by colons (:). The value of the name-value pairs should be URL encoded (so that commas are escaped).
- depth - (optional) This property specifies the max depth of nesting for any output values from the handler. Output values are encoded in JSON. This prevents infinite looping in the case where an Object refers to itself (or in the case wehre there is unnecessarily deep data structures).
-
parseString
-