Package org.opencms.ade.sitemap.client
Class CmsSitemapView
java.lang.Object
org.opencms.gwt.client.A_CmsEntryPoint
org.opencms.ade.sitemap.client.CmsSitemapView
- All Implemented Interfaces:
com.google.gwt.core.client.EntryPoint,com.google.gwt.event.shared.EventHandler,I_CmsSitemapChangeHandler,I_CmsSitemapLoadHandler
public final class CmsSitemapView
extends A_CmsEntryPoint
implements I_CmsSitemapChangeHandler, I_CmsSitemapLoadHandler
Sitemap editor.
- Since:
- 8.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe sitemap tree open handler. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe download gallery type name.static final StringThe image gallery type name.protected CmsLazyTree<CmsSitemapTreeItem> The displayed sitemap tree. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Creates a new tree item from the given sitemap entry.createSitemapItem(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Creates a sitemap tree item from a client sitemap entry.voiddisplayCategoryData(org.opencms.ade.sitemap.shared.CmsSitemapCategoryData categoryData, boolean openLocalCategories, org.opencms.util.CmsUUID openItemId) Displays the category data.voiddisplayGalleries(Map<org.opencms.ade.sitemap.shared.CmsGalleryType, List<org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry>> galleries) Displays the gallery view.voiddisplayModelPages(org.opencms.ade.sitemap.shared.CmsModelInfo modelPageData) Displays the model page data in a tree.voiddisplayNewGallery(org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry galleryFolder) Displays a newly created gallery folder.voiddisplayNewModelPage(org.opencms.ade.sitemap.shared.CmsModelPageEntry modelPageData, boolean isModelGroup) Adds a new model page to the model page view.protected voidMakes sure corresponding sitemap entries are loaded when the gallery tree is opened.voidEnsures the given item is visible in the viewport.Returns the controller.org.opencms.ade.sitemap.shared.CmsSitemapData.EditorModeReturns the editor mode.getIconForEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Returns the icon class for the given entry depending on the editor mode.static CmsSitemapViewReturns the instance.org.opencms.ade.sitemap.shared.CmsModelPageEntrygetModelPageEntry(org.opencms.util.CmsUUID id) Gets the model page bean with the given structure id.org.opencms.util.CmsPair<List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>, List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>> Gets the list of descendants of a path and splits it into two lists, one containing the sitemap entries whose children have already been loaded, and those whose children haven't been loaded.protected CmsSitemapTreeItemGets the sitemap tree item widget which represents the root of the current sitemap.Gets the sitemap toolbar.getTree()Returns the tree.getTreeItem(String path) Returns the tree entry with the given path.getTreeItem(org.opencms.util.CmsUUID entryId) Returns the tree entry with the given path.voidhighlightPath(String sitePath) Highlights the sitemap entry with the given path.booleanisDisabledModelPageEntry(org.opencms.util.CmsUUID id) Returns the disabled state of the given model page entry.booleanReturns if the current sitemap editor mode is galleries.booleanisModelGroupEntry(org.opencms.util.CmsUUID entryId) Returns if the given entry is a model group page.booleanisModelPageEntry(org.opencms.util.CmsUUID entryId) Returns if the given entry is a template model page.booleanChecks if the sitemap editor is in 'model page mode'.booleanReturns if the current sitemap editor mode is navigation.booleanisParentModelPageEntry(org.opencms.util.CmsUUID entryId) Returns if the given entry is a template model page inherited from the parent configuration.booleanReturns true if we are not currently displaying the navigation or VFS tree.voidonBeforeSetEditorMode(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode mode) Performs necessary async actions before actually setting the mode.voidonChange(CmsSitemapChangeEvent changeEvent) Will be triggered when something has changed.voidonLoad(CmsSitemapLoadEvent event) Will be triggered when an entry loads its children.voidvoidremoveDeleted(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Removes deleted entry widget reference.protected voidsetCategoriesVisible(boolean visible) Shows/hides the category view.voidsetEditorMode(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode) Sets the editor mode.protected voidsetElementVisible(com.google.gwt.user.client.ui.Widget widget, boolean visible) Shows or hides the element for a widget.protected voidsetGalleriesVisible(boolean visible) Shows or hides the tree for the gallery mode.voidsetHeaderVisible(boolean visible) Sets the visibility of the normal siteamp header (the header can be hidden so that the Vaadin code can display its own header).protected voidsetModelPagesVisible(boolean visible) Shows or hides the tree for the model page mode.voidupdateDetailPageView(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Updates the detail page view for a given changed entry.voidupdateEntriesById(Collection<org.opencms.util.CmsUUID> ids) Updates the entries whose id is in the given list of ids.voidupdateModelPageDisabledState(org.opencms.util.CmsUUID entryId, boolean disabled) Updates the disabled state for the given model page.Methods inherited from class org.opencms.gwt.client.A_CmsEntryPoint
enableRemoteExceptionHandler
-
Field Details
-
DOWNLOAD_GALLERY_TYPE
The download gallery type name.- See Also:
-
IMAGE_GALLERY_TYPE
The image gallery type name.- See Also:
-
m_tree
The displayed sitemap tree.
-
-
Constructor Details
-
CmsSitemapView
public CmsSitemapView()
-
-
Method Details
-
getInstance
Returns the instance.- Returns:
- the instance
-
displayGalleries
public void displayGalleries(Map<org.opencms.ade.sitemap.shared.CmsGalleryType, List<org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry>> galleries) Displays the gallery view.- Parameters:
galleries- the gallery data
-
ensureVisible
Ensures the given item is visible in the viewport.- Parameters:
item- the item to see
-
getController
Returns the controller.- Returns:
- the controller
-
getEditorMode
Returns the editor mode.- Returns:
- the editor mode
-
getModelPageEntry
public org.opencms.ade.sitemap.shared.CmsModelPageEntry getModelPageEntry(org.opencms.util.CmsUUID id) Gets the model page bean with the given structure id.- Parameters:
id- a structure id- Returns:
- the model page bean with the given id
-
getOpenAndClosedDescendants
public org.opencms.util.CmsPair<List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>,List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>> getOpenAndClosedDescendants(String path) Gets the list of descendants of a path and splits it into two lists, one containing the sitemap entries whose children have already been loaded, and those whose children haven't been loaded.- Parameters:
path- the path for which the open and closed descendants should be returned- Returns:
- a pair whose first and second components are lists of open and closed descendant entries of the path, respectively
-
getToolbar
Gets the sitemap toolbar.- Returns:
- the sitemap toolbar
-
getTree
Returns the tree.- Returns:
- the tree
-
getTreeItem
Returns the tree entry with the given path.- Parameters:
entryId- the id of the sitemap entry- Returns:
- the tree entry with the given path, or
nullif not found
-
getTreeItem
Returns the tree entry with the given path.- Parameters:
path- the path to look for- Returns:
- the tree entry with the given path, or
nullif not found
-
highlightPath
Highlights the sitemap entry with the given path.- Parameters:
sitePath- the sitemap path of the entry to highlight
-
isDisabledModelPageEntry
Returns the disabled state of the given model page entry.- Parameters:
id- the entry id- Returns:
- the disabled state
-
isGalleryMode
Returns if the current sitemap editor mode is galleries.- Returns:
trueif the current sitemap editor mode is galleries
-
isModelGroupEntry
Returns if the given entry is a model group page.- Parameters:
entryId- the entry id- Returns:
trueif the given entry is a model group page
-
isModelPageEntry
Returns if the given entry is a template model page.- Parameters:
entryId- the entry id- Returns:
trueif the given entry is a template model page
-
isModelPageMode
Checks if the sitemap editor is in 'model page mode'.- Returns:
- true if we are in model page view
-
isParentModelPageEntry
Returns if the given entry is a template model page inherited from the parent configuration.- Parameters:
entryId- the entry id- Returns:
trueif the given entry is a template model page
-
isSpecialMode
Returns true if we are not currently displaying the navigation or VFS tree.- Returns:
- true if we are not currently in navigation or VFS mode
-
onChange
Description copied from interface:I_CmsSitemapChangeHandlerWill be triggered when something has changed.- Specified by:
onChangein interfaceI_CmsSitemapChangeHandler- Parameters:
changeEvent- the specific change event- See Also:
-
onLoad
Description copied from interface:I_CmsSitemapLoadHandlerWill be triggered when an entry loads its children.- Specified by:
onLoadin interfaceI_CmsSitemapLoadHandler- Parameters:
event- the event- See Also:
-
onModuleLoad
- Specified by:
onModuleLoadin interfacecom.google.gwt.core.client.EntryPoint- Overrides:
onModuleLoadin classA_CmsEntryPoint- See Also:
-
setHeaderVisible
Sets the visibility of the normal siteamp header (the header can be hidden so that the Vaadin code can display its own header).- Parameters:
visible- true if the normal header should be visible
-
updateEntriesById
Updates the entries whose id is in the given list of ids.- Parameters:
ids- a list of sitemap entry ids
-
updateModelPageDisabledState
Updates the disabled state for the given model page.- Parameters:
entryId- the model page iddisabled- the disabled state
-
ensureEntriesLoaded
Makes sure corresponding sitemap entries are loaded when the gallery tree is opened.- Parameters:
parent- the parent gallery tree item
-
getRootItem
Gets the sitemap tree item widget which represents the root of the current sitemap.- Returns:
- the root sitemap tree item widget
-
setCategoriesVisible
Shows/hides the category view.- Parameters:
visible- true if the categories should be made visible
-
setElementVisible
Shows or hides the element for a widget.- Parameters:
widget- the widget to show or hidevisible- true if the widget should be shown
-
setGalleriesVisible
Shows or hides the tree for the gallery mode.- Parameters:
visible- true if the tree should be shown
-
setModelPagesVisible
Shows or hides the tree for the model page mode.- Parameters:
visible- true if the model pages should be shown
-