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

Sitemap editor.

Since:
8.0.0
  • Field Details

  • Constructor Details

  • Method Details

    • getInstance

      public static CmsSitemapView getInstance()
      Returns the instance.

      Returns:
      the instance
    • create

      public CmsSitemapTreeItem create(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Creates a new tree item from the given sitemap entry.

      Parameters:
      entry - the sitemap entry
      Returns:
      the new created (still orphan) tree item
    • createSitemapItem

      public CmsSitemapTreeItem createSitemapItem(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Creates a sitemap tree item from a client sitemap entry.

      Parameters:
      entry - the entry from which the sitemap tree item should be created
      Returns:
      the new sitemap tree item
    • displayCategoryData

      public void displayCategoryData(org.opencms.ade.sitemap.shared.CmsSitemapCategoryData categoryData, boolean openLocalCategories, org.opencms.util.CmsUUID openItemId)
      Displays the category data.

      Parameters:
      categoryData - the category data
      openLocalCategories - true if the local category tree should be opened
      openItemId - the id of the item to open
    • 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
    • displayModelPages

      public void displayModelPages(org.opencms.ade.sitemap.shared.CmsModelInfo modelPageData)
      Displays the model page data in a tree.

      Parameters:
      modelPageData - the model page data
    • displayNewGallery

      public void displayNewGallery(org.opencms.ade.sitemap.shared.CmsGalleryFolderEntry galleryFolder)
      Displays a newly created gallery folder.

      Parameters:
      galleryFolder - the gallery folder
    • displayNewModelPage

      public void displayNewModelPage(org.opencms.ade.sitemap.shared.CmsModelPageEntry modelPageData, boolean isModelGroup)
      Adds a new model page to the model page view.

      Parameters:
      modelPageData - the data for the new model page
      isModelGroup - in case of a model group page
    • ensureVisible

      public void ensureVisible(CmsSitemapTreeItem item)
      Ensures the given item is visible in the viewport.

      Parameters:
      item - the item to see
    • getController

      Returns the controller.

      Returns:
      the controller
    • getEditorMode

      public org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode getEditorMode()
      Returns the editor mode.

      Returns:
      the editor mode
    • getIconForEntry

      public String getIconForEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Returns the icon class for the given entry depending on the editor mode.

      Parameters:
      entry - the entry to get the icon for
      Returns:
      the icon CSS class
    • 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

      public CmsSitemapTreeItem getTreeItem(org.opencms.util.CmsUUID entryId)
      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

      public void highlightPath(String sitePath)
      Highlights the sitemap entry with the given path.

      Parameters:
      sitePath - the sitemap path of the entry to highlight
    • isDisabledModelPageEntry

      public boolean isDisabledModelPageEntry(org.opencms.util.CmsUUID id)
      Returns the disabled state of the given model page entry.

      Parameters:
      id - the entry id
      Returns:
      the disabled state
    • isGalleryMode

      public boolean isGalleryMode()
      Returns if the current sitemap editor mode is galleries.

      Returns:
      true if the current sitemap editor mode is galleries
    • isModelGroupEntry

      public boolean isModelGroupEntry(org.opencms.util.CmsUUID entryId)
      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

      public boolean isModelPageEntry(org.opencms.util.CmsUUID entryId)
      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

      public boolean isModelPageMode()
      Checks if the sitemap editor is in 'model page mode'.

      Returns:
      true if we are in model page view
    • isNavigationMode

      public boolean isNavigationMode()
      Returns if the current sitemap editor mode is navigation.

      Returns:
      true if the current sitemap editor mode is navigation
    • isParentModelPageEntry

      public boolean isParentModelPageEntry(org.opencms.util.CmsUUID entryId)
      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

      public boolean 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
    • onBeforeSetEditorMode

      public void onBeforeSetEditorMode(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode mode)
      Performs necessary async actions before actually setting the mode.

      Parameters:
      mode - the mode
    • onChange

      public void onChange(CmsSitemapChangeEvent changeEvent)
      Description copied from interface: I_CmsSitemapChangeHandler
      Will be triggered when something has changed.

      Specified by:
      onChange in interface I_CmsSitemapChangeHandler
      Parameters:
      changeEvent - the specific change event
      See Also:
    • onLoad

      public void onLoad(CmsSitemapLoadEvent event)
      Description copied from interface: I_CmsSitemapLoadHandler
      Will be triggered when an entry loads its children.

      Specified by:
      onLoad in interface I_CmsSitemapLoadHandler
      Parameters:
      event - the event
      See Also:
    • onModuleLoad

      public void onModuleLoad()
      Specified by:
      onModuleLoad in interface com.google.gwt.core.client.EntryPoint
      Overrides:
      onModuleLoad in class A_CmsEntryPoint
      See Also:
      • EntryPoint.onModuleLoad()
    • removeDeleted

      public void removeDeleted(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Removes deleted entry widget reference.

      Parameters:
      entry - the entry being deleted
    • setEditorMode

      public void setEditorMode(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode)
      Sets the editor mode.

      Parameters:
      editorMode - the editor mode to set
    • setHeaderVisible

      public 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).

      Parameters:
      visible - true if the normal header should be visible
    • updateDetailPageView

      public void updateDetailPageView(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Updates the detail page view for a given changed entry.

      Parameters:
      entry - the entry which was changed
    • updateEntriesById

      public void updateEntriesById(Collection<org.opencms.util.CmsUUID> ids)
      Updates the entries whose id is in the given list of ids.

      Parameters:
      ids - a list of sitemap entry ids
    • updateModelPageDisabledState

      public void updateModelPageDisabledState(org.opencms.util.CmsUUID entryId, boolean disabled)
      Updates the disabled state for the given model page.

      Parameters:
      entryId - the model page id
      disabled - the disabled state
    • ensureEntriesLoaded

      protected void ensureEntriesLoaded(CmsGalleryTreeItem parent)
      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

      protected void setCategoriesVisible(boolean visible)
      Shows/hides the category view.

      Parameters:
      visible - true if the categories should be made visible
    • setElementVisible

      protected void setElementVisible(com.google.gwt.user.client.ui.Widget widget, boolean visible)
      Shows or hides the element for a widget.

      Parameters:
      widget - the widget to show or hide
      visible - true if the widget should be shown
    • setGalleriesVisible

      protected void setGalleriesVisible(boolean visible)
      Shows or hides the tree for the gallery mode.

      Parameters:
      visible - true if the tree should be shown
    • setModelPagesVisible

      protected void setModelPagesVisible(boolean visible)
      Shows or hides the tree for the model page mode.

      Parameters:
      visible - true if the model pages should be shown