info.magnolia.cms.gui.dialog
Class DialogFactory

java.lang.Object
  extended by info.magnolia.cms.gui.dialog.DialogFactory

public final class DialogFactory
extends Object

Factory for dialogs. This class handles the registration of native dialogs mantaing a map of (control name | dialog class).

Version:
$Revision: 41135 $ ($Author: gjoseph $)
Author:
Fabrizio Giustina

Method Summary
static DialogButton getDialogButtonInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogButtonSet getDialogButtonSetInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogControl getDialogControlInstanceByName(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode, String controlType)
          Get a instance by the control type name.
static DialogEdit getDialogEditInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogHidden getDialogHiddenInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogInclude getDialogIncludeInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static Dialog getDialogInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogPassword getDialogPasswordInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogSelect getDialogSelectInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogStatic getDialogStaticInstance(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
           
static DialogControl loadDialog(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content storageNode, info.magnolia.cms.core.Content configNode)
          Load and initialize a dialog.
static void registerDialog(String name, Class<DialogControl> dialogClass)
          Register a new dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerDialog

public static void registerDialog(String name,
                                  Class<DialogControl> dialogClass)
Register a new dialog.

Parameters:
name - dialog name (e.g. "richEdit")
dialogClass - implementing class. Must implements info.magnolia.cms.gui.dialog.DialogControl
See Also:
DialogControl

loadDialog

public static DialogControl loadDialog(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response,
                                       info.magnolia.cms.core.Content storageNode,
                                       info.magnolia.cms.core.Content configNode)
                                throws javax.jcr.RepositoryException
Load and initialize a dialog.

Parameters:
storageNode - current website node
configNode - configuration node for the dialog. The type of the dialog is read from the "controlType" nodeData
Throws:
javax.jcr.RepositoryException - for errors during initialization of dialog with repository data

getDialogInstance

public static Dialog getDialogInstance(javax.servlet.http.HttpServletRequest request,
                                       javax.servlet.http.HttpServletResponse response,
                                       info.magnolia.cms.core.Content storageNode,
                                       info.magnolia.cms.core.Content configNode)
                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogStaticInstance

public static DialogStatic getDialogStaticInstance(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   info.magnolia.cms.core.Content storageNode,
                                                   info.magnolia.cms.core.Content configNode)
                                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogHiddenInstance

public static DialogHidden getDialogHiddenInstance(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   info.magnolia.cms.core.Content storageNode,
                                                   info.magnolia.cms.core.Content configNode)
                                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogEditInstance

public static DialogEdit getDialogEditInstance(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response,
                                               info.magnolia.cms.core.Content storageNode,
                                               info.magnolia.cms.core.Content configNode)
                                        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogButtonInstance

public static DialogButton getDialogButtonInstance(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   info.magnolia.cms.core.Content storageNode,
                                                   info.magnolia.cms.core.Content configNode)
                                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogPasswordInstance

public static DialogPassword getDialogPasswordInstance(javax.servlet.http.HttpServletRequest request,
                                                       javax.servlet.http.HttpServletResponse response,
                                                       info.magnolia.cms.core.Content storageNode,
                                                       info.magnolia.cms.core.Content configNode)
                                                throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogButtonSetInstance

public static DialogButtonSet getDialogButtonSetInstance(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response,
                                                         info.magnolia.cms.core.Content storageNode,
                                                         info.magnolia.cms.core.Content configNode)
                                                  throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogIncludeInstance

public static DialogInclude getDialogIncludeInstance(javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response,
                                                     info.magnolia.cms.core.Content storageNode,
                                                     info.magnolia.cms.core.Content configNode)
                                              throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogSelectInstance

public static DialogSelect getDialogSelectInstance(javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   info.magnolia.cms.core.Content storageNode,
                                                   info.magnolia.cms.core.Content configNode)
                                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getDialogControlInstanceByName

public static DialogControl getDialogControlInstanceByName(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response,
                                                           info.magnolia.cms.core.Content storageNode,
                                                           info.magnolia.cms.core.Content configNode,
                                                           String controlType)
                                                    throws javax.jcr.RepositoryException
Get a instance by the control type name. Those name class mappings are configured in the admin interface configuration.

Parameters:
request -
response -
storageNode - the node holding the data (can be null)
configNode - the node holding the configuration (can be null)
controlType - the name of the control
Returns:
the conrol
Throws:
javax.jcr.RepositoryException


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.