Dashboard Builder UI Panels 6.2.0.CR2

org.jboss.dashboard.ui.panel.navigation.menu
Class MenuDriver

java.lang.Object
  extended by org.jboss.dashboard.ui.panel.PanelDriver
      extended by org.jboss.dashboard.ui.panel.navigation.menu.MenuDriver

public class MenuDriver
extends org.jboss.dashboard.ui.panel.PanelDriver

This is the implementation for the advanced menu panel driver, providing support for all required services.

This class also provides some useful services and shortcuts to make panel developments easier.


Field Summary
static String ATTRIBUTE_SELECTED_LANG
           
static String ATTRIBUTE_SELECTED_PAGE
           
static String ATTRIBUTE_SELECTED_WORKSPACE
           
static String PARAMETER_ALL_ITEMS
           
static String PARAMETER_ID_WORKSPACE
           
static String PARAMETER_LANG
           
static String PARAMETER_PAGE
           
static String PARAMETER_WORKSPACE
           
 
Fields inherited from class org.jboss.dashboard.ui.panel.PanelDriver
PAGE_EDIT, PAGE_HEADER, PAGE_HELP_MODE, PAGE_MANAGE_INVALID_DRIVER, panelSecurity, PARAMETER_ACTION_EXECUTED_ENABLED, parameters
 
Constructor Summary
MenuDriver()
           
 
Method Summary
 org.jboss.dashboard.ui.controller.CommandResponse actionSaveLangs(org.jboss.dashboard.workspace.Panel panel, org.jboss.dashboard.ui.controller.CommandRequest request)
          Defines the action to be taken when save languages selected
 org.jboss.dashboard.ui.controller.CommandResponse actionSavePages(org.jboss.dashboard.workspace.Panel panel, org.jboss.dashboard.ui.controller.CommandRequest request)
          Defines the action to be taken when save pages selected
 org.jboss.dashboard.ui.controller.CommandResponse actionSaveWorkspaces(org.jboss.dashboard.workspace.Panel panel, org.jboss.dashboard.ui.controller.CommandRequest request)
          Defines the action to be taken when save workspaces selected
 String getAfterLink(org.jboss.dashboard.workspace.Panel panel)
          Returns after link value.
 String getBeforeLink(org.jboss.dashboard.workspace.Panel panel)
          Returns before link value.
protected  String getChangeLanguageLink(org.jboss.dashboard.workspace.Section currentPage, String lang)
          Returns a URL for a given language change
protected  String getChangePageLink(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, org.jboss.dashboard.workspace.Section section)
          Returns a URL for a given handler and action, setting the current view, appending a string of parameters.
protected  String getChangeWorkspaceLink(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String workspaceId)
          Returns a URL for a given handler and action, setting the current view, appending a string of parameters.
 String getEndHTML(org.jboss.dashboard.workspace.Panel panel)
          Returns end html value.
protected  String getFixedParamValue(String parameter, org.jboss.dashboard.ui.panel.PanelProvider provider)
          Returns parameter value fixed in panel definition file.
 String getMenuType(org.jboss.dashboard.workspace.Panel panel)
          Returns menu type value.
protected  String getPageEdit(org.jboss.dashboard.workspace.Panel panel)
           
 List<String> getSelectedLangIds(org.jboss.dashboard.workspace.Panel panel)
          Returns language identifiers selected.
protected  Map<String,List<String>> getSelectedMenuItemsIds(org.jboss.dashboard.workspace.Panel panel)
          Returns identifiers selected from pages, workspaces and languages.
 List<String> getSelectedPageIds(org.jboss.dashboard.workspace.Panel panel)
          Returns page identifiers selected.
 List<String> getSelectedWorkspaceIds(org.jboss.dashboard.workspace.Panel panel)
          Returns workspace identifiers selected.
 String getStartHTML(org.jboss.dashboard.workspace.Panel panel)
          Returns start html value.
 void init(org.jboss.dashboard.ui.panel.PanelProvider provider)
          This method is called once for all panels.
 void initPanelSession(org.jboss.dashboard.workspace.PanelSession status, javax.servlet.http.HttpSession session)
          This method is called once for each panel instance.
 boolean supportsEditMode(org.jboss.dashboard.workspace.Panel panel)
          Returns if this driver defines support to activate edit mode.
 
