Class CmsGallerySearchBean

java.lang.Object
org.opencms.ade.galleries.shared.CmsGallerySearchBean
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class CmsGallerySearchBean extends 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
  • Field Details

  • Constructor Details

    • CmsGallerySearchBean

      Empty default constructor.

    • CmsGallerySearchBean

      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 Details

    • getGalleryStorageKey

      public static String getGalleryStorageKey(String prefix, 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(String category)
      Adds a category to the categories list.

      Parameters:
      category - the category
    • addFolder

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

      Parameters:
      folder - the folder to add
    • addGallery

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

      Parameters:
      gallery - the gallery
    • addType

      public void addType(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.

    • clearFullTextSearch

      public void clearFullTextSearch()
      Clears the full text search.

    • clearGalleries

      public void clearGalleries()
      Clears the galleries list.

    • clearTypes

      public void clearTypes()
      Clears the types list.

    • getCategories

      Returns the list of the available categories.

      Returns:
      the categories
    • getContainerInfo

      Gets the container information.

      This is used for filtering of dynamic function search results in the 'Add menu' case of the gallery dialog.

      Returns:
      the container information
    • 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 Set<String> getFolders()
      Returns the list of selected VFS folders.

      Returns:
      the list of selected VFS folders
    • getGalleries

      Returns the list of the available galleries.

      Returns:
      the galleries
    • getGalleryMode

      Gets the gallery mode.

      Returns:
      the gallery mode
    • getGalleryStoragePrefix

      Gets the key used to store the last selected gallery.

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

      Gets the initial tab id.

      Returns:
      the initial tab id
    • getLastPage

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

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

      public 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

      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
    • getOriginalGalleryData

      Returns the original gallery data.

      Returns:
      the original gallery data
    • getPage

      public int getPage()
      Returns the page.

      Returns:
      the page
    • getQuery

      public String getQuery()
      Returns the search query string.

      Returns:
      the query
    • getReferencePath

      Gets the gallery reference path.

      Returns:
      the gallery reference path
    • getResourcePath

      Returns the path to the selected resource in the current search.

      Returns:
      the path to the selected resource
    • getResourceType

      Returns the resource type of the selected resource.

      Returns:
      the resource type
    • getResultCount

      public int getResultCount()
      Returns the resultCount.

      Returns:
      the resultCount
    • getResults

      Returns the results.

      Returns:
      the results
    • getScope

      Gets the search scope.

      Returns:
      the search scope
    • 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
    • getSitemapPreloadData

      Gets the sitemap preload data.

      Returns:
      the sitemap preload data
    • getSortOrder

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

      Returns:
      the sortOrder
    • getTabId

      public String getTabId()
      Returns the tabId.

      Returns:
      the tabId
    • getTemplateContextInfo

      Gets the template context information.
      Returns:
      the template context information
    • getTypes

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

      Returns:
      the typeNames
    • getVfsPreloadData

      Gets the VFS preload data.

      Returns:
      the VFS preload data
    • 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(String category)
      Removes a category from the categories list.

      Parameters:
      category - the category
    • removeFolder

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

      Parameters:
      folder - the folder to remove
    • removeGallery

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

      Parameters:
      gallery - the gallery
    • removeType

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

      Parameters:
      type - the type
    • setCategories

      public void setCategories(List<String> categories)
      Sets the categories.

      Parameters:
      categories - the categories to set
    • setContainerInfo

      public void setContainerInfo(CmsGalleryContainerInfo containerInfo)
      Sets the container information.
      Parameters:
      containerInfo - the container information
    • 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(Set<String> folders)
      Sets the folders to search in.

      Parameters:
      folders - the folders
    • setGalleries

      public void setGalleries(List<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
    • setGalleryMode

      Sets the gallery mode.

      Parameters:
      galleryMode - the gallery mode to set
    • setGalleryStoragePrefix

      public void setGalleryStoragePrefix(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
    • setInitialTabId

      Sets the initial tab id.

      Parameters:
      initialTabId - the initial tab id
    • 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(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(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(String query)
      Sets the query.

      Parameters:
      query - the query to set
    • setReferencePath

      public void setReferencePath(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(String resourcePath)
      Sets the resourcePath.

      Parameters:
      resourcePath - the resourcePath to set
    • setResourceType

      public void setResourceType(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(List<CmsResultItemBean> results)
      Sets the results.

      Parameters:
      results - the results to set
    • setScope

      public void setScope(CmsGallerySearchScope scope)
      Sets the search scope.

      Parameters:
      scope - the search scope
    • setServerSearchTypes

      public void setServerSearchTypes(List<String> types)
      Sets the server search types.

      Parameters:
      types - the server search types
    • setSitemapPreloadData

      public void setSitemapPreloadData(CmsSitemapEntryBean preloadData)
      Sets the sitemap preload data.

      Parameters:
      preloadData - the sitemap preload data
    • setSortOrder

      public void setSortOrder(String sortOrder)
      Sets the sortOrder.

      Parameters:
      sortOrder - the sortOrder to set
    • setTabId

      public void setTabId(String tabId)
      Sets the tabId.

      Parameters:
      tabId - the tabId to set
    • setTemplateContextInfo

      public void setTemplateContextInfo(CmsTemplateContextInfo cmsTemplateContextInfo)
    • setTypes

      public void setTypes(List<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