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_CmsContextMenuHandler
true
on success.
If not successful a warning should be displayed.ensureLockOnResource
在接口中 I_CmsContextMenuHandler
structureId
- 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_CmsContextMenuHandler
getContextMenuCommands
在接口中 I_CmsContextMenuHandler
I_CmsContextMenuHandler.getContextMenuCommands()
public void leavePage(java.lang.String targetUri)
I_CmsContextMenuHandler
leavePage
在接口中 I_CmsContextMenuHandler
targetUri
- 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_CmsContextMenuHandler
refreshResource
在接口中 I_CmsContextMenuHandler
structureId
- the structure id of the resource to lockI_CmsContextMenuHandler.refreshResource(org.opencms.util.CmsUUID)
public void unlockResource(CmsUUID structureId)
I_CmsContextMenuHandler
unlockResource
在接口中 I_CmsContextMenuHandler
structureId
- 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