Class CmsGallerySearchBean

  • All Implemented Interfaces:
    com.google.gwt.user.client.rpc.IsSerializable

    public class CmsGallerySearchBean
    extends java.lang.Object
    implements com.google.gwt.user.client.rpc.IsSerializable
    This bean represents the current search object.

    The search object collects the current parameters which are used for the search and contains the search results for the current search parameters.

    Since:
    8.0.0
    • Constructor Detail

      • CmsGallerySearchBean

        public CmsGallerySearchBean​(CmsGallerySearchBean searchObj)
        Constructor of the search object.

        The constructor copies the content of the provided parameter to the current bean.

        Parameters:
        searchObj - a search object with content
    • Method Detail

      • getGalleryStorageKey

        public static java.lang.String getGalleryStorageKey​(java.lang.String prefix,
                                                            java.lang.String referenceType)
        Creates the key used to store the last selected gallery.

        Parameters:
        prefix - the prefix for the key
        referenceType - the type name of the reference resource
        Returns:
        the key to store the last selected gallery
      • addCategory

        public void addCategory​(java.lang.String category)
        Adds a category to the categories list.

        Parameters:
        category - the category
      • addFolder

        public void addFolder​(java.lang.String folder)
        Adds a new VFS folder to search in.

        Parameters:
        folder - the folder to add
      • addGallery

        public void addGallery​(java.lang.String gallery)
        Adds a gallery folder to the galleries list.

        Parameters:
        gallery - the gallery
      • addType

        public void addType​(java.lang.String type)
        Adds a type to the types list.

        Parameters:
        type - the type
      • clearCategories

        public void clearCategories()
        Clears the categories list.

      • clearFolders

        public void clearFolders()
        Clears the list of VFS folders.

      • clearGalleries

        public void clearGalleries()
        Clears the galleries list.

      • clearTypes

        public void clearTypes()
        Clears the types list.

      • getCategories

        public java.util.List<java.lang.String> getCategories()
        Returns the list of the available categories.

        Returns:
        the categories
      • getDateCreatedEnd

        public long getDateCreatedEnd()
        Returns the dateCreatedEnd.

        Returns:
        the dateCreatedEnd
      • getDateCreatedStart

        public long getDateCreatedStart()
        Returns the dateCreatedStart.

        Returns:
        the dateCreatedStart
      • getDateModifiedEnd

        public long getDateModifiedEnd()
        Returns the dateModifiedEnd.

        Returns:
        the dateModifiedEnd
      • getDateModifiedStart

        public long getDateModifiedStart()
        Returns the dateModifiedStart.

        Returns:
        the dateModifiedStart
      • getFolders

        public java.util.Set<java.lang.String> getFolders()
        Returns the list of selected VFS folders.

        Returns:
        the list of selected VFS folders
      • getGalleries

        public java.util.List<java.lang.String> getGalleries()
        Returns the list of the available galleries.

        Returns:
        the galleries
      • getGalleryStoragePrefix

        public java.lang.String getGalleryStoragePrefix()
        Gets the key used to store the last selected gallery.

        Returns:
        the key used to store the last selected gallery
      • getLastPage

        public int getLastPage()
        Gets the index of the last search results page.

        Returns:
        the index of the last search results page
      • getLocale

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

        Returns:
        the locale
      • getMatchesPerPage

        public int getMatchesPerPage()
        Returns the number of matches per search page.

        Returns:
        the matchesPerPage
      • getNoUploadReason

        public java.lang.String getNoUploadReason()
        Returns the reason why an upload to the current target folder is not allowed.

        Returns:
        the reason why an upload to the current target folder is not allowed
      • getPage

        public int getPage()
        Returns the page.

        Returns:
        the page
      • getQuery

        public java.lang.String getQuery()
        Returns the search query string.

        Returns:
        the query
      • getReferencePath

        public java.lang.String getReferencePath()
        Gets the gallery reference path.

        Returns:
        the gallery reference path
      • getResourcePath

        public java.lang.String getResourcePath()
        Returns the path to the selected resource in the current search.

        Returns:
        the path to the selected resource
      • getResourceType

        public java.lang.String getResourceType()
        Returns the resource type of the selected resource.

        Returns:
        the resource type
      • getResultCount

        public int getResultCount()
        Returns the resultCount.

        Returns:
        the resultCount
      • getServerSearchTypes

        public java.util.List<java.lang.String> getServerSearchTypes()
        Gets the server search types.

        These are the types which are actually used for the search on the server, rather than the types which are checked in the types tab. The lists are different, for example, if the user hasn't selected any types.

        Returns:
        the server search types
      • getSortOrder

        public java.lang.String getSortOrder()
        Returns the sort order of the search results.

        Returns:
        the sortOrder
      • getTabId

        public java.lang.String getTabId()
        Returns the tabId.

        Returns:
        the tabId
      • getTypes

        public java.util.List<java.lang.String> getTypes()
        Returns the list of the available type.

        Returns:
        the typeNames
      • hasMore

        public boolean hasMore()
        Checks if there are more search items available on the next page.

        Returns:
        true if there are more search results available false otherwise
      • hasReplacedResults

        public boolean hasReplacedResults()
        Returns true if the search results were replaced with something else.
        Returns:
        true if the search results were replaced with something else
      • haveGalleriesChanged

        public boolean haveGalleriesChanged()
        Checks if the gallery selection was changed by the user.

        Returns:
        true if the gallery selection was changed
      • isDisablePreview

        public boolean isDisablePreview()
        Returns true if no preview should be shown for the search result.

        Returns:
        true if no preview should be shown
      • isEmpty

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

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

        public boolean isIgnoreSearchExclude()
        Returns the search exclude property ignore flag.

        Returns:
        the search exclude property ignore flag
      • isIncludeExpired

        public boolean isIncludeExpired()
        Returns if the search should include expired or unreleased resources.

        Returns:
        true if the search should include expired or unreleased resources
      • removeCategory

        public void removeCategory​(java.lang.String category)
        Removes a category from the categories list.

        Parameters:
        category - the category
      • removeFolder

        public void removeFolder​(java.lang.String folder)
        Removes a folder from the folder list.

        Parameters:
        folder - the folder to remove
      • removeGallery

        public void removeGallery​(java.lang.String gallery)
        Removes a gallery folder from the galleries list.

        Parameters:
        gallery - the gallery
      • removeType

        public void removeType​(java.lang.String type)
        Removes a type from the types list.

        Parameters:
        type - the type
      • setCategories

        public void setCategories​(java.util.List<java.lang.String> categories)
        Sets the categories.

        Parameters:
        categories - the categories to set
      • setDateCreatedEnd

        public void setDateCreatedEnd​(long dateCreatedEnd)
        Sets the dateCreatedEnd.

        Parameters:
        dateCreatedEnd - the dateCreatedEnd to set
      • setDateCreatedStart

        public void setDateCreatedStart​(long dateCreatedStart)
        Sets the dateCreatedStart.

        Parameters:
        dateCreatedStart - the dateCreatedStart to set
      • setDateModifiedEnd

        public void setDateModifiedEnd​(long dateModifiedEnd)
        Sets the dateModifiedEnd.

        Parameters:
        dateModifiedEnd - the dateModifiedEnd to set
      • setDateModifiedStart

        public void setDateModifiedStart​(long dateModifiedStart)
        Sets the dateModifiedStart.

        Parameters:
        dateModifiedStart - the dateModifiedStart to set
      • setDisablePreview

        public void setDisablePreview​(boolean disablePreview)
        Sets the 'disable preview' flag.

        Parameters:
        disablePreview - true if the preview for the search result should not be shown
      • setFolders

        public void setFolders​(java.util.Set<java.lang.String> folders)
        Sets the folders to search in.

        Parameters:
        folders - the folders
      • setGalleries

        public void setGalleries​(java.util.List<java.lang.String> galleries)
        Sets the galleries.

        Parameters:
        galleries - the galleries to set
      • setGalleriesChanged

        public void setGalleriesChanged​(boolean changed)
        Sets the "galleries changed" flag.

        Parameters:
        changed - the new flag value
      • setGalleryStoragePrefix

        public void setGalleryStoragePrefix​(java.lang.String prefix)
        Sets the prefix of the key used to store the last selected gallery.

        Parameters:
        prefix - the prefix of the key used to store the last selected gallery
      • setIgnoreSearchExclude

        public void setIgnoreSearchExclude​(boolean excludeForPageEditor)
        Sets the search exclude property ignore flag.

        Parameters:
        excludeForPageEditor - the search exclude property ignore flag
      • setIncludeExpired

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

        Parameters:
        includeExpired - if the search should include expired or unreleased resources
      • setLastPage

        public void setLastPage​(int lastPage)
        Sets the index of the last search result page.

        Parameters:
        lastPage - the index of the last search result page
      • setLocale

        public void setLocale​(java.lang.String locale)
        Sets the locale.

        Parameters:
        locale - the locale to set
      • setMatchesPerPage

        public void setMatchesPerPage​(int matchesPerPage)
        Sets the matchesPerPage.

        Parameters:
        matchesPerPage - the matchesPerPage to set
      • setNoUploadReason

        public void setNoUploadReason​(java.lang.String noUploadReason)
        Sets the reason why an upload to the current target folder is not allowed.

        Parameters:
        noUploadReason - the reason why an upload to the current target folder is not allowed to set
      • setOriginalGalleryData

        public void setOriginalGalleryData​(CmsGalleryDataBean originalGalleryData)
        Sets the original gallery data.

        Parameters:
        originalGalleryData - the original gallery data to set
      • setPage

        public void setPage​(int page)
        Sets the page.

        Parameters:
        page - the page to set
      • setQuery

        public void setQuery​(java.lang.String query)
        Sets the query.

        Parameters:
        query - the query to set
      • setReferencePath

        public void setReferencePath​(java.lang.String referencePath)
        Sets the gallery reference path.

        Parameters:
        referencePath - the gallery reference path
      • setReplacedResults

        public void setReplacedResults​(boolean replacedResults)
        Sets the 'results were replaced' status.
        Parameters:
        replacedResults - the new value for the 'results were replaced' status
      • setResourcePath

        public void setResourcePath​(java.lang.String resourcePath)
        Sets the resourcePath.

        Parameters:
        resourcePath - the resourcePath to set
      • setResourceType

        public void setResourceType​(java.lang.String resourceType)
        Sets the resource type of the selected resource.

        Parameters:
        resourceType - the resource type to set
      • setResultCount

        public void setResultCount​(int resultCount)
        Sets the resultCount.

        Parameters:
        resultCount - the resultCount to set
      • setResults

        public void setResults​(java.util.List<CmsResultItemBean> results)
        Sets the results.

        Parameters:
        results - the results to set
      • setServerSearchTypes

        public void setServerSearchTypes​(java.util.List<java.lang.String> types)
        Sets the server search types.

        Parameters:
        types - the server search types
      • setSortOrder

        public void setSortOrder​(java.lang.String sortOrder)
        Sets the sortOrder.

        Parameters:
        sortOrder - the sortOrder to set
      • setTabId

        public void setTabId​(java.lang.String tabId)
        Sets the tabId.

        Parameters:
        tabId - the tabId to set
      • setTypes

        public void setTypes​(java.util.List<java.lang.String> types)
        Sets the type names.

        Parameters:
        types - the type names to set
      • setVfsPreloadData

        public void setVfsPreloadData​(CmsVfsEntryBean preloadData)
        Sets the VFS tree preload data.

        Parameters:
        preloadData - the VFS tree preload data