Methods inherited from class org.jboss.dashboard.ui.panel.PanelDriver
_execute, actionChangePage, activateConfigMode, activateEditMode, activateHelpMode, activateNormalMode, addMethodPermission, addParameter, addParameters, addSystemParameter, afterInvokeAction, afterPanelClosed, afterPanelCustomPropertiesModified, afterPanelPlacedInRegion, afterPanelPropertiesModified, afterRenderPanel, beforeInvokeAction, beforePanelClosed, beforePanelInstanceRemove, beforePanelInstanceRemove, beforePanelPlacedInRegion, beforePanelRemoved, beforeRenderPanel, canInvokeAction, checkInvokeAction, checkMethodSecurity, copyDirectory, copyFile, execute, fireAfterInvokeAction, fireAfterPanelClosed, fireAfterPanelPlacedInRegion, fireAfterRenderPanel, fireBeforeInvokeAction, fireBeforePanelInstanceRemove, fireBeforePanelPlacedInRegion, fireBeforePanelRemoved, fireBeforeRenderPanel, firePanelCustomPropertiesModified, firePanelPropertiesModified, getActionsBundle, getAllParameters, getConfigHeight, getConfigWidth, getEditHeight, getEditWidth, getHelpHeight, getHelpWidth, getMethodName, getPageHelpMode, getPanelDir, getPanelDir, getPanelDirMapping, getPanelDirMapping, getPanelHTMLContent, getPanelSession, getPanelSession, getPanelSession, getResourceForPermission, getShowPanelPageComponent, getTextShownByInstance, getURLWhenMaximized, hasMethodAccess, initPanel, initPermissionsParameters, initSystemParameters, isDoubleClickProtected, isSystemAction, move, panelActionClose, panelActionEditMode, panelActionFactory, panelActionHelpMode, panelActionInvalidateCache, panelActionMaximize, panelActionMaximizeInRegion, panelActionMinimize, panelActionMoveBack, panelActionMoveForward, panelActionRefreshPanel, panelActionRemove, panelActionRestore, panelActionSelect, panelActionShowMode, panelActionStartConfig, replicateData, supportsHelpMode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_PAGE

public static final String PARAMETER_PAGE
See Also:
Constant Field Values

PARAMETER_WORKSPACE

public static final String PARAMETER_WORKSPACE
See Also:
Constant Field Values

PARAMETER_ID_WORKSPACE

public static final String PARAMETER_ID_WORKSPACE
See Also:
Constant Field Values

PARAMETER_LANG

public static final String PARAMETER_LANG
See Also:
Constant Field Values

PARAMETER_ALL_ITEMS

public static final String PARAMETER_ALL_ITEMS
See Also:
Constant Field Values

ATTRIBUTE_SELECTED_PAGE

public static final String ATTRIBUTE_SELECTED_PAGE
See Also:
Constant Field Values

ATTRIBUTE_SELECTED_LANG

public static final String ATTRIBUTE_SELECTED_LANG
See Also:
Constant Field Values

ATTRIBUTE_SELECTED_WORKSPACE

public static final String ATTRIBUTE_SELECTED_WORKSPACE
See Also:
Constant Field Values
Constructor Detail

MenuDriver

public MenuDriver()
Method Detail

initPanelSession

public void initPanelSession(org.jboss.dashboard.workspace.PanelSession status,
                             javax.servlet.http.HttpSession session)
This method is called once for each panel instance.

Overrides:
initPanelSession in class org.jboss.dashboard.ui.panel.PanelDriver

init

public void init(org.jboss.dashboard.ui.panel.PanelProvider provider)
          throws Exception
This method is called once for all panels.

Overrides:
init in class org.jboss.dashboard.ui.panel.PanelDriver
Throws:
Exception

supportsEditMode

public boolean supportsEditMode(org.jboss.dashboard.workspace.Panel panel)
Returns if this driver defines support to activate edit mode.

Overrides:
supportsEditMode in class org.jboss.dashboard.ui.panel.PanelDriver
Parameters:
panel -
Returns:
boolean

getPageEdit

protected String getPageEdit(org.jboss.dashboard.workspace.Panel panel)
Overrides:
getPageEdit in class org.jboss.dashboard.ui.panel.PanelDriver

getFixedParamValue

protected String getFixedParamValue(String parameter,
                                    org.jboss.dashboard.ui.panel.PanelProvider provider)
