Class CmsEditFile
- java.lang.Object
-
- org.opencms.gwt.client.ui.contextmenu.CmsEditFile
-
- All Implemented Interfaces:
I_CmsContextMenuCommand
,I_CmsHasContextMenuCommand
,I_CmsValidatingContextMenuCommand
public final class CmsEditFile extends java.lang.Object implements I_CmsHasContextMenuCommand, I_CmsValidatingContextMenuCommand
A context menu command for editing an XML content.
-
-
Field Summary
Fields Modifier and Type Field Description protected I_CmsContextMenuHandler
m_menuHandler
The context menu handler for this command instance.protected boolean
m_reload
A flag which indicates whether the window should be reloaded after editing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doEdit(java.lang.String filename, org.opencms.util.CmsUUID structureId)
Actually starts the XML content editor for a given file name.void
execute(org.opencms.util.CmsUUID structureId, I_CmsContextMenuHandler handler, org.opencms.gwt.shared.CmsContextMenuEntryBean bean)
Executed on context menu item click.static I_CmsContextMenuCommand
getContextMenuCommand()
Returns the context menu command according toI_CmsHasContextMenuCommand
.A_CmsContextMenuItem
getItemWidget(org.opencms.util.CmsUUID structureId, I_CmsContextMenuHandler handler, org.opencms.gwt.shared.CmsContextMenuEntryBean bean)
Returns the special menu item widget for this command.boolean
hasItemWidget()
Returns if this command provides it's own menu item widget.boolean
isEditorOpen()
Checks if we currently have an editor open somewhere.boolean
validate(org.opencms.gwt.shared.CmsContextMenuEntryBean entry)
Validates whether the context menu command should be visible.
-
-
-
Field Detail
-
m_menuHandler
protected I_CmsContextMenuHandler m_menuHandler
The context menu handler for this command instance.
-
m_reload
protected boolean m_reload
A flag which indicates whether the window should be reloaded after editing.
-
-
Method Detail
-
getContextMenuCommand
public static I_CmsContextMenuCommand getContextMenuCommand()
Returns the context menu command according toI_CmsHasContextMenuCommand
.- Returns:
- the context menu command
-
doEdit
public void doEdit(java.lang.String filename, org.opencms.util.CmsUUID structureId)
Actually starts the XML content editor for a given file name.- Parameters:
filename
- the file namestructureId
- the file structure id
-
execute
public void execute(org.opencms.util.CmsUUID structureId, I_CmsContextMenuHandler handler, org.opencms.gwt.shared.CmsContextMenuEntryBean bean)
Description copied from interface:I_CmsContextMenuCommand
Executed on context menu item click.- Specified by:
execute
in interfaceI_CmsContextMenuCommand
- Parameters:
structureId
- the structure id of the resourcehandler
- the context menu handlerbean
- the context menu entry bean- See Also:
I_CmsContextMenuCommand.execute(org.opencms.util.CmsUUID, org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuHandler, org.opencms.gwt.shared.CmsContextMenuEntryBean)
-
getItemWidget
public A_CmsContextMenuItem getItemWidget(org.opencms.util.CmsUUID structureId, I_CmsContextMenuHandler handler, org.opencms.gwt.shared.CmsContextMenuEntryBean bean)
Description copied from interface:I_CmsContextMenuCommand
Returns the special menu item widget for this command.- Specified by:
getItemWidget
in interfaceI_CmsContextMenuCommand
- Parameters:
structureId
- the structure id of the resourcehandler
- the context menu handlerbean
- the context menu entry bean- Returns:
- the special menu item widget for this command
- See Also:
I_CmsContextMenuCommand.getItemWidget(org.opencms.util.CmsUUID, org.opencms.gwt.client.ui.contextmenu.I_CmsContextMenuHandler, org.opencms.gwt.shared.CmsContextMenuEntryBean)
-
hasItemWidget
public boolean hasItemWidget()
Description copied from interface:I_CmsContextMenuCommand
Returns if this command provides it's own menu item widget.- Specified by:
hasItemWidget
in interfaceI_CmsContextMenuCommand
- Returns:
true
if this command provides it's own menu item widget- See Also:
I_CmsContextMenuCommand.hasItemWidget()
-
isEditorOpen
public boolean isEditorOpen()
Checks if we currently have an editor open somewhere.- Returns:
- true if there is an open editor
-
validate
public boolean validate(org.opencms.gwt.shared.CmsContextMenuEntryBean entry)
Description copied from interface:I_CmsValidatingContextMenuCommand
Validates whether the context menu command should be visible.- Specified by:
validate
in interfaceI_CmsValidatingContextMenuCommand
- Parameters:
entry
- the context menu entry bean- Returns:
- true if the context menu entry should be visible
- See Also:
I_CmsValidatingContextMenuCommand.validate(org.opencms.gwt.shared.CmsContextMenuEntryBean)
-
-