2.17.2: 2011-06-17

net.sf.basedb.clients.web.extensions.edit
Class EditUtil

java.lang.Object
  extended by net.sf.basedb.clients.web.extensions.edit.EditUtil

public class EditUtil
extends Object

Utility class for handling edit-dialog related extensions. This class handler both the tab-control extension points in the edit-dialog and the on-save extension points when saving the changes.

Since:
2.17
Author:
Nicklas
Last modified
$Date: 2010-12-06 13:09:29 +0100 (Mon, 06 Dec 2010) $

Field Summary
static Item[] EDIT_ITEMS
          An array containing all items that we are registering extension points for.
static String EP_PREFIX_EDIT
          ID prefix for tabcontrol extension points on edit pages.
static String EP_PREFIX_SAVE
          ID prefix for tabcontrol extension points on edit pages.
 
Constructor Summary
EditUtil()
           
 
Method Summary
private static void registerEditTab(Registry registry, String id, String name)
           
static void registerExtensionPoints(Registry registry)
          Registers tabcontrol and on-save extension points with the given registry.
private static void registerOnSave(Registry registry, String id, String name, RethrowErrorHandlerFactory ehf)
           
static ExtensionsInvoker useEditExtensions(JspContext jspContext)
          Use edit-dialog extensions for a given gui context.
private static ExtensionsInvoker useExtensions(String prefix, JspContext jspContext)
           
static ExtensionsInvoker useOnSaveExtensions(JspContext jspContext)
          Use on-save extensions for a given gui context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EDIT_ITEMS

public static final Item[] EDIT_ITEMS
An array containing all items that we are registering extension points for. The extension point id for an item is constructed as: EP_PREFIX_EDIT/EP_PREFIX_SAVE + Item.name().toLowerCase()


EP_PREFIX_EDIT

public static String EP_PREFIX_EDIT
ID prefix for tabcontrol extension points on edit pages.


EP_PREFIX_SAVE

public static String EP_PREFIX_SAVE
ID prefix for tabcontrol extension points on edit pages.

Constructor Detail

EditUtil

public EditUtil()
Method Detail

useOnSaveExtensions

public static ExtensionsInvoker useOnSaveExtensions(JspContext jspContext)
Use on-save extensions for a given gui context. This method will assemble all specific and generic extension points and then call ExtensionsControl.useExtensions(JspContext, String...).

Parameters:
jspContext - The current jsp context
Returns:
An invoker instance

useEditExtensions

public static ExtensionsInvoker useEditExtensions(JspContext jspContext)
Use edit-dialog extensions for a given gui context. This method will assemble all specific and generic extension points and then call ExtensionsControl.useExtensions(JspContext, String...).

Parameters:
jspContext - The current jsp context
Returns:
An invoker instance

useExtensions

private static ExtensionsInvoker useExtensions(String prefix,
                                               JspContext jspContext)

registerExtensionPoints

public static void registerExtensionPoints(Registry registry)
Registers tabcontrol and on-save extension points with the given registry. Called at application startup.


registerEditTab

private static void registerEditTab(Registry registry,
                                    String id,
                                    String name)

registerOnSave

private static void registerOnSave(Registry registry,
                                   String id,
                                   String name,
                                   RethrowErrorHandlerFactory ehf)

2.17.2: 2011-06-17