Class CmsContextMenuHandler
java.lang.Object
org.opencms.gwt.client.ui.contextmenu.CmsContextMenuHandler
- All Implemented Interfaces:
I_CmsActionHandler,I_CmsContextMenuHandler
- Direct Known Subclasses:
CmsDialogContextMenuHandler,CmsResultContextMenuHandler
The context menu handler for the search result tab.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidensureLockOnResource(org.opencms.util.CmsUUID structureId, I_CmsSimpleCallback<Boolean> callback) Tries to lock the given resource and returnstrueon success.Returns the available context menu commands as a map by class name.Returns the context type.Returns the editor handler.voidLeaves the current page calling the target URI.voidloadContextMenu(org.opencms.util.CmsUUID structureId, org.opencms.gwt.shared.CmsCoreData.AdeContext context, CmsContextMenuButton menuButton) Loads the context menu.voidonSiteOrProjectChange(String sitePath, String serverLink) Called when site and or project have been changed.voidrefreshResource(org.opencms.util.CmsUUID structureId) Reloads the resource edited.voidsetEditorHandler(I_CmsContentEditorHandler editorHandler) Sets the editor handler.protected List<I_CmsContextMenuEntry> transformEntries(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.protected I_CmsContextMenuEntrytransformSingleEntry(org.opencms.gwt.shared.CmsContextMenuEntryBean bean, org.opencms.util.CmsUUID structureId) Creates a single context menu entry from a context menu entry bean.voidunlockResource(org.opencms.util.CmsUUID structureId) Unlocks the resource if appropriate.
-
Constructor Details
-
CmsContextMenuHandler
public CmsContextMenuHandler()Constructor.
-
-
Method Details
-
ensureLockOnResource
public void ensureLockOnResource(org.opencms.util.CmsUUID structureId, I_CmsSimpleCallback<Boolean> callback) Description copied from interface:I_CmsContextMenuHandlerTries to lock the given resource and returnstrueon success. If not successful a warning should be displayed.- Specified by:
ensureLockOnResourcein interfaceI_CmsContextMenuHandler- Parameters:
structureId- the structure id of the resource to lockcallback- the callback to execute- See Also:
-
getContextMenuCommands
Description copied from interface:I_CmsContextMenuHandlerReturns the available context menu commands as a map by class name.- Specified by:
getContextMenuCommandsin interfaceI_CmsContextMenuHandler- Returns:
- the available context menu commands as a map by class name
- See Also:
-
getContextType
Description copied from interface:I_CmsContextMenuHandlerReturns the context type.- Specified by:
getContextTypein interfaceI_CmsContextMenuHandler- Returns:
- the context type
- See Also:
-
getEditorHandler
Description copied from interface:I_CmsContextMenuHandlerReturns the editor handler.- Specified by:
getEditorHandlerin interfaceI_CmsContextMenuHandler- Returns:
- the editor handler
- See Also:
-
leavePage
Description copied from interface:I_CmsActionHandlerLeaves the current page calling the target URI.- Specified by:
leavePagein interfaceI_CmsActionHandler- Parameters:
targetUri- the target URI- See Also:
-
onSiteOrProjectChange
Description copied from interface:I_CmsActionHandlerCalled when site and or project have been changed.- Specified by:
onSiteOrProjectChangein interfaceI_CmsActionHandler- Parameters:
sitePath- the site path to the target resourceserverLink- the server link to the resource- See Also:
-
refreshResource
Description copied from interface:I_CmsActionHandlerReloads the resource edited.- Specified by:
refreshResourcein interfaceI_CmsActionHandler- Parameters:
structureId- the structure id of the resource to lock- See Also:
-
setEditorHandler
Sets the editor handler.- Parameters:
editorHandler- the editor handler
-
unlockResource
Description copied from interface:I_CmsContextMenuHandlerUnlocks the resource if appropriate.- Specified by:
unlockResourcein interfaceI_CmsContextMenuHandler- Parameters:
structureId- the structure id of the resource to lock- See Also:
-
transformEntries
protected List<I_CmsContextMenuEntry> transformEntries(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.- 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
-