public class CmsContextMenuHandler extends java.lang.Object implements I_CmsContextMenuHandler
| 构造器和说明 |
|---|
CmsContextMenuHandler()
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
ensureLockOnResource(CmsUUID structureId)
Tries to lock the given resource and returns
true on success. |
java.util.Map<java.lang.String,I_CmsContextMenuCommand> |
getContextMenuCommands()
Returns the available context menu commands as a map by class name.
|
void |
leavePage(java.lang.String targetUri)
Leaves the current page calling the target URI.
|
void |
loadContextMenu(CmsUUID structureId,
CmsCoreData.AdeContext context,
CmsContextMenuButton menuButton)
Loads the context menu.
|
void |
refreshResource(CmsUUID structureId)
Reloads the resource edited.
|
protected java.util.List<I_CmsContextMenuEntry> |
transformEntries(java.util.List<CmsContextMenuEntryBean> menuBeans,
CmsUUID structureId)
Transforms a list of context menu entry beans to a list of context menu entries.
|
protected I_CmsContextMenuEntry |
transformSingleEntry(CmsContextMenuEntryBean bean,
CmsUUID structureId)
Creates a single context menu entry from a context menu entry bean.
|
void |
unlockResource(CmsUUID structureId)
Unlocks the resource if appropriate.
|
public boolean ensureLockOnResource(CmsUUID structureId)
I_CmsContextMenuHandlertrue on success.
If not successful a warning should be displayed.ensureLockOnResource 在接口中 I_CmsContextMenuHandlerstructureId - the structure id of the resource to locktrue if successfulI_CmsContextMenuHandler.ensureLockOnResource(org.opencms.util.CmsUUID)public java.util.Map<java.lang.String,I_CmsContextMenuCommand> getContextMenuCommands()
I_CmsContextMenuHandlergetContextMenuCommands 在接口中 I_CmsContextMenuHandlerI_CmsContextMenuHandler.getContextMenuCommands()public void leavePage(java.lang.String targetUri)
I_CmsContextMenuHandlerleavePage 在接口中 I_CmsContextMenuHandlertargetUri - the target URII_CmsContextMenuHandler.leavePage(java.lang.String)public void loadContextMenu(CmsUUID structureId, CmsCoreData.AdeContext context, CmsContextMenuButton menuButton)
structureId - the resource structure idcontext - the contextmenuButton - the menu buttonpublic void refreshResource(CmsUUID structureId)
I_CmsContextMenuHandlerrefreshResource 在接口中 I_CmsContextMenuHandlerstructureId - the structure id of the resource to lockI_CmsContextMenuHandler.refreshResource(org.opencms.util.CmsUUID)public void unlockResource(CmsUUID structureId)
I_CmsContextMenuHandlerunlockResource 在接口中 I_CmsContextMenuHandlerstructureId - the structure id of the resource to lockI_CmsContextMenuHandler.unlockResource(org.opencms.util.CmsUUID)protected java.util.List<I_CmsContextMenuEntry> transformEntries(java.util.List<CmsContextMenuEntryBean> menuBeans, CmsUUID structureId)
menuBeans - the list of context menu entry beansstructureId - the id of the resource for which to transform the context menu entriesprotected I_CmsContextMenuEntry transformSingleEntry(CmsContextMenuEntryBean bean, CmsUUID structureId)
bean - the menu entry beanstructureId - the structure id