Returns parameter value fixed in panel definition file.

Parameters:
parameter - Parameter name
provider -
Returns:
String

getMenuType

public String getMenuType(org.jboss.dashboard.workspace.Panel panel)
Returns menu type value.

Parameters:
panel -
Returns:
String

getStartHTML

public String getStartHTML(org.jboss.dashboard.workspace.Panel panel)
Returns start html value.

Parameters:
panel -
Returns:
String

getEndHTML

public String getEndHTML(org.jboss.dashboard.workspace.Panel panel)
Returns end html value.

Parameters:
panel -
Returns:
String

getBeforeLink

public String getBeforeLink(org.jboss.dashboard.workspace.Panel panel)
Returns before link value.

Parameters:
panel -
Returns:
String

getAfterLink

public String getAfterLink(org.jboss.dashboard.workspace.Panel panel)
Returns after link value.

Parameters:
panel -
Returns:
String

getChangeLanguageLink

protected String getChangeLanguageLink(org.jboss.dashboard.workspace.Section currentPage,
                                       String lang)
Returns a URL for a given language change

Parameters:
currentPage - Current workspace page.
lang - lang to change to
Returns:
the URL.

getChangeWorkspaceLink

protected String getChangeWorkspaceLink(javax.servlet.http.HttpServletRequest req,
                                        javax.servlet.http.HttpServletResponse res,
                                        String workspaceId)
Returns a URL for a given handler and action, setting the current view, appending a string of parameters.

Parameters:
req - Request.
res - Response.
workspaceId - Workspace identifier.
Returns:
the URL.

getChangePageLink

protected String getChangePageLink(javax.servlet.http.HttpServletRequest req,
                                   javax.servlet.http.HttpServletResponse res,
                                   org.jboss.dashboard.workspace.Section section)
Returns a URL for a given handler and action, setting the current view, appending a string of parameters.

Parameters:
req - Request.
res - Response.
section - Section.
Returns:
the URL.

getSelectedMenuItemsIds

protected Map<String,List<String>> getSelectedMenuItemsIds(org.jboss.dashboard.workspace.Panel panel)
Returns identifiers selected from pages, workspaces and languages.

Parameters:
panel - Panel.
Returns:
selectedMenuItemsIds

getSelectedLangIds

public List<String> getSelectedLangIds(org.jboss.dashboard.workspace.Panel panel)
Returns language identifiers selected.

Parameters:
panel - Panel.
Returns:
selectedLangIds

getSelectedPageIds

public List<String> getSelectedPageIds(org.jboss.dashboard.workspace.Panel panel)
Returns page identifiers selected.

Parameters:
panel - Panel.
Returns:
selectedPageIds

getSelectedWorkspaceIds

public List<String> getSelectedWorkspaceIds(org.jboss.dashboard.workspace.Panel panel)
Returns workspace identifiers selected.

Parameters:
panel - Panel.
Returns:
selectedWorkspaceIds

actionSaveLangs

public org.jboss.dashboard.ui.controller.CommandResponse actionSaveLangs(org.jboss.dashboard.workspace.Panel panel,
                                                                         org.jboss.dashboard.ui.controller.CommandRequest request)
                                                                  throws Exception
Defines the action to be taken when save languages selected

Parameters:
panel - Panel.
request - CommandRequest.
Returns:
CommandResponse
Throws:
Exception

actionSaveWorkspaces

public org.jboss.dashboard.ui.controller.CommandResponse actionSaveWorkspaces(org.jboss.dashboard.workspace.Panel panel,
                                                                              org.jboss.dashboard.ui.controller.CommandRequest request)
                                                                       throws Exception
Defines the action to be taken when save workspaces selected

Parameters:
panel - Panel.
request - CommandRequest.
Returns:
CommandResponse
Throws:
Exception

actionSavePages

public org.jboss.dashboard.ui.controller.CommandResponse actionSavePages(org.jboss.dashboard.workspace.Panel panel,
                                                                         org.jboss.dashboard.ui.controller.CommandRequest request)
                                                                  throws Exception
Defines the action to be taken when save pages selected

Parameters:
panel - Panel.
request - CommandRequest.
Returns:
CommandResponse
Throws:
Exception

Dashboard Builder UI Panels 6.2.0.CR2

Copyright © 2012-2014 JBoss by Red Hat. All Rights Reserved.