Class CmsSitemapController

java.lang.Object
org.opencms.ade.sitemap.client.control.CmsSitemapController
All Implemented Interfaces:
org.opencms.ade.sitemap.shared.I_CmsSitemapController

public class CmsSitemapController extends Object implements org.opencms.ade.sitemap.shared.I_CmsSitemapController
Sitemap editor controller.

Since:
8.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<org.opencms.util.CmsUUID,org.opencms.ade.detailpage.CmsDetailPageInfo>
    A map of *all* detail page info beans, indexed by page id.
    protected org.opencms.ade.sitemap.shared.CmsSitemapData
    The sitemap data.
    protected org.opencms.ade.sitemap.shared.CmsDetailPageTable
    The detail page table.
    protected com.google.gwt.event.shared.SimpleEventBus
    The event bus.
    static final String
    The name to use for new entries.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.google.gwt.event.shared.HandlerRegistration
    Adds a new change event handler.
    void
    addDetailPageInfo(org.opencms.ade.detailpage.CmsDetailPageInfo info)
    Adds a new detail page information bean.
    com.google.gwt.event.shared.HandlerRegistration
    Adds a new load event handler.
    void
    Adds a handler for property changes caused by user edits.
    void
    addToNavigation(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
    Adds the entry to the navigation.
    protected void
    applyChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change)
    Fires a sitemap change event.
    void
    bump(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
    Makes the given sitemap entry the default detail page for its detail page type.
    void
    changeCategory(org.opencms.util.CmsUUID id, String title, String name)
    Changes the given category.
    void
    Clears the deleted clip-board list and commits the change.
    void
    Clears the modified clip-board list and commits the change.
    protected void
    commitChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change, com.google.gwt.user.client.Command callback)
    Adds a change to the queue.
    void
    create(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, int resourceTypeId, org.opencms.util.CmsUUID copyResourceId, String parameter, boolean isNewSitemap)
    Registers a new sitemap entry.
    void
    createCategory(org.opencms.util.CmsUUID id, String title, String name)
    Creates a new category.
    void
    createNewGallery(org.opencms.util.CmsUUID parentId, int galleryTypeId, String title)
    Creates a new gallery folder of the given type.
    void
    createNewModelPage(String title, String description, org.opencms.util.CmsUUID copyId, boolean isModelGroup)
    Creates a new model page.
    void
    createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, String sitemapFolderType)
    Creates a new sub-entry which is a subsitemap.
    void
    createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, String sitemapType)
    Creates a sitemap folder.
    void
    createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent)
    Creates a new sub-entry of an existing sitemap entry.
    void
    createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, org.opencms.util.CmsUUID structureId)
    Creates a new sub-entry of an existing sitemap entry.
    void
    createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, org.opencms.util.CmsUUID structureId)
    Registers a new sitemap entry.
    void
    createSubSitemap(org.opencms.util.CmsUUID entryId)
    Creates a sub-sitemap from the subtree of the current sitemap starting at the given entry.
    void
    delete(String sitePath)
    Deletes the given entry and all its descendants.
    void
    deleteCategory(org.opencms.util.CmsUUID id)
    Deletes a category.
    void
    disableModelPage(org.opencms.util.CmsUUID id, boolean disable)
    Disables the given model page entry within the configuration.
    void
    edit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, CmsReloadMode reloadStatus)
    Edits the given sitemap entry.
    void
    editAndChangeName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String newUrlName, List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, boolean keepNewStatus, CmsReloadMode reloadStatus)
    Edits an entry and changes its URL name.
    static void
    editPropertiesForLocaleCompareMode(org.opencms.ade.sitemap.shared.CmsLocaleComparePropertyData data, org.opencms.util.CmsUUID ownId, org.opencms.util.CmsUUID defaultFileId, String noEditReason)
    Opens the property editor for locale compare mode.
    void
    ensureUniqueName(String parentFolder, String newName, I_CmsSimpleCallback<String> callback)
    Ensure the uniqueness of a given URL-name within the children of the given parent folder.
    void
    ensureUniqueName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, String newName, I_CmsSimpleCallback<String> callback)
    Ensure the uniqueness of a given URL-name within the children of the given parent site-map entry.
    void
    executePropertyModification(org.opencms.gwt.shared.property.CmsPropertyModification propMod)
    Applies the given property modification.
    org.opencms.ade.sitemap.shared.CmsSitemapCategoryData
    Gets the category data.
    protected org.opencms.ade.sitemap.shared.CmsSitemapChange
    getChangeForEdit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges)
    Creates a change object for an edit operation.
    void
    getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, boolean continueIfParentNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
    Retrieves the child entries of the given node from the server.
    void
    getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
    Retrieves the child entries of the given node from the server.
    org.opencms.ade.sitemap.shared.CmsSitemapData
    Returns the sitemap data.
    org.opencms.ade.detailpage.CmsDetailPageInfo
    getDetailPageInfo(org.opencms.util.CmsUUID id)
    Returns the detail page info for a given entry id.
    org.opencms.ade.sitemap.shared.CmsDetailPageTable
    Returns the detail page table.
    getEffectiveProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
    Gets the effective value of a property value for a sitemap entry.
    org.opencms.gwt.shared.property.CmsClientProperty
    getEffectivePropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
    Gets the value of a property which is effective at a given sitemap entry.
    Map<org.opencms.util.CmsUUID,org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>
    getEntriesById(Collection<org.opencms.util.CmsUUID> ids)
    Returns all entries with an id from a given list.
    org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
    getEntry(String entryPath)
    Returns the tree entry with the given path.
    org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
    getEntryById(org.opencms.util.CmsUUID id)
    Finds an entry by id.
    protected String
    Returns the URI of the current sitemap.
    org.opencms.ade.sitemap.shared.CmsGalleryType
    Returns the gallery type with the given id.
    getInheritedProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
    Gets the value for a property which a sitemap entry would inherit if it didn't have its own properties.
    org.opencms.gwt.shared.property.CmsClientProperty
    getInheritedPropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
    Gets the property object which would be inherited by a sitemap entry.
    List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry>
    Returns a list of all descendant sitemap entries of a given path which have already been loaded on the client.
    getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
    Returns the no edit reason or null if editing is allowed.
    getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, boolean checkChildLocks)
    Returns the no edit reason or null if editing is allowed.
    org.opencms.ade.sitemap.shared.CmsClientSitemapEntry
    getParentEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
    Returns the parent entry of a sitemap entry, or null if it is the root entry.
    protected String
    getPath(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String newUrlName)
    Helper method for getting the full path of a sitemap entry whose URL name is being edited.
    Map<String,org.opencms.gwt.shared.property.CmsClientProperty>
    getPropertiesForId(org.opencms.util.CmsUUID id)
    Gets the properties for a given structure id.
    org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync
    Returns the sitemap service instance.
    protected org.opencms.gwt.shared.rpc.I_CmsVfsServiceAsync
    Returns the sitemap service instance.
    void
    Leaves the current sitemap to open the parent sitemap.
    void
    hideInNavigation(org.opencms.util.CmsUUID entryId)
    Hides the entry within the site navigation.
    protected void
    Initializes the detail page information.
    boolean
    isDetailPage(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
    Checks whether this entry belongs to a detail page.
    boolean
    isDetailPage(org.opencms.util.CmsUUID id)
    Returns true if the id is the id of a detail page.
    boolean
    Checks if the current sitemap is editable.
    boolean
    isHiddenProperty(String propertyName)
    Checks whether a string is the name of a hidden property.
    boolean
    Returns true if the locale comparison mode is enabled.
    boolean
    isRoot(String sitePath)
    Checks if the given site path is the sitemap root.
    void
    Ask to save the page before leaving, if necessary.
    void
    loadCategories(boolean openLocalCategories, org.opencms.util.CmsUUID openItemId)
    Loads and displays the category data.
    void
    Loads all available galleries for the current sub site.
    void
    Loads the model pages.
    void
    loadNewElementInfo(com.google.gwt.user.client.rpc.AsyncCallback<Void> callback)
    Loads the new element info.
    void
    loadPath(String sitePath)
    Loads all entries on the given path.
    void
    loadPath(String sitePath, boolean continueIfNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
    Loads all entries on the given path.
    void
    loadPath(String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
    Loads the sitemap entry for the given site path.
    protected void
    makeNewEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, I_CmsSimpleCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
    Creates a new client sitemap entry bean to use for the RPC call which actually creates the entry on the server side.
    void
    mergeSubSitemap(org.opencms.util.CmsUUID entryId)
    Merges a subsitemap at the given id back into this sitemap.
    void
    move(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String toPath, int position)
    Moves the given sitemap entry with all its descendants to the new position.
    void
    openPropertyDialogForVaadin(org.opencms.util.CmsUUID structureId, org.opencms.util.CmsUUID rootId)
    Opens the property dialog for the locale comparison mode.
    void
    openSiteMap(String sitePath)
    Opens the site-map specified.
    void
    openSiteMap(String sitePath, boolean siteChange)
    Opens the site-map specified.
    void
    Recomputes properties for all sitemap entries.
    protected void
    recomputeProperties(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
    Recomputes the properties for a client sitemap entry.
    void
    refreshRoot(com.google.gwt.user.client.rpc.AsyncCallback<Void> callback)
    Refreshes the root entry.
    void
    registerEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
     
    void
    registerPathChange(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String oldPath)
     
    void
    removeFromNavigation(org.opencms.util.CmsUUID entryId)
    Removes the entry with the given site-path from navigation.
    void
    removeModelPage(org.opencms.util.CmsUUID id, com.google.gwt.user.client.rpc.AsyncCallback<Void> asyncCallback)
    Removes a model page from the sitemap's configuration.
    Map<String,org.opencms.gwt.shared.property.CmsClientProperty>
    replaceProperties(org.opencms.util.CmsUUID id, Map<String,org.opencms.gwt.shared.property.CmsClientProperty> properties)
     
    static <A, B> B
    safeLookup(Map<A,B> map, A key)
    Helper method for looking up a value in a map which may be null.
    void
    setEditorModeInSession(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode)
    Sets the editor mode in the user session.
    void
    showInNavigation(org.opencms.util.CmsUUID entryId)
    Shows a formerly hidden entry in the navigation.
    void
    undelete(org.opencms.util.CmsUUID entryId, String sitePath)
    Undeletes the resource with the given structure id.
    void
    updateEntry(String sitePath)
    Updates the given entry.
    void
    updateEntry(org.opencms.util.CmsUUID entryId)
    Updates the given entry.
    void
    updateEntry(org.opencms.util.CmsUUID entryId, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback)
    Updates the given entry.
    void
    updateSingleEntry(org.opencms.util.CmsUUID entryId)
    Updates the given entry only, not evaluating any child changes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NEW_ENTRY_NAME

      public static final String NEW_ENTRY_NAME
      The name to use for new entries.
      See Also:
    • m_allDetailPageInfos

      protected Map<org.opencms.util.CmsUUID,org.opencms.ade.detailpage.CmsDetailPageInfo> m_allDetailPageInfos
      A map of *all* detail page info beans, indexed by page id.
    • m_data

      protected org.opencms.ade.sitemap.shared.CmsSitemapData m_data
      The sitemap data.
    • m_detailPageTable

      protected org.opencms.ade.sitemap.shared.CmsDetailPageTable m_detailPageTable
      The detail page table.
    • m_eventBus

      protected com.google.gwt.event.shared.SimpleEventBus m_eventBus
      The event bus.
  • Constructor Details

  • Method Details

    • editPropertiesForLocaleCompareMode

      public static void editPropertiesForLocaleCompareMode(org.opencms.ade.sitemap.shared.CmsLocaleComparePropertyData data, org.opencms.util.CmsUUID ownId, org.opencms.util.CmsUUID defaultFileId, String noEditReason)
      Opens the property editor for locale compare mode.

      Parameters:
      data - the data used by the property editor
      ownId - the id
      defaultFileId - the default file id
      noEditReason - the reason the properties can't be edited
    • safeLookup

      public static <A, B> B safeLookup(Map<A,B> map, A key)
      Helper method for looking up a value in a map which may be null.

      Type Parameters:
      A - the key type
      B - the value type
      Parameters:
      map - the map (which may be null)
      key - the map key
      Returns:
      the value of the map at the given key, or null if the map is null
    • addChangeHandler

      public com.google.gwt.event.shared.HandlerRegistration addChangeHandler(I_CmsSitemapChangeHandler handler)
      Adds a new change event handler.

      Parameters:
      handler - the handler to add
      Returns:
      the handler registration
    • addDetailPageInfo

      public void addDetailPageInfo(org.opencms.ade.detailpage.CmsDetailPageInfo info)
      Adds a new detail page information bean.

      Parameters:
      info - the detail page information bean to add
    • addLoadHandler

      public com.google.gwt.event.shared.HandlerRegistration addLoadHandler(I_CmsSitemapLoadHandler handler)
      Adds a new load event handler.

      Parameters:
      handler - the handler to add
      Returns:
      the handler registration
    • addPropertyUpdateHandler

      Adds a handler for property changes caused by user edits.

      Parameters:
      handler - a new handler for property updates caused by the user
    • addToNavigation

      public void addToNavigation(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Adds the entry to the navigation.

      Parameters:
      entry - the entry
    • bump

      public void bump(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Makes the given sitemap entry the default detail page for its detail page type.

      Parameters:
      entry - an entry representing a detail page
    • changeCategory

      public void changeCategory(org.opencms.util.CmsUUID id, String title, String name)
      Changes the given category.

      Parameters:
      id - the category id
      title - the new category title
      name - the new category name
    • clearDeletedList

      public void clearDeletedList()
      Clears the deleted clip-board list and commits the change.

    • clearModifiedList

      public void clearModifiedList()
      Clears the modified clip-board list and commits the change.

    • create

      public void create(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, int resourceTypeId, org.opencms.util.CmsUUID copyResourceId, String parameter, boolean isNewSitemap)
      Registers a new sitemap entry.

      Parameters:
      newEntry - the new entry
      parentId - the parent entry id
      resourceTypeId - the resource type id
      copyResourceId - the copy resource id
      parameter - an additional parameter which may contain more information needed to create the new resource
      isNewSitemap - a flag controlling whether a new sitemap should be created
    • createCategory

      public void createCategory(org.opencms.util.CmsUUID id, String title, String name)
      Creates a new category.

      Parameters:
      id - the parent category id, or the null uuid for a new top-level category
      title - the title of the category
      name - the name of the category
    • createNewGallery

      public void createNewGallery(org.opencms.util.CmsUUID parentId, int galleryTypeId, String title)
      Creates a new gallery folder of the given type.

      Parameters:
      parentId - the parent folder id
      galleryTypeId - the folder type id
      title - the folder title
    • createNewModelPage

      public void createNewModelPage(String title, String description, org.opencms.util.CmsUUID copyId, boolean isModelGroup)
      Creates a new model page.

      Parameters:
      title - the title of the model page
      description - the description of the model page
      copyId - the structure id of the resource which should be used as a copy model for the new page
      isModelGroup - in case of a model group page
    • createSitemapSubEntry

      public void createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, String sitemapType)
      Creates a sitemap folder.

      Parameters:
      newEntry - the new entry
      parentId - the entry parent id
      sitemapType - the resource type for the subsitemap folder
    • createSitemapSubEntry

      public void createSitemapSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, String sitemapFolderType)
      Creates a new sub-entry which is a subsitemap.

      Parameters:
      parent - the parent entry
      sitemapFolderType - the sitemap folder type
    • createSubEntry

      public void createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent)
      Creates a new sub-entry of an existing sitemap entry.

      Parameters:
      parent - the entry to which a new sub-entry should be added
    • createSubEntry

      public void createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, org.opencms.util.CmsUUID structureId)
      Creates a new sub-entry of an existing sitemap entry.

      Parameters:
      parent - the entry to which a new sub-entry should be added
      structureId - the structure id of the model page (if null, uses default model page)
    • createSubEntry

      public void createSubEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry newEntry, org.opencms.util.CmsUUID parentId, org.opencms.util.CmsUUID structureId)
      Registers a new sitemap entry.

      Parameters:
      newEntry - the new entry
      parentId - the parent entry id
      structureId - the structure id of the model page (if null, uses default model page)
    • createSubSitemap

      public void createSubSitemap(org.opencms.util.CmsUUID entryId)
      Creates a sub-sitemap from the subtree of the current sitemap starting at the given entry.

      Parameters:
      entryId - the id of the entry
    • delete

      public void delete(String sitePath)
      Deletes the given entry and all its descendants.

      Parameters:
      sitePath - the site path of the entry to delete
    • deleteCategory

      public void deleteCategory(org.opencms.util.CmsUUID id)
      Deletes a category.

      Parameters:
      id - the id of the category
    • disableModelPage

      public void disableModelPage(org.opencms.util.CmsUUID id, boolean disable)
      Disables the given model page entry within the configuration.

      Parameters:
      id - the entry id
      disable - true to disable the entry
    • edit

      public void edit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, CmsReloadMode reloadStatus)
      Edits the given sitemap entry.

      Parameters:
      entry - the sitemap entry to update
      propertyChanges - the property changes
      reloadStatus - a value indicating which entries need to be reloaded after the change
    • editAndChangeName

      public void editAndChangeName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String newUrlName, List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges, boolean keepNewStatus, CmsReloadMode reloadStatus)
      Edits an entry and changes its URL name.

      Parameters:
      entry - the entry which is being edited
      newUrlName - the new URL name of the entry
      propertyChanges - the property changes
      keepNewStatus - true if the entry should keep it's new status
      reloadStatus - a value indicating which entries need to be reloaded after the change
    • ensureUniqueName

      public void ensureUniqueName(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, String newName, I_CmsSimpleCallback<String> callback)
      Ensure the uniqueness of a given URL-name within the children of the given parent site-map entry.

      Parameters:
      parent - the parent entry
      newName - the proposed name
      callback - the callback to execute
    • ensureUniqueName

      public void ensureUniqueName(String parentFolder, String newName, I_CmsSimpleCallback<String> callback)
      Ensure the uniqueness of a given URL-name within the children of the given parent folder.

      Parameters:
      parentFolder - the parent folder
      newName - the proposed name
      callback - the callback to execute
    • executePropertyModification

      public void executePropertyModification(org.opencms.gwt.shared.property.CmsPropertyModification propMod)
      Applies the given property modification.

      Parameters:
      propMod - the property modification to apply
    • getCategoryData

      public org.opencms.ade.sitemap.shared.CmsSitemapCategoryData getCategoryData()
      Gets the category data.

      Returns:
      the category data
    • getChildren

      public void getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
      Retrieves the child entries of the given node from the server.

      Parameters:
      entryId - the entry id
      setOpen - if the entry should be opened
      callback - the callback to execute after the children have been loaded
    • getChildren

      public void getChildren(org.opencms.util.CmsUUID entryId, boolean setOpen, boolean continueIfParentNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
      Retrieves the child entries of the given node from the server.

      Parameters:
      entryId - the entry id
      setOpen - if the entry should be opened
      continueIfParentNotLoaded - if false, and the entry identified by the id has not been loaded, stop; else store the entry in memory
      callback - the callback to execute after the children have been loaded
    • getData

      public org.opencms.ade.sitemap.shared.CmsSitemapData getData()
      Returns the sitemap data.

      Returns:
      the sitemap data
    • getDetailPageInfo

      public org.opencms.ade.detailpage.CmsDetailPageInfo getDetailPageInfo(org.opencms.util.CmsUUID id)
      Returns the detail page info for a given entry id.

      Parameters:
      id - a sitemap entry id
      Returns:
      the detail page info for that id
    • getDetailPageTable

      public org.opencms.ade.sitemap.shared.CmsDetailPageTable getDetailPageTable()
      Returns the detail page table.

      Returns:
      the detail page table
    • getEffectiveProperty

      public String getEffectiveProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
      Gets the effective value of a property value for a sitemap entry.

      Parameters:
      entry - the sitemap entry
      name - the name of the property
      Returns:
      the effective value
    • getEffectivePropertyObject

      public org.opencms.gwt.shared.property.CmsClientProperty getEffectivePropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
      Gets the value of a property which is effective at a given sitemap entry.

      Parameters:
      entry - the sitemap entry
      name - the name of the property
      Returns:
      the effective property value
    • getEntriesById

      public Map<org.opencms.util.CmsUUID,org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> getEntriesById(Collection<org.opencms.util.CmsUUID> ids)
      Returns all entries with an id from a given list.

      Parameters:
      ids - a list of sitemap entry ids
      Returns:
      all entries whose id is contained in the id list
    • getEntry

      public org.opencms.ade.sitemap.shared.CmsClientSitemapEntry getEntry(String entryPath)
      Returns the tree entry with the given path.

      Parameters:
      entryPath - the path to look for
      Returns:
      the tree entry with the given path, or null if not found
    • getEntryById

      public org.opencms.ade.sitemap.shared.CmsClientSitemapEntry getEntryById(org.opencms.util.CmsUUID id)
      Finds an entry by id.

      Parameters:
      id - the id of the entry to find
      Returns:
      the found entry, or null if the entry wasn't found
    • getGalleryType

      public org.opencms.ade.sitemap.shared.CmsGalleryType getGalleryType(Integer typeId)
      Returns the gallery type with the given id.

      Parameters:
      typeId - the type id
      Returns:
      the gallery type
    • getInheritedProperty

      public String getInheritedProperty(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
      Gets the value for a property which a sitemap entry would inherit if it didn't have its own properties.

      Parameters:
      entry - the sitemap entry
      name - the property name
      Returns:
      the inherited property value
    • getInheritedPropertyObject

      public org.opencms.gwt.shared.property.CmsClientProperty getInheritedPropertyObject(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String name)
      Gets the property object which would be inherited by a sitemap entry.

      Parameters:
      entry - the sitemap entry
      name - the name of the property
      Returns:
      the property object which would be inherited
    • getLoadedDescendants

      public List<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> getLoadedDescendants(String path)
      Returns a list of all descendant sitemap entries of a given path which have already been loaded on the client.

      Parameters:
      path - the path for which the descendants should be collected
      Returns:
      the list of descendant sitemap entries
    • getNoEditReason

      public String getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Returns the no edit reason or null if editing is allowed.

      Parameters:
      entry - the entry to get the no edit reason for
      Returns:
      the no edit reason
    • getNoEditReason

      public String getNoEditReason(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, boolean checkChildLocks)
      Returns the no edit reason or null if editing is allowed.

      Parameters:
      entry - the entry to get the no edit reason for
      checkChildLocks - true if locks of children should be checked
      Returns:
      the no edit reason
    • getParentEntry

      public org.opencms.ade.sitemap.shared.CmsClientSitemapEntry getParentEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Returns the parent entry of a sitemap entry, or null if it is the root entry.

      Parameters:
      entry - a sitemap entry
      Returns:
      the parent entry or null
    • getPropertiesForId

      public Map<String,org.opencms.gwt.shared.property.CmsClientProperty> getPropertiesForId(org.opencms.util.CmsUUID id)
      Gets the properties for a given structure id.

      Specified by:
      getPropertiesForId in interface org.opencms.ade.sitemap.shared.I_CmsSitemapController
      Parameters:
      id - the structure id of a sitemap entry
      Returns:
      the properties for that structure id
    • getService

      public org.opencms.ade.sitemap.shared.rpc.I_CmsSitemapServiceAsync getService()
      Returns the sitemap service instance.

      Returns:
      the sitemap service instance
    • gotoParentSitemap

      public void gotoParentSitemap()
      Leaves the current sitemap to open the parent sitemap.

    • hideInNavigation

      public void hideInNavigation(org.opencms.util.CmsUUID entryId)
      Hides the entry within the site navigation.

      Hidden entries will still be visible in the navigation mode of the sitemap editor. They will also have a NavText and a NavPos. Only when using the NavBuilder get navigation for folder method, they will not be included.

      Parameters:
      entryId - the entry id
    • isDetailPage

      public boolean isDetailPage(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Checks whether this entry belongs to a detail page.

      Parameters:
      entry - the entry to check
      Returns:
      true if this entry belongs to a detail page
    • isDetailPage

      public boolean isDetailPage(org.opencms.util.CmsUUID id)
      Returns true if the id is the id of a detail page.

      Parameters:
      id - the sitemap entry id
      Returns:
      true if the id is the id of a detail page entry
    • isEditable

      public boolean isEditable()
      Checks if the current sitemap is editable.

      Returns:
      true if the current sitemap is editable
    • isHiddenProperty

      public boolean isHiddenProperty(String propertyName)
      Checks whether a string is the name of a hidden property.

      A hidden property is a property which should not appear in the property editor because it requires special treatment.

      Parameters:
      propertyName - the property name which should be checked
      Returns:
      true if the argument is the name of a hidden property
    • isLocaleComparisonEnabled

      public boolean isLocaleComparisonEnabled()
      Returns true if the locale comparison mode is enabled.

      Returns:
      true if the locale comparison mode is enabled
    • isRoot

      public boolean isRoot(String sitePath)
      Checks if the given site path is the sitemap root.

      Parameters:
      sitePath - the site path to check
      Returns:
      true if the given site path is the sitemap root
    • leaveEditor

      public void leaveEditor(String target)
      Ask to save the page before leaving, if necessary.

      Parameters:
      target - the leaving target
    • loadCategories

      public void loadCategories(boolean openLocalCategories, org.opencms.util.CmsUUID openItemId)
      Loads and displays the category data.

      Parameters:
      openLocalCategories - true if the local category tree should be opened
      openItemId - the id of the item to open
    • loadGalleries

      public void loadGalleries()
      Loads all available galleries for the current sub site.

    • loadModelPages

      public void loadModelPages()
      Loads the model pages.

    • loadNewElementInfo

      public void loadNewElementInfo(com.google.gwt.user.client.rpc.AsyncCallback<Void> callback)
      Loads the new element info.

      Parameters:
      callback - the callback to call when done
    • loadPath

      public void loadPath(String sitePath)
      Loads all entries on the given path.

      Parameters:
      sitePath - the site path
    • loadPath

      public void loadPath(String sitePath, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
      Loads the sitemap entry for the given site path.

      Parameters:
      sitePath - the site path
      callback - the callback
    • loadPath

      public void loadPath(String sitePath, boolean continueIfNotLoaded, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
      Loads all entries on the given path.

      Parameters:
      sitePath - the site path
      continueIfNotLoaded - parameter passed to getChildren
      callback - the callback to execute when done
    • mergeSubSitemap

      public void mergeSubSitemap(org.opencms.util.CmsUUID entryId)
      Merges a subsitemap at the given id back into this sitemap.

      Parameters:
      entryId - the id of the sub sitemap entry
    • move

      public void move(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String toPath, int position)
      Moves the given sitemap entry with all its descendants to the new position.

      Parameters:
      entry - the sitemap entry to move
      toPath - the destination path
      position - the new position between its siblings
    • openPropertyDialogForVaadin

      public void openPropertyDialogForVaadin(org.opencms.util.CmsUUID structureId, org.opencms.util.CmsUUID rootId)
      Opens the property dialog for the locale comparison mode.

      Parameters:
      structureId - the structure id of the sitemap entry to edit
      rootId - the structure id of the resource comparing to the tree root in sitemap compare mode
    • openSiteMap

      public void openSiteMap(String sitePath)
      Opens the site-map specified.

      Parameters:
      sitePath - the site path to the site-map folder
    • openSiteMap

      public void openSiteMap(String sitePath, boolean siteChange)
      Opens the site-map specified.

      Parameters:
      sitePath - the site path to the site-map folder
      siteChange - in case the site was changed
    • recomputeProperties

      public void recomputeProperties()
      Recomputes properties for all sitemap entries.

    • refreshRoot

      public void refreshRoot(com.google.gwt.user.client.rpc.AsyncCallback<Void> callback)
      Refreshes the root entry.

      Parameters:
      callback - the callback to call after the entry has been refreshed
    • registerEntry

      public void registerEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Specified by:
      registerEntry in interface org.opencms.ade.sitemap.shared.I_CmsSitemapController
      See Also:
      • I_CmsSitemapController.registerEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry)
    • registerPathChange

      public void registerPathChange(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String oldPath)
      Specified by:
      registerPathChange in interface org.opencms.ade.sitemap.shared.I_CmsSitemapController
      See Also:
      • I_CmsSitemapController.registerPathChange(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry, java.lang.String)
    • removeFromNavigation

      public void removeFromNavigation(org.opencms.util.CmsUUID entryId)
      Removes the entry with the given site-path from navigation.

      Parameters:
      entryId - the entry id
    • removeModelPage

      public void removeModelPage(org.opencms.util.CmsUUID id, com.google.gwt.user.client.rpc.AsyncCallback<Void> asyncCallback)
      Removes a model page from the sitemap's configuration.

      Parameters:
      id - the structure id of the model page
      asyncCallback - the callback to call when done
    • replaceProperties

      public Map<String,org.opencms.gwt.shared.property.CmsClientProperty> replaceProperties(org.opencms.util.CmsUUID id, Map<String,org.opencms.gwt.shared.property.CmsClientProperty> properties)
      Specified by:
      replaceProperties in interface org.opencms.ade.sitemap.shared.I_CmsSitemapController
      See Also:
      • I_CmsSitemapController.replaceProperties(org.opencms.util.CmsUUID, java.util.Map)
    • setEditorModeInSession

      public void setEditorModeInSession(org.opencms.ade.sitemap.shared.CmsSitemapData.EditorMode editorMode)
      Sets the editor mode in the user session.

      Parameters:
      editorMode - the editor mode
    • showInNavigation

      public void showInNavigation(org.opencms.util.CmsUUID entryId)
      Shows a formerly hidden entry in the navigation.

      Parameters:
      entryId - the entry id
      See Also:
    • undelete

      public void undelete(org.opencms.util.CmsUUID entryId, String sitePath)
      Undeletes the resource with the given structure id.

      Parameters:
      entryId - the entry id
      sitePath - the site-path
    • updateEntry

      public void updateEntry(org.opencms.util.CmsUUID entryId)
      Updates the given entry.

      Parameters:
      entryId - the entry id
    • updateEntry

      public void updateEntry(org.opencms.util.CmsUUID entryId, com.google.gwt.user.client.rpc.AsyncCallback<Void> callback)
      Updates the given entry.

      Parameters:
      entryId - the entry id
      callback - the callback to call after the entry has been updated
    • updateEntry

      public void updateEntry(String sitePath)
      Updates the given entry.

      Parameters:
      sitePath - the entry sitepath
    • updateSingleEntry

      public void updateSingleEntry(org.opencms.util.CmsUUID entryId)
      Updates the given entry only, not evaluating any child changes.

      Parameters:
      entryId - the entry id
    • applyChange

      protected void applyChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change)
      Fires a sitemap change event.

      Parameters:
      change - the change event to fire
    • commitChange

      protected void commitChange(org.opencms.ade.sitemap.shared.CmsSitemapChange change, com.google.gwt.user.client.Command callback)
      Adds a change to the queue.

      Parameters:
      change - the change to commit
      callback - the callback to execute after the change has been applied
    • getChangeForEdit

      protected org.opencms.ade.sitemap.shared.CmsSitemapChange getChangeForEdit(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, List<org.opencms.gwt.shared.property.CmsPropertyModification> propertyChanges)
      Creates a change object for an edit operation.

      Parameters:
      entry - the edited sitemap entry
      propertyChanges - the list of property changes
      Returns:
      the change object
    • getEntryPoint

      protected String getEntryPoint()
      Returns the URI of the current sitemap.

      Returns:
      the URI of the current sitemap
    • getPath

      protected String getPath(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry, String newUrlName)
      Helper method for getting the full path of a sitemap entry whose URL name is being edited.

      Parameters:
      entry - the sitemap entry
      newUrlName - the new url name of the sitemap entry
      Returns:
      the new full site path of the sitemap entry
    • getVfsService

      protected org.opencms.gwt.shared.rpc.I_CmsVfsServiceAsync getVfsService()
      Returns the sitemap service instance.

      Returns:
      the sitemap service instance
    • initDetailPageInfos

      protected void initDetailPageInfos()
      Initializes the detail page information.

    • makeNewEntry

      protected void makeNewEntry(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry parent, I_CmsSimpleCallback<org.opencms.ade.sitemap.shared.CmsClientSitemapEntry> callback)
      Creates a new client sitemap entry bean to use for the RPC call which actually creates the entry on the server side.

      Parameters:
      parent - the parent entry
      callback - the callback to execute
    • recomputeProperties

      protected void recomputeProperties(org.opencms.ade.sitemap.shared.CmsClientSitemapEntry entry)
      Recomputes the properties for a client sitemap entry.

      Parameters:
      entry - the entry for whose descendants the properties should be recomputed