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
Modifier and TypeClassDescriptionprotected class
The sitemap tree open handler. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The download gallery type name.static final String
The image gallery type name.protected CmsLazyTree<CmsSitemapTreeItem>
The displayed sitemap tree. -
Constructor Summary
-
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.void
displayCategoryData
(org.opencms.ade.sitemap.shared.CmsSitemapCategoryData categoryData, boolean openLocalCategories, org.opencms.util.CmsUUID openItemId) Displays the category data.void
displayGalleries
(Map<org.opencms.ade.sitemap.shared.CmsGalleryType, List<org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry>> galleries) Displays the gallery view.void
displayModelPages
(org.opencms.ade.sitemap.shared.CmsModelInfo modelPageData) Displays the model page data in a tree.void
displayNewGallery
(org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry galleryFolder) Displays a newly created gallery folder.void
displayNewModelPage
(org.opencms.ade.sitemap.shared.CmsModelPageEntry modelPageData, boolean isModelGroup) Adds a new model page to the model page view.protected void
Makes sure corresponding sitemap entries are loaded when the gallery tree is opened.void
Ensures the given item is visible in the viewport.Returns the controller.org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode
Returns 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 CmsSitemapView
Returns the instance.org.opencms.ade.sitemap.shared.CmsModelPageEntry
getModelPageEntry
(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 CmsSitemapTreeItem
Gets 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.void
highlightPath
(String sitePath) Highlights the sitemap entry with the given path.boolean
isDisabledModelPageEntry
(org.opencms.util.CmsUUID id) Returns the disabled state of the given model page entry.boolean
Returns if the current sitemap editor mode is galleries.boolean
isModelGroupEntry
(org.opencms.util.CmsUUID entryId) Returns if the given entry is a model group page.boolean
isModelPageEntry
(org.opencms.util.CmsUUID entryId) Returns if the given entry is a template model page.boolean
Checks if the sitemap editor is in 'model page mode'.boolean
Returns if the current sitemap editor mode is navigation.boolean
isParentModelPageEntry
(org.opencms.util.CmsUUID entryId) Returns if the given entry is a template model page inherited from the parent configuration.boolean
Returns true if we are not currently displaying the navigation or VFS tree.void
onBeforeSetEditorMode
(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode mode) Performs necessary async actions before actually setting the mode.void
onChange
(CmsSitemapChangeEvent changeEvent) Will be triggered when something has changed.void
onLoad
(CmsSitemapLoadEvent event) Will be triggered when an entry loads its children.void
void
removeDeleted
(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Removes deleted entry widget reference.protected void
setCategoriesVisible
(boolean visible) Shows/hides the category view.void
setEditorMode
(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode) Sets the editor mode.protected void
setElementVisible
(com.google.gwt.user.client.ui.Widget widget, boolean visible) Shows or hides the element for a widget.protected void
setGalleriesVisible
(boolean visible) Shows or hides the tree for the gallery mode.void
setHeaderVisible
(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 void
setModelPagesVisible
(boolean visible) Shows or hides the tree for the model page mode.void
updateDetailPageView
(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry) Updates the detail page view for a given changed entry.void
updateEntriesById
(Collection<org.opencms.util.CmsUUID> ids) Updates the entries whose id is in the given list of ids.void
updateModelPageDisabledState
(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
null
if 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
null
if 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:
true
if the current sitemap editor mode is galleries
-
isModelGroupEntry
Returns if the given entry is a model group page.- Parameters:
entryId
- the entry id- Returns:
true
if 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:
true
if 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:
true
if 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_CmsSitemapChangeHandler
Will be triggered when something has changed.- Specified by:
onChange
in interfaceI_CmsSitemapChangeHandler
- Parameters:
changeEvent
- the specific change event- See Also:
-
onLoad
Description copied from interface:I_CmsSitemapLoadHandler
Will be triggered when an entry loads its children.- Specified by:
onLoad
in interfaceI_CmsSitemapLoadHandler
- Parameters:
event
- the event- See Also:
-
onModuleLoad
- Specified by:
onModuleLoad
in interfacecom.google.gwt.core.client.EntryPoint
- Overrides:
onModuleLoad
in classA_CmsEntryPoint
- See Also:
-
EntryPoint.onModuleLoad()
-
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
-