public class CmsContainerpageHandler extends A_CmsToolbarHandler
限定符和类型 | 字段和说明 |
---|---|
static java.lang.Runnable |
DO_NOTHING
Action which does nothing.
|
protected CmsContainerpageController |
m_controller
The container-page controller.
|
protected CmsContainerpageEditor |
m_editor
The container-page editor.
|
构造器和说明 |
---|
CmsContainerpageHandler(CmsContainerpageController controller,
CmsContainerpageEditor editor)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
activateSelection()
Activates the selection button.
|
void |
addToFavorites(CmsListItem listItem)
Adds the given list item widget to the favorite list widget.
|
void |
addToFavorites(java.lang.String clientId)
Adds the element with the given id to the favorite list.
|
void |
addToRecent(CmsListItem listItem)
Adds the given list item widget to the recent list widget.
|
void |
addToRecent(java.lang.String clientId)
Adds the element with the given id to the favorite list.
|
void |
changeTemplateContextManually(java.lang.String cookieName,
java.lang.String value)
Switches the template context.
|
void |
checkNewWidgetsAvailable(CmsUUID structureId,
com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> asyncCallback)
Checks whether GWT widgets are available for all fields of a content.
|
protected CmsContextMenuEntry |
createRawMenuEntry(CmsUUID structureId,
java.lang.Runnable action)
Creates a menu entry based on a structure id and action without anything else.
|
CmsContextMenuEntry |
createSimpleContextMenuEntry(CmsUUID structureId,
java.lang.String name,
boolean checked,
java.lang.Runnable action)
Creates a context menu entry.
|
protected I_CmsContextMenuEntry |
createTemplateContextSelectionMenuEntry(CmsUUID structureId)
Creates the template context selection entry for the context menu.
|
protected I_CmsContextMenuEntry |
createToggleEditSmallElementsMenuEntry()
Creates the context menu entry for enabling or disabling editing of small elements.
|
void |
deactivateCurrentButton()
De-activates the current button.
|
void |
deactivateMenuButton()
De-activates menu button.
|
void |
deactivateSelection()
Deactivates the selection.
|
protected void |
decorateMenuEntry(CmsContextMenuEntry entry,
java.lang.String name,
boolean checked)
Fills in label and checkbox of a menu entry.
|
void |
disableToolbarButtons()
Deactivates all toolbar buttons.
|
void |
editElementSettings(CmsContainerPageElementPanel elementWidget)
Starts the property editor for the given container element.
|
void |
enableFavoriteEditing(boolean enable,
I_CmsDNDController dndController)
Enables the favorites editing drag and drop controller.
|
void |
enableSaveReset(boolean enable)
Enables the save and reset button of the tool-bar.
|
void |
enableToolbarButtons()
Enables the toolbar buttons.
|
boolean |
ensureLockOnResource(CmsUUID structureId)
Tries to lock the given resource and returns
true 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.
|
protected java.lang.String |
getLockErrorMessage(CmsLockInfo lockInfo)
Helper method for getting the error message for a locking error.
|
protected java.lang.String |
getLockErrorTitle(CmsLockInfo lockInfo)
Helper method for getting the error message box title for a locking error.
|
void |
gotoSitemap()
Leaves the current page and opens the site-map.
|
boolean |
hasActiveSelection()
Returns if the selection button is active.
|
void |
hideMenu()
Hides any open menu.
|
void |
hidePageOverlay()
Removes page overlay if present.
|
void |
insertContextMenu(java.util.List<CmsContextMenuEntryBean> menuBeans,
CmsUUID structureId)
Inserts the context menu.
|
void |
leavePage(com.google.gwt.user.client.Command leavingCommand)
Call to leave the page.
|
void |
leavePage(java.lang.String target)
Call to leave the page.
|
void |
loadContextMenu(CmsUUID structureId,
CmsCoreData.AdeContext context)
Loads the context menu entries for a given URI.
|
void |
loadFavorites()
Loads the favorite list from the server and adds it's items to the clip-board.
|
void |
loadRecent()
Loads the recent list from the server and adds it's items to the clip-board.
|
void |
onLockFail(java.lang.String errorMessage)
Should be called when locking the container page failed.
|
void |
openEditorForElement(CmsContainerPageElementPanel element,
boolean inline)
Opens the edit dialog for the specified element.
|
void |
openElementsInfo()
Opens the elements info dialog.
|
void |
openLockReportForElement(CmsContainerPageElementPanel element)
Opens the lock report for the given element.
|
void |
openModelResourceSelect(CmsContainerPageElementPanel element,
java.util.List<CmsModelResourceInfo> modelResources)
Opens the model select dialog for the given new element.
|
protected void |
openPublish()
Opens the publish dialog without changes check.
|
void |
refreshResource(CmsUUID structureId)
Reloads the resource edited.
|
void |
reInitInlineEditing()
Re-initializes the inline editing.
|
void |
reloadElements(java.lang.String... elementIds)
Reloads the content for the given element and all related elements.
|
void |
removeElement(CmsContainerPageElementPanel element,
CmsContainerpageController.ElementRemoveMode removeMode)
Removes the given container-page element.
|
void |
resetEditableListButtons()
Shows list collector direct edit buttons (old direct edit style), if present.
|
void |
resetPage()
Resets the container-page to it's previous state.
|
void |
saveFavoriteList(java.util.List<java.lang.String> clientIds)
Saves the favorite list.
|
void |
savePage()
Saves the current state of the container-page.
|
void |
setActiveButton(I_CmsToolbarButton button)
Sets the currently active tool-bar button.
|
void |
showElementInfo(CmsContainerPageElementPanel element)
Shows resource information for a given element.
|
void |
showPageOverlay()
Shows a page overlay preventing user actions.
|
void |
showPublishDialog()
Shows the publish dialog.
|
void |
toggleToolbar()
Toggles the tool-bars visibility.
|
I_CmsContextMenuEntry |
transformSingleEntry(CmsUUID structureId,
CmsContextMenuEntryBean menuEntryBean)
Creates a single context menu entry from a context menu entry bean.
|
void |
unlockResource(CmsUUID structureId)
Unlocks the resource if appropriate.
|
void |
updateClipboard(java.util.Map<java.lang.String,CmsContainerElementData> elements)
Updates the clip board elements is necessary.
|
transformEntries
public static final java.lang.Runnable DO_NOTHING
protected CmsContainerpageController m_controller
protected CmsContainerpageEditor m_editor
public CmsContainerpageHandler(CmsContainerpageController controller, CmsContainerpageEditor editor)
controller
- the container-page controllereditor
- the container-page editorpublic void activateSelection()
public void addToFavorites(CmsListItem listItem)
listItem
- the list itempublic void addToFavorites(java.lang.String clientId)
clientId
- the client idpublic void addToRecent(CmsListItem listItem)
listItem
- the list itempublic void addToRecent(java.lang.String clientId)
clientId
- the client idpublic void changeTemplateContextManually(java.lang.String cookieName, java.lang.String value)
cookieName
- the cookie namevalue
- the new template contextpublic void checkNewWidgetsAvailable(CmsUUID structureId, com.google.gwt.user.client.rpc.AsyncCallback<java.lang.Boolean> asyncCallback)
structureId
- the structure id of the contentasyncCallback
- the callback for the resultpublic CmsContextMenuEntry createSimpleContextMenuEntry(CmsUUID structureId, java.lang.String name, boolean checked, java.lang.Runnable action)
structureId
- structure id of the resourcename
- the labelchecked
- true if checkbox should be displayedaction
- the action to executepublic void deactivateCurrentButton()
public void deactivateMenuButton()
public void deactivateSelection()
public void disableToolbarButtons()
public void editElementSettings(CmsContainerPageElementPanel elementWidget)
elementWidget
- the container element widget for which the properties should be editedpublic void enableFavoriteEditing(boolean enable, I_CmsDNDController dndController)
enable
- if true
favorites editing will enabled, otherwise disableddndController
- the favorites editing drag and drop controllerpublic void enableSaveReset(boolean enable)
enable
- true
to enablepublic void enableToolbarButtons()
public boolean ensureLockOnResource(CmsUUID structureId)
I_CmsContextMenuHandler
true
on success.
If not successful a warning should be displayed.structureId
- the structure id of the resource to locktrue
if successfulI_CmsContextMenuHandler.ensureLockOnResource(org.opencms.util.CmsUUID)
public I_CmsToolbarButton getActiveButton()
I_CmsToolbarHandler
I_CmsToolbarHandler.getActiveButton()
public java.util.Map<java.lang.String,I_CmsContextMenuCommand> getContextMenuCommands()
I_CmsContextMenuHandler
I_CmsContextMenuHandler.getContextMenuCommands()
public void gotoSitemap()
public boolean hasActiveSelection()
true
if the selection button is activepublic void hideMenu()
public void hidePageOverlay()
public void insertContextMenu(java.util.List<CmsContextMenuEntryBean> menuBeans, CmsUUID structureId)
menuBeans
- the menu beans from the serverstructureId
- the structure id of the resource for which the context menu entries should be generatedpublic void leavePage(com.google.gwt.user.client.Command leavingCommand)
leavingCommand
- the page leaving commandpublic void leavePage(java.lang.String target)
target
- the targetpublic void loadContextMenu(CmsUUID structureId, CmsCoreData.AdeContext context)
structureId
- the structure id of the resource for which the context menu should be loadedcontext
- the ade context (sitemap or containerpage)public void loadFavorites()
public void loadRecent()
public void onLockFail(java.lang.String errorMessage)
errorMessage
- the locking informationpublic void openEditorForElement(CmsContainerPageElementPanel element, boolean inline)
element
- the element to editinline
- true
to open the inline editor for the given element if availablepublic void openElementsInfo()
public void openLockReportForElement(CmsContainerPageElementPanel element)
element
- the elementpublic void openModelResourceSelect(CmsContainerPageElementPanel element, java.util.List<CmsModelResourceInfo> modelResources)
element
- the element widgetmodelResources
- the available resource modelspublic void refreshResource(CmsUUID structureId)
I_CmsContextMenuHandler
structureId
- the structure id of the resource to lockI_CmsContextMenuHandler.refreshResource(org.opencms.util.CmsUUID)
public void reInitInlineEditing()
public void reloadElements(java.lang.String... elementIds)
elementIds
- the element id'spublic void removeElement(CmsContainerPageElementPanel element, CmsContainerpageController.ElementRemoveMode removeMode)
element
- the elementremoveMode
- the element remove modepublic void resetEditableListButtons()
public void resetPage()
public void saveFavoriteList(java.util.List<java.lang.String> clientIds)
clientIds
- the client id's of the list's elementsCmsContainerpageController.saveFavoriteList(java.util.List)
public void savePage()
public void setActiveButton(I_CmsToolbarButton button)
button
- the buttonpublic void showElementInfo(CmsContainerPageElementPanel element)
element
- the element for which to show the informationpublic void showPageOverlay()
public void showPublishDialog()
public void toggleToolbar()
public I_CmsContextMenuEntry transformSingleEntry(CmsUUID structureId, CmsContextMenuEntryBean menuEntryBean)
A_CmsToolbarHandler
transformSingleEntry
在类中 A_CmsToolbarHandler
structureId
- the structure id of the resourcemenuEntryBean
- the context menu entry beanA_CmsToolbarHandler.transformSingleEntry(org.opencms.util.CmsUUID, org.opencms.gwt.shared.CmsContextMenuEntryBean)
public void unlockResource(CmsUUID structureId)
I_CmsContextMenuHandler
structureId
- the structure id of the resource to lockI_CmsContextMenuHandler.unlockResource(org.opencms.util.CmsUUID)
public void updateClipboard(java.util.Map<java.lang.String,CmsContainerElementData> elements)
elements
- the elements dataprotected CmsContextMenuEntry createRawMenuEntry(CmsUUID structureId, java.lang.Runnable action)
structureId
- the structure idaction
- the action for the menu entryprotected I_CmsContextMenuEntry createTemplateContextSelectionMenuEntry(CmsUUID structureId)
structureId
- the structure id of the pageprotected I_CmsContextMenuEntry createToggleEditSmallElementsMenuEntry()
protected void decorateMenuEntry(CmsContextMenuEntry entry, java.lang.String name, boolean checked)
entry
- the menu entryname
- the labelchecked
- true if checkbox should be shownprotected java.lang.String getLockErrorMessage(CmsLockInfo lockInfo)
lockInfo
- the lock informationprotected java.lang.String getLockErrorTitle(CmsLockInfo lockInfo)
lockInfo
- the lock informationprotected void openPublish()