Class CmsSitemapToolbarHandler
- java.lang.Object
-
- org.opencms.gwt.client.ui.A_CmsToolbarHandler
-
- org.opencms.ade.sitemap.client.toolbar.CmsSitemapToolbarHandler
-
- All Implemented Interfaces:
I_CmsActionHandler
,I_CmsContextMenuHandler
,I_CmsToolbarHandler
public class CmsSitemapToolbarHandler extends A_CmsToolbarHandler
The toolbar handler used for the sitemap toolbar context menu.
-
-
Constructor Summary
Constructors Constructor Description CmsSitemapToolbarHandler(java.util.List<org.opencms.gwt.shared.CmsContextMenuEntryBean> menuBeans)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateSelection()
Activates the selection button.void
deactivateCurrentButton()
De-activates the current button.void
ensureLockOnResource(org.opencms.util.CmsUUID structureId, I_CmsSimpleCallback<java.lang.Boolean> callback)
Tries to lock the given resource and returnstrue
on success.I_CmsToolbarButton
getActiveButton()
Returns the currently active button (may be null).java.util.Map<java.lang.String,I_CmsContextMenuCommand>
getContextMenuCommands()
Returns the available context menu commands as a map by class name.java.lang.String
getContextType()
Returns the context type.I_CmsContentEditorHandler
getEditorHandler()
Returns the editor handler.void
leavePage(java.lang.String targetUri)
Leaves the current page calling the target URI.void
loadContextMenu(org.opencms.util.CmsUUID structureId, org.opencms.gwt.shared.CmsCoreData.AdeContext context)
Loads the context menu.void
onSiteOrProjectChange(java.lang.String sitePath, java.lang.String serverLink)
Called when site and or project have been changed.void
refreshResource(org.opencms.util.CmsUUID structureId)
Reloads the resource edited.void
setActiveButton(I_CmsToolbarButton button)
Sets the currently active tool-bar button.java.util.List<I_CmsContextMenuEntry>
transformEntries(java.util.List<org.opencms.gwt.shared.CmsContextMenuEntryBean> menuBeans, org.opencms.util.CmsUUID structureId)
Transforms a list of context menu entry beans to a list of context menu entries.void
unlockResource(org.opencms.util.CmsUUID structureId)
Unlocks the resource if appropriate.-
Methods inherited from class org.opencms.gwt.client.ui.A_CmsToolbarHandler
transformSingleEntry
-
-
-
-
Constructor Detail
-
CmsSitemapToolbarHandler
public CmsSitemapToolbarHandler(java.util.List<org.opencms.gwt.shared.CmsContextMenuEntryBean> menuBeans)
Constructor.- Parameters:
menuBeans
- the context menu entry beans
-
-
Method Detail
-
activateSelection
public void activateSelection()
Description copied from interface:I_CmsToolbarHandler
Activates the selection button.- See Also:
I_CmsToolbarHandler.activateSelection()
-
deactivateCurrentButton
public void deactivateCurrentButton()
Description copied from interface:I_CmsToolbarHandler
De-activates the current button.
-
ensureLockOnResource
public void ensureLockOnResource(org.opencms.util.CmsUUID structureId, I_CmsSimpleCallback<java.lang.Boolean> callback)
Description copied from interface:I_CmsContextMenuHandler
Tries to lock the given resource and returnstrue
on success. If not successful a warning should be displayed.- Parameters:
structureId
- the structure id of the resource to lockcallback
- the callback to execute- See Also:
I_CmsContextMenuHandler.ensureLockOnResource(org.opencms.util.CmsUUID, org.opencms.gwt.client.util.I_CmsSimpleCallback)
-
getActiveButton
public I_CmsToolbarButton getActiveButton()
Description copied from interface:I_CmsToolbarHandler
Returns the currently active button (may be null).- Returns:
- the currently active button
- See Also:
I_CmsToolbarHandler.getActiveButton()
-
getContextMenuCommands
public java.util.Map<java.lang.String,I_CmsContextMenuCommand> getContextMenuCommands()
Description copied from interface:I_CmsContextMenuHandler
Returns the available context menu commands as a map by class name.- Returns:
- the available context menu commands as a map by class name
- See Also:
I_CmsContextMenuHandler.getContextMenuCommands()
-
getContextType
public java.lang.String getContextType()
Description copied from interface:I_CmsContextMenuHandler
Returns the context type.- Returns:
- the context type
- See Also:
I_CmsContextMenuHandler.getContextType()
-
getEditorHandler
public I_CmsContentEditorHandler getEditorHandler()
Description copied from interface:I_CmsContextMenuHandler
Returns the editor handler.- Returns:
- the editor handler
- See Also:
I_CmsContextMenuHandler.getEditorHandler()
-
leavePage
public void leavePage(java.lang.String targetUri)
Description copied from interface:I_CmsActionHandler
Leaves the current page calling the target URI.- Parameters:
targetUri
- the target URI- See Also:
I_CmsActionHandler.leavePage(java.lang.String)
-
loadContextMenu
public void loadContextMenu(org.opencms.util.CmsUUID structureId, org.opencms.gwt.shared.CmsCoreData.AdeContext context)
Description copied from interface:I_CmsToolbarHandler
Loads the context menu.- Parameters:
structureId
- the structure id of the resource for which to load the context menucontext
- the context menu item visibility context- See Also:
I_CmsToolbarHandler.loadContextMenu(org.opencms.util.CmsUUID, org.opencms.gwt.shared.CmsCoreData.AdeContext)
-
onSiteOrProjectChange
public void onSiteOrProjectChange(java.lang.String sitePath, java.lang.String serverLink)
Description copied from interface:I_CmsActionHandler
Called when site and or project have been changed.- Parameters:
sitePath
- the site path to the target resourceserverLink
- the server link to the resource- See Also:
I_CmsActionHandler.onSiteOrProjectChange(java.lang.String, java.lang.String)
-
refreshResource
public void refreshResource(org.opencms.util.CmsUUID structureId)
Description copied from interface:I_CmsActionHandler
Reloads the resource edited.- Parameters:
structureId
- the structure id of the resource to lock- See Also:
I_CmsActionHandler.refreshResource(org.opencms.util.CmsUUID)
-
setActiveButton
public void setActiveButton(I_CmsToolbarButton button)
Sets the currently active tool-bar button.- Parameters:
button
- the button
-
transformEntries
public java.util.List<I_CmsContextMenuEntry> transformEntries(java.util.List<org.opencms.gwt.shared.CmsContextMenuEntryBean> menuBeans, org.opencms.util.CmsUUID structureId)
Description copied from class:A_CmsToolbarHandler
Transforms a list of context menu entry beans to a list of context menu entries.- Overrides:
transformEntries
in classA_CmsToolbarHandler
- Parameters:
menuBeans
- the list of context menu entry beansstructureId
- the id of the resource for which to transform the context menu entries- Returns:
- a list of context menu entries
- See Also:
A_CmsToolbarHandler.transformEntries(java.util.List, org.opencms.util.CmsUUID)
-
unlockResource
public void unlockResource(org.opencms.util.CmsUUID structureId)
Description copied from interface:I_CmsContextMenuHandler
Unlocks the resource if appropriate.- Parameters:
structureId
- the structure id of the resource to lock- See Also:
I_CmsContextMenuHandler.unlockResource(org.opencms.util.CmsUUID)
-
-