Class CmsGalleryController

  • All Implemented Interfaces:
    com.google.gwt.event.logical.shared.HasValueChangeHandlers<org.opencms.ade.galleries.shared.CmsGallerySearchBean>, com.google.gwt.event.shared.HasHandlers

    public class CmsGalleryController
    extends java.lang.Object
    implements com.google.gwt.event.logical.shared.HasValueChangeHandlers<org.opencms.ade.galleries.shared.CmsGallerySearchBean>
    Gallery dialog controller.

    This class handles the communication between gallery dialog and the server. It contains the gallery data, but no references to the gallery dialog widget.

    Since:
    8.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int m_currentCallId
      The current load results call id.
      protected org.opencms.ade.galleries.shared.CmsGalleryDataBean m_dialogBean
      The gallery dialog bean.
      protected org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode m_dialogMode
      The gallery dialog mode.
      protected com.google.gwt.event.shared.SimpleEventBus m_eventBus
      The event bus.
      protected CmsGalleryControllerHandler m_handler
      The gallery controller handler.
      protected boolean m_loading
      Flag to indicate that a load results request is currently running.
      protected org.opencms.ade.galleries.shared.CmsGallerySearchBean m_searchObject
      The gallery search object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCategory​(java.lang.String categoryPath)
      Add category to search object.
      void addDateCreatedEnd​(long end)
      Sets the created until date to the search object.
      void addDateCreatedStart​(long start)
      Sets the created since date to the search object.
      void addDateModifiedEnd​(long end)
      Sets the modified until date to the search object.
      void addDateModifiedStart​(long start)
      Sets the modified since date to the search object.
      void addFolder​(java.lang.String folder)
      Adds a folder to the current search object.
      void addGallery​(java.lang.String galleryPath)
      Add gallery to search object.
      void addLocale​(java.lang.String locale)
      Sets the locale to the search object.
      void addScope​(org.opencms.ade.galleries.shared.CmsGallerySearchScope scope)
      Sets the search scope in the search object.
      void addSearchQuery​(java.lang.String searchQuery)
      Adds the search query from the search tab.
      void addType​(java.lang.String resourceType)
      Add type to search object.
      com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.ade.galleries.shared.CmsGallerySearchBean> handler)  
      void clearCategories()
      Removes all selected categories from the search object.
      void clearFolders​(boolean searchChanged)
      Removes all selected folders from the search object.
      void clearGalleries()
      Removes all selected galleries from the search object.
      void clearTextSearch()
      Removes all full text search criteria from the search object.
      void clearTypes()
      Removes all selected types from the search object.
      static org.opencms.ade.galleries.shared.rpc.I_CmsGalleryServiceAsync createGalleryService()
      Creates a gallery service instance.
      void deleteResource​(java.lang.String resourcePath)
      Checks for broken links, ask for confirmation and finally deletes the given resource.
      void fireEvent​(com.google.gwt.event.shared.GwtEvent<?> event)  
      java.util.List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> getAvailableGalleries()
      Gets the available galleries.
      java.util.Map<java.lang.String,​java.lang.String> getAvailableLocales()
      Returns the available locales.
      org.opencms.ade.galleries.shared.CmsGallerySearchScope getDefaultScope()
      Gets the default search scope.
      java.lang.String getDefaultSitemapTabSiteRoot()
      Gets the default site root for the sitemap tab.
      java.lang.String getDefaultVfsTabSiteRoot()
      Gets the default site root for the VFS tab.
      org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode getDialogMode()
      Returns the gallery dialog mode.
      org.opencms.ade.galleries.shared.CmsGalleryFolderBean getGalleryInfo​(java.lang.String galleryPath)
      Returns the gallery folder info to the given path.
      static org.opencms.ade.galleries.shared.rpc.I_CmsGalleryServiceAsync getGalleryService()
      Returns the gallery service instance.
      java.lang.String getPreselectOption​(java.lang.String siteRoot, java.util.List<org.opencms.ade.galleries.shared.CmsSiteSelectorOption> options)
      Gets the option which should be preselected for the site selector, or null.
      java.lang.String getResultViewType()
      Returns the result view type.
      java.lang.String getSearchLocale()
      Returns the search locale.
      org.opencms.ade.galleries.shared.CmsGallerySearchScope getSearchScope()
      Returns the gallery search scope.
      java.util.List<org.opencms.ade.galleries.shared.CmsResourceTypeBean> getSearchTypes()
      Returns the searchable resource types.
      boolean getShowExpiredDefault()
      Returns the default value for the "show expired" check box.
      java.util.List<org.opencms.ade.galleries.shared.CmsSiteSelectorOption> getSitemapSiteSelectorOptions()
      Gets the sitemap site selector options.
      java.lang.String getStartLocale()
      Returns the start locale.
      java.lang.String getStartSiteRoot()
      Gets the start site root.
      void getSubEntries​(java.lang.String rootPath, boolean isRoot, java.lang.String filter, I_CmsSimpleCallback<java.util.List<org.opencms.ade.galleries.shared.CmsSitemapEntryBean>> callback)
      Loads the sub entries for the given path.
      void getSubFolders​(java.lang.String folder, com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<org.opencms.ade.galleries.shared.CmsVfsEntryBean>> callback)
      Retrieves the sub-folders of a given folder.
      org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId[] getTabIds()
      Returns the configured tab id's.
      java.lang.String getTreeToken()
      Gets the tree token, which is used to determine which tree state is loaded/saved for the VFS and sitemap tabs.
      org.opencms.ade.galleries.shared.CmsResourceTypeBean getTypeInfo​(java.lang.String typeName)
      Returns the resource type info for the given resource type name.
      protected org.opencms.gwt.shared.rpc.I_CmsVfsServiceAsync getVfsService()
      Returns the sitemap service instance.
      java.util.List<org.opencms.ade.galleries.shared.CmsSiteSelectorOption> getVfsSiteSelectorOptions()
      Gets the site selector options.
      boolean hasGalleriesSelectable()
      Returns true if the galleries in the gallery tab should be selectable.
      boolean hasPreview​(java.lang.String resourceType)
      Returns if a preview is available for the given resource type.
      boolean hasResultsSelectable()
      Returns false if the results in the result tab should not be selectable.
      boolean hasSelectFolder()
      Returns if folders should be selectable.
      boolean hasSelectResource()
      Returns if resource entries in the search result are selectable.
      protected void internalDeleteResource​(java.lang.String resourcePath)
      Deletes a resource.
      boolean isIncludeFiles()
      Returns if files are included.
      boolean isLoading()
      Returns if a load results request is currently running.
      boolean isOpenInResults()
      Checks if the gallery is first opened in results tab.
      boolean isSearchObjectChanged()
      Returns true, if the search object was manipulated by the controller false otherwise.
      boolean isSearchObjectEmpty()
      Checks if any search parameter are selected.
      boolean isShowSiteSelector()
      Returns true if the site selector should be shown.
      void loadVfsEntryBean​(java.lang.String siteRoot, java.lang.String filter, com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.galleries.shared.CmsVfsEntryBean> asyncCallback)
      Loads the root VFS entry bean for a given site selector option.
      void openPreview​(java.lang.String resourcePath, java.lang.String resourceType)
      Opens the preview for the given resource by the given resource type.
      static void registerPreviewFactory​(java.lang.String previewProviderName, I_CmsPreviewFactory factory)
      Registers a preview factory for the given name.
      void removeCategory​(java.lang.String categoryPath)
      Remove the category from the search object.
      void removeCategoryParam​(java.lang.String key)
      Removes the category from the search object.
      void removeFolder​(java.lang.String folder)
      Removes a folder from the current search object.
      void removeFolderParam​(java.lang.String key)
      Removes the folder from the search object.
      void removeGallery​(java.lang.String galleryPath)
      Remove the gallery from the search object.
      void removeGalleryParam​(java.lang.String key)
      Removes a selected gallery from the search object.
      void removeQuery()
      Removes the query.
      void removeScope()
      Removes the search scope.
      protected void removeTab​(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId tabId)
      Removes a tab id from the internal list of tab ids.
      void removeTextSearchParameter​(java.lang.String key)
      Removes the given full text search criteria from the search object.
      void removeType​(java.lang.String resourceType)
      Remove the type from the search object.
      void removeTypeParam​(java.lang.String key)
      Removes the type from the search object.
      protected void removeTypesTab()
      Removes the types tab from the list of configured tabs.
      void saveTreeState​(java.lang.String treeName, java.lang.String siteRoot, java.util.Set<org.opencms.util.CmsUUID> openItemIds)
      Saves the tree state for a given tree on the server.
      void searchElement​(java.lang.String path, java.lang.Runnable nextAction)
      Searches for a specific element and opens it's preview if found.
      void selectResource​(java.lang.String resourcePath, org.opencms.util.CmsUUID structureId, java.lang.String title, java.lang.String resourceType)
      Selects the given resource and sets its path into the xml-content field or editor link.
      void selectResultTab()
      Selects the result tab.
      void setHandler​(CmsGalleryControllerHandler handler)
      Sets the controller handler for gallery dialog.
      void setIncludeExpired​(boolean includeExpired, boolean fireEvent)
      Sets if the search should include expired or unreleased resources.
      void setResultViewType​(java.lang.String resultViewType)
      Stores the result view type.
      void setSearchObjectChanged()
      Sets the search object changed flag to true.
      void setShowSiteSelector​(boolean isShowSiteSelector)
      Sets the "Show site selector" option.
      void setStartSite​(java.lang.String startSite)
      Sets the start site.
      void sortCategories​(java.lang.String sortParams, java.lang.String filter)
      Sorts the categories according to given parameters and updates the list.
      void sortGalleries​(java.lang.String sortParams, java.lang.String filter)
      Sorts the galleries according to given parameters and updates the list.
      void sortResults​(java.lang.String sortParams)
      Sorts the results according to given parameters and updates the list.
      void sortTypes​(java.lang.String sortParams)
      Sorts the types according to given parameters and updates the list.
      void updateActiveTabSize()
      Updates the size of the active tab.
      void updateCategoriesTab()
      Updates the content of the categories tab.
      void updateGalleriesTab()
      Updates the content of the galleries(folders) tab.
      void updateGalleryData​(org.opencms.ade.galleries.shared.CmsGalleryDataBean data)
      Updates the gallery data.
      void updateIndex()
      Updates the gallery index and triggers a new search afterwards.
      void updateResultsTab​(boolean isNextPage)
      Updates the content of the results tab.
      void updatesTypesTab()
      Updates the content of the types tab.
      • Methods inherited from class java.lang.Object

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

      • m_currentCallId

        protected int m_currentCallId
        The current load results call id.
      • m_dialogBean

        protected org.opencms.ade.galleries.shared.CmsGalleryDataBean m_dialogBean
        The gallery dialog bean.
      • m_dialogMode

        protected org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode m_dialogMode
        The gallery dialog mode.
      • m_eventBus

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

        protected boolean m_loading
        Flag to indicate that a load results request is currently running.
      • m_searchObject

        protected org.opencms.ade.galleries.shared.CmsGallerySearchBean m_searchObject
        The gallery search object.
    • Constructor Detail

      • CmsGalleryController

        public CmsGalleryController​(CmsGalleryControllerHandler handler,
                                    org.opencms.ade.galleries.shared.CmsGalleryDataBean dialogBean,
                                    org.opencms.ade.galleries.shared.CmsGallerySearchBean searchBean)
        Constructor.

        Parameters:
        handler - the controller handler
        dialogBean - the gallery data
        searchBean - the prefetched search
      • CmsGalleryController

        public CmsGalleryController​(CmsGalleryControllerHandler handler,
                                    org.opencms.ade.galleries.shared.I_CmsGalleryConfiguration conf)
        Constructor.

        Parameters:
        handler - the controller handler
        conf - the gallery configuration
    • Method Detail

      • createGalleryService

        public static org.opencms.ade.galleries.shared.rpc.I_CmsGalleryServiceAsync createGalleryService()
        Creates a gallery service instance.

        Returns:
        the gallery service instance
      • getGalleryService

        public static org.opencms.ade.galleries.shared.rpc.I_CmsGalleryServiceAsync getGalleryService()
        Returns the gallery service instance.

        Returns:
        the gallery service instance
      • registerPreviewFactory

        public static void registerPreviewFactory​(java.lang.String previewProviderName,
                                                  I_CmsPreviewFactory factory)
        Registers a preview factory for the given name.
        Parameters:
        previewProviderName - the preview provider name
        factory - the preview factory
      • addCategory

        public void addCategory​(java.lang.String categoryPath)
        Add category to search object.

        Parameters:
        categoryPath - the id of the category to add
      • addDateCreatedEnd

        public void addDateCreatedEnd​(long end)
        Sets the created until date to the search object.

        Parameters:
        end - the created until date as long
      • addDateCreatedStart

        public void addDateCreatedStart​(long start)
        Sets the created since date to the search object.

        Parameters:
        start - the created since date as long
      • addDateModifiedEnd

        public void addDateModifiedEnd​(long end)
        Sets the modified until date to the search object.

        Parameters:
        end - the modified until date as long
      • addDateModifiedStart

        public void addDateModifiedStart​(long start)
        Sets the modified since date to the search object.

        Parameters:
        start - the modified since date as long
      • addFolder

        public void addFolder​(java.lang.String folder)
        Adds a folder to the current search object.

        Parameters:
        folder - the folder to add
      • addGallery

        public void addGallery​(java.lang.String galleryPath)
        Add gallery to search object.

        Parameters:
        galleryPath - the id of the gallery to add
      • addLocale

        public void addLocale​(java.lang.String locale)
        Sets the locale to the search object.

        Parameters:
        locale - the locale to set
      • addScope

        public void addScope​(org.opencms.ade.galleries.shared.CmsGallerySearchScope scope)
        Sets the search scope in the search object.

        Parameters:
        scope - the search scope
      • addSearchQuery

        public void addSearchQuery​(java.lang.String searchQuery)
        Adds the search query from the search tab.

        Parameters:
        searchQuery - the search query
      • addType

        public void addType​(java.lang.String resourceType)
        Add type to search object.

        Parameters:
        resourceType - the id(name?) of the resource type to add
      • addValueChangeHandler

        public com.google.gwt.event.shared.HandlerRegistration addValueChangeHandler​(com.google.gwt.event.logical.shared.ValueChangeHandler<org.opencms.ade.galleries.shared.CmsGallerySearchBean> handler)
        Specified by:
        addValueChangeHandler in interface com.google.gwt.event.logical.shared.HasValueChangeHandlers<org.opencms.ade.galleries.shared.CmsGallerySearchBean>
        See Also:
        HasValueChangeHandlers.addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)
      • clearCategories

        public void clearCategories()
        Removes all selected categories from the search object.

      • clearFolders

        public void clearFolders​(boolean searchChanged)
        Removes all selected folders from the search object.

        Parameters:
        searchChanged - if true, marks the search parameters as changed
      • clearGalleries

        public void clearGalleries()
        Removes all selected galleries from the search object.

      • clearTextSearch

        public void clearTextSearch()
        Removes all full text search criteria from the search object.

      • clearTypes

        public void clearTypes()
        Removes all selected types from the search object.

      • deleteResource

        public void deleteResource​(java.lang.String resourcePath)
        Checks for broken links, ask for confirmation and finally deletes the given resource.

        Parameters:
        resourcePath - the resource path of the resource to delete
      • fireEvent

        public void fireEvent​(com.google.gwt.event.shared.GwtEvent<?> event)
        Specified by:
        fireEvent in interface com.google.gwt.event.shared.HasHandlers
        See Also:
        HasHandlers.fireEvent(com.google.gwt.event.shared.GwtEvent)
      • getAvailableGalleries

        public java.util.List<org.opencms.ade.galleries.shared.CmsGalleryFolderBean> getAvailableGalleries()
        Gets the available galleries.

        Returns:
        the list of available galleries
      • getAvailableLocales

        public java.util.Map<java.lang.String,​java.lang.String> getAvailableLocales()
        Returns the available locales.

        Returns:
        the available locales
      • getDefaultScope

        public org.opencms.ade.galleries.shared.CmsGallerySearchScope getDefaultScope()
        Gets the default search scope.

        Returns:
        the default search scope
      • getDefaultSitemapTabSiteRoot

        public java.lang.String getDefaultSitemapTabSiteRoot()
        Gets the default site root for the sitemap tab.

        Returns:
        the default site root for the sitemap tab
      • getDefaultVfsTabSiteRoot

        public java.lang.String getDefaultVfsTabSiteRoot()
        Gets the default site root for the VFS tab.

        Returns:
        the default site root for the VFS tab
      • getDialogMode

        public org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryMode getDialogMode()
        Returns the gallery dialog mode.

        Returns:
        the gallery dialog mode
      • getGalleryInfo

        public org.opencms.ade.galleries.shared.CmsGalleryFolderBean getGalleryInfo​(java.lang.String galleryPath)
        Returns the gallery folder info to the given path.

        Parameters:
        galleryPath - the gallery folder path
        Returns:
        the gallery folder info
      • getPreselectOption

        public java.lang.String getPreselectOption​(java.lang.String siteRoot,
                                                   java.util.List<org.opencms.ade.galleries.shared.CmsSiteSelectorOption> options)
        Gets the option which should be preselected for the site selector, or null.

        Parameters:
        siteRoot - the site root
        options - the list of options
        Returns:
        the key for the option to preselect
      • getResultViewType

        public java.lang.String getResultViewType()
        Returns the result view type.

        Returns:
        the result view type
      • getSearchLocale

        public java.lang.String getSearchLocale()
        Returns the search locale.

        Returns:
        the search locale
      • getSearchScope

        public org.opencms.ade.galleries.shared.CmsGallerySearchScope getSearchScope()
        Returns the gallery search scope.

        Returns:
        the gallery search scope
      • getSearchTypes

        public java.util.List<org.opencms.ade.galleries.shared.CmsResourceTypeBean> getSearchTypes()
        Returns the searchable resource types.

        Returns:
        the searchable resource types
      • getShowExpiredDefault

        public boolean getShowExpiredDefault()
        Returns the default value for the "show expired" check box.

        Returns:
        the default value for "show expired"
      • getSitemapSiteSelectorOptions

        public java.util.List<org.opencms.ade.galleries.shared.CmsSiteSelectorOption> getSitemapSiteSelectorOptions()
        Gets the sitemap site selector options.

        Returns:
        the sitemap site selector options
      • getStartLocale

        public java.lang.String getStartLocale()
        Returns the start locale.

        Returns:
        the start locale
      • getStartSiteRoot

        public java.lang.String getStartSiteRoot()
        Gets the start site root.

        Returns:
        the start site root
      • getSubEntries

        public void getSubEntries​(java.lang.String rootPath,
                                  boolean isRoot,
                                  java.lang.String filter,
                                  I_CmsSimpleCallback<java.util.List<org.opencms.ade.galleries.shared.CmsSitemapEntryBean>> callback)
        Loads the sub entries for the given path.

        Parameters:
        rootPath - the root path
        isRoot - true if the requested entry is the root entry
        filter - the sitemap filter string
        callback - the callback to execute with the result
      • getSubFolders

        public void getSubFolders​(java.lang.String folder,
                                  com.google.gwt.user.client.rpc.AsyncCallback<java.util.List<org.opencms.ade.galleries.shared.CmsVfsEntryBean>> callback)
        Retrieves the sub-folders of a given folder.

        Parameters:
        folder - the folder whose sub-folders should be retrieved
        callback - the callback for processing the sub-folders
      • getTabIds

        public org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId[] getTabIds()
        Returns the configured tab id's.

        Returns:
        the configured tab id's
      • getTreeToken

        public java.lang.String getTreeToken()
        Gets the tree token, which is used to determine which tree state is loaded/saved for the VFS and sitemap tabs.

        Returns:
        the tree token
      • getTypeInfo

        public org.opencms.ade.galleries.shared.CmsResourceTypeBean getTypeInfo​(java.lang.String typeName)
        Returns the resource type info for the given resource type name.

        Parameters:
        typeName - the resource type name
        Returns:
        the type info
      • getVfsSiteSelectorOptions

        public java.util.List<org.opencms.ade.galleries.shared.CmsSiteSelectorOption> getVfsSiteSelectorOptions()
        Gets the site selector options.

        Returns:
        the site selector options
      • hasGalleriesSelectable

        public boolean hasGalleriesSelectable()
        Returns true if the galleries in the gallery tab should be selectable.

        Returns:
        true if the galleries should be selectable
      • hasPreview

        public boolean hasPreview​(java.lang.String resourceType)
        Returns if a preview is available for the given resource type.

        Parameters:
        resourceType - the requested resource type
        Returns:
        true if a preview is available for the given resource type
      • hasResultsSelectable

        public boolean hasResultsSelectable()
        Returns false if the results in the result tab should not be selectable.

        Returns:
        false if the results in the result tab should not be selectable
      • hasSelectFolder

        public boolean hasSelectFolder()
        Returns if folders should be selectable.

        Returns:
        true if folders should be selectable
      • hasSelectResource

        public boolean hasSelectResource()
        Returns if resource entries in the search result are selectable.

        Returns:
        if resource entries in the search result are selectable
      • isIncludeFiles

        public boolean isIncludeFiles()
        Returns if files are included.

        Returns:
        true if files are included
      • isLoading

        public boolean isLoading()
        Returns if a load results request is currently running.

        Returns:
        true if a load results request is currently running
      • isOpenInResults

        public boolean isOpenInResults()
        Checks if the gallery is first opened in results tab.

        Returns:
        true if gallery is first opened in results tab, false otherwise
      • isSearchObjectChanged

        public boolean isSearchObjectChanged()
        Returns true, if the search object was manipulated by the controller false otherwise.

        Returns:
        the search object changed flag
      • isSearchObjectEmpty

        public boolean isSearchObjectEmpty()
        Checks if any search parameter are selected.

        Returns:
        false if any search parameter is selected, true if there are no search parameter selected
      • isShowSiteSelector

        public boolean isShowSiteSelector()
        Returns true if the site selector should be shown.

        Returns:
        true if the site selector should be shown
      • loadVfsEntryBean

        public void loadVfsEntryBean​(java.lang.String siteRoot,
                                     java.lang.String filter,
                                     com.google.gwt.user.client.rpc.AsyncCallback<org.opencms.ade.galleries.shared.CmsVfsEntryBean> asyncCallback)
        Loads the root VFS entry bean for a given site selector option.

        Parameters:
        siteRoot - the site root for which the VFS entry should be loaded
        filter - the search filter
        asyncCallback - the callback to call with the result
      • openPreview

        public void openPreview​(java.lang.String resourcePath,
                                java.lang.String resourceType)
        Opens the preview for the given resource by the given resource type.

        Parameters:
        resourcePath - the resource path
        resourceType - the resource type name
      • removeCategory

        public void removeCategory​(java.lang.String categoryPath)
        Remove the category from the search object.

        Parameters:
        categoryPath - the category path as id
      • removeCategoryParam

        public void removeCategoryParam​(java.lang.String key)
        Removes the category from the search object.

        Parameters:
        key - the category
      • removeFolder

        public void removeFolder​(java.lang.String folder)
        Removes a folder from the current search object.

        Parameters:
        folder - the folder to remove
      • removeFolderParam

        public void removeFolderParam​(java.lang.String key)
        Removes the folder from the search object.

        Parameters:
        key - the folder
      • removeGallery

        public void removeGallery​(java.lang.String galleryPath)
        Remove the gallery from the search object.

        Parameters:
        galleryPath - the gallery path as id
      • removeGalleryParam

        public void removeGalleryParam​(java.lang.String key)
        Removes a selected gallery from the search object.

        Parameters:
        key - the gallery key
      • removeQuery

        public void removeQuery()
        Removes the query.
      • removeScope

        public void removeScope()
        Removes the search scope.
      • removeTextSearchParameter

        public void removeTextSearchParameter​(java.lang.String key)
        Removes the given full text search criteria from the search object.

        Parameters:
        key - the key of the parameter to remove
      • removeType

        public void removeType​(java.lang.String resourceType)
        Remove the type from the search object.

        Parameters:
        resourceType - the resource type as id
      • removeTypeParam

        public void removeTypeParam​(java.lang.String key)
        Removes the type from the search object.

        Parameters:
        key - the type
      • saveTreeState

        public void saveTreeState​(java.lang.String treeName,
                                  java.lang.String siteRoot,
                                  java.util.Set<org.opencms.util.CmsUUID> openItemIds)
        Saves the tree state for a given tree on the server.

        Parameters:
        treeName - the tree name
        siteRoot - the site root
        openItemIds - the structure ids of opened items
      • searchElement

        public void searchElement​(java.lang.String path,
                                  java.lang.Runnable nextAction)
        Searches for a specific element and opens it's preview if found.

        Parameters:
        path - the element path
        nextAction - the next action to execute after the search data for the element has been loaded into the gallery dialog
      • selectResource

        public void selectResource​(java.lang.String resourcePath,
                                   org.opencms.util.CmsUUID structureId,
                                   java.lang.String title,
                                   java.lang.String resourceType)
        Selects the given resource and sets its path into the xml-content field or editor link.

        Parameters:
        resourcePath - the resource path
        structureId - the structure id
        title - the resource title
        resourceType - the resource type
      • setIncludeExpired

        public void setIncludeExpired​(boolean includeExpired,
                                      boolean fireEvent)
        Sets if the search should include expired or unreleased resources.

        Parameters:
        includeExpired - if the search should include expired or unreleased resources
        fireEvent - true if a change event should be fired after setting the value
      • setResultViewType

        public void setResultViewType​(java.lang.String resultViewType)
        Stores the result view type.

        Parameters:
        resultViewType - the result view type
      • setShowSiteSelector

        public void setShowSiteSelector​(boolean isShowSiteSelector)
        Sets the "Show site selector" option.

        Parameters:
        isShowSiteSelector - the new value for the option
      • setStartSite

        public void setStartSite​(java.lang.String startSite)
        Sets the start site.

        Parameters:
        startSite - the start site
      • sortCategories

        public void sortCategories​(java.lang.String sortParams,
                                   java.lang.String filter)
        Sorts the categories according to given parameters and updates the list.

        Parameters:
        sortParams - the sort parameters
        filter - the filter to apply before sorting
      • sortGalleries

        public void sortGalleries​(java.lang.String sortParams,
                                  java.lang.String filter)
        Sorts the galleries according to given parameters and updates the list.

        Parameters:
        sortParams - the sort parameters
        filter - the filter to apply before sorting
      • sortResults

        public void sortResults​(java.lang.String sortParams)
        Sorts the results according to given parameters and updates the list.

        Parameters:
        sortParams - the sort parameters
      • sortTypes

        public void sortTypes​(java.lang.String sortParams)
        Sorts the types according to given parameters and updates the list.

        Parameters:
        sortParams - the sort parameters
      • updateCategoriesTab

        public void updateCategoriesTab()
        Updates the content of the categories tab.

      • updateGalleriesTab

        public void updateGalleriesTab()
        Updates the content of the galleries(folders) tab.

      • updateGalleryData

        public void updateGalleryData​(org.opencms.ade.galleries.shared.CmsGalleryDataBean data)
        Updates the gallery data.

        Parameters:
        data - the gallery data
      • updateIndex

        public void updateIndex()
        Updates the gallery index and triggers a new search afterwards.

      • updateResultsTab

        public void updateResultsTab​(boolean isNextPage)
        Updates the content of the results tab.

        Parameters:
        isNextPage - signals if the next page should be loaded
      • updatesTypesTab

        public void updatesTypesTab()
        Updates the content of the types tab.

      • getVfsService

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

        Returns:
        the sitemap service instance
      • internalDeleteResource

        protected void internalDeleteResource​(java.lang.String resourcePath)
        Deletes a resource.

        Parameters:
        resourcePath - the path of the resource to delete
      • removeTab

        protected void removeTab​(org.opencms.ade.galleries.shared.I_CmsGalleryProviderConstants.GalleryTabId tabId)
        Removes a tab id from the internal list of tab ids.

        Parameters:
        tabId - the id of the tab to remove
      • removeTypesTab

        protected void removeTypesTab()
        Removes the types tab from the list of configured tabs.

        This will only take effect when executed before tab initialization.