Package org.opencms.ade.galleries.shared
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 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
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MATCHES_PER_PAGE
The default matches per page.static int
DEFAULT_TAB_ID
The default tab id to use when the gallery is opened.static java.lang.String
DICT_NAME
Name of the used JS variable.
-
Constructor Summary
Constructors Constructor Description CmsGallerySearchBean()
Empty default constructor.CmsGallerySearchBean(CmsGallerySearchBean searchObj)
Constructor of the search object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCategory(java.lang.String category)
Adds a category to the categories list.void
addFolder(java.lang.String folder)
Adds a new VFS folder to search in.void
addGallery(java.lang.String gallery)
Adds a gallery folder to the galleries list.void
addType(java.lang.String type)
Adds a type to the types list.void
clearCategories()
Clears the categories list.void
clearFolders()
Clears the list of VFS folders.void
clearFullTextSearch()
Clears the full text search.void
clearGalleries()
Clears the galleries list.void
clearTypes()
Clears the types list.java.util.List<java.lang.String>
getCategories()
Returns the list of the available categories.CmsGalleryContainerInfo
getContainerInfo()
Gets the container information.long
getDateCreatedEnd()
Returns the dateCreatedEnd.long
getDateCreatedStart()
Returns the dateCreatedStart.long
getDateModifiedEnd()
Returns the dateModifiedEnd.long
getDateModifiedStart()
Returns the dateModifiedStart.java.util.Set<java.lang.String>
getFolders()
Returns the list of selected VFS folders.java.util.List<java.lang.String>
getGalleries()
Returns the list of the available galleries.I_CmsGalleryProviderConstants.GalleryMode
getGalleryMode()
Gets the gallery mode.static java.lang.String
getGalleryStorageKey(java.lang.String prefix, java.lang.String referenceType)
Creates the key used to store the last selected gallery.java.lang.String
getGalleryStoragePrefix()
Gets the key used to store the last selected gallery.I_CmsGalleryProviderConstants.GalleryTabId
getInitialTabId()
Gets the initial tab id.int
getLastPage()
Gets the index of the last search results page.java.lang.String
getLocale()
Returns the search locale.int
getMatchesPerPage()
Returns the number of matches per search page.java.lang.String
getNoUploadReason()
Returns the reason why an upload to the current target folder is not allowed.CmsGalleryDataBean
getOriginalGalleryData()
Returns the original gallery data.int
getPage()
Returns the page.java.lang.String
getQuery()
Returns the search query string.java.lang.String
getReferencePath()
Gets the gallery reference path.java.lang.String
getResourcePath()
Returns the path to the selected resource in the current search.java.lang.String
getResourceType()
Returns the resource type of the selected resource.int
getResultCount()
Returns the resultCount.java.util.List<CmsResultItemBean>
getResults()
Returns the results.CmsGallerySearchScope
getScope()
Gets the search scope.java.util.List<java.lang.String>
getServerSearchTypes()
Gets the server search types.CmsSitemapEntryBean
getSitemapPreloadData()
Gets the sitemap preload data.java.lang.String
getSortOrder()
Returns the sort order of the search results.java.lang.String
getTabId()
Returns the tabId.java.util.List<java.lang.String>
getTypes()
Returns the list of the available type.CmsVfsEntryBean
getVfsPreloadData()
Gets the VFS preload data.boolean
hasMore()
Checks if there are more search items available on the next page.boolean
hasReplacedResults()
Returns true if the search results were replaced with something else.boolean
haveGalleriesChanged()
Checks if the gallery selection was changed by the user.boolean
isDisablePreview()
Returns true if no preview should be shown for the search result.boolean
isEmpty()
Checks if any search parameter are selected.boolean
isIgnoreSearchExclude()
Returns the search exclude property ignore flag.boolean
isIncludeExpired()
Returns if the search should include expired or unreleased resources.void
removeCategory(java.lang.String category)
Removes a category from the categories list.void
removeFolder(java.lang.String folder)
Removes a folder from the folder list.void
removeGallery(java.lang.String gallery)
Removes a gallery folder from the galleries list.void
removeType(java.lang.String type)
Removes a type from the types list.void
setCategories(java.util.List<java.lang.String> categories)
Sets the categories.void
setContainerInfo(CmsGalleryContainerInfo containerInfo)
Sets the container information.void
setDateCreatedEnd(long dateCreatedEnd)
Sets the dateCreatedEnd.void
setDateCreatedStart(long dateCreatedStart)
Sets the dateCreatedStart.void
setDateModifiedEnd(long dateModifiedEnd)
Sets the dateModifiedEnd.void
setDateModifiedStart(long dateModifiedStart)
Sets the dateModifiedStart.void
setDisablePreview(boolean disablePreview)
Sets the 'disable preview' flag.void
setFolders(java.util.Set<java.lang.String> folders)
Sets the folders to search in.void
setGalleries(java.util.List<java.lang.String> galleries)
Sets the galleries.void
setGalleriesChanged(boolean changed)
Sets the "galleries changed" flag.void
setGalleryMode(I_CmsGalleryProviderConstants.GalleryMode galleryMode)
Sets the gallery mode.void
setGalleryStoragePrefix(java.lang.String prefix)
Sets the prefix of the key used to store the last selected gallery.void
setIgnoreSearchExclude(boolean excludeForPageEditor)
Sets the search exclude property ignore flag.void
setIncludeExpired(boolean includeExpired)
Sets if the search should include expired or unreleased resources.void
setInitialTabId(I_CmsGalleryProviderConstants.GalleryTabId initialTabId)
Sets the initial tab id.void
setLastPage(int lastPage)
Sets the index of the last search result page.void
setLocale(java.lang.String locale)
Sets the locale.void
setMatchesPerPage(int matchesPerPage)
Sets the matchesPerPage.void
setNoUploadReason(java.lang.String noUploadReason)
Sets the reason why an upload to the current target folder is not allowed.void
setOriginalGalleryData(CmsGalleryDataBean originalGalleryData)
Sets the original gallery data.void
setPage(int page)
Sets the page.void
setQuery(java.lang.String query)
Sets the query.void
setReferencePath(java.lang.String referencePath)
Sets the gallery reference path.void
setReplacedResults(boolean replacedResults)
Sets the 'results were replaced' status.void
setResourcePath(java.lang.String resourcePath)
Sets the resourcePath.void
setResourceType(java.lang.String resourceType)
Sets the resource type of the selected resource.void
setResultCount(int resultCount)
Sets the resultCount.void
setResults(java.util.List<CmsResultItemBean> results)
Sets the results.void
setScope(CmsGallerySearchScope scope)
Sets the search scope.void
setServerSearchTypes(java.util.List<java.lang.String> types)
Sets the server search types.void
setSitemapPreloadData(CmsSitemapEntryBean preloadData)
Sets the sitemap preload data.void
setSortOrder(java.lang.String sortOrder)
Sets the sortOrder.void
setTabId(java.lang.String tabId)
Sets the tabId.void
setTypes(java.util.List<java.lang.String> types)
Sets the type names.void
setVfsPreloadData(CmsVfsEntryBean preloadData)
Sets the VFS tree preload data.
-
-
-
Field Detail
-
DEFAULT_MATCHES_PER_PAGE
public static final int DEFAULT_MATCHES_PER_PAGE
The default matches per page.- See Also:
- Constant Field Values
-
DEFAULT_TAB_ID
public static final int DEFAULT_TAB_ID
The default tab id to use when the gallery is opened.- See Also:
- Constant Field Values
-
DICT_NAME
public static final java.lang.String DICT_NAME
Name of the used JS variable.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsGallerySearchBean
public CmsGallerySearchBean()
Empty default constructor.
-
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 keyreferenceType
- 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.
-
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
public java.util.List<java.lang.String> getCategories()
Returns the list of the available categories.- Returns:
- the categories
-
getContainerInfo
public CmsGalleryContainerInfo 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 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
-
getGalleryMode
public I_CmsGalleryProviderConstants.GalleryMode getGalleryMode()
Gets the gallery mode.- Returns:
- the gallery mode
-
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
-
getInitialTabId
public I_CmsGalleryProviderConstants.GalleryTabId 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 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
-
getOriginalGalleryData
public CmsGalleryDataBean getOriginalGalleryData()
Returns the original gallery data.- Returns:
- the original gallery data
-
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
-
getResults
public java.util.List<CmsResultItemBean> getResults()
Returns the results.- Returns:
- the results
-
getScope
public CmsGallerySearchScope getScope()
Gets the search scope.- Returns:
- the search scope
-
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
-
getSitemapPreloadData
public CmsSitemapEntryBean getSitemapPreloadData()
Gets the sitemap preload data.- Returns:
- the sitemap preload data
-
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
-
getVfsPreloadData
public CmsVfsEntryBean 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 availablefalse
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
-
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(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
-
setGalleryMode
public void setGalleryMode(I_CmsGalleryProviderConstants.GalleryMode galleryMode)
Sets the gallery mode.- Parameters:
galleryMode
- the gallery mode to set
-
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
-
setInitialTabId
public void setInitialTabId(I_CmsGalleryProviderConstants.GalleryTabId initialTabId)
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(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
-
setScope
public void setScope(CmsGallerySearchScope scope)
Sets the search scope.- Parameters:
scope
- the search scope
-
setServerSearchTypes
public void setServerSearchTypes(java.util.List<java.lang.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(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
-
-