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 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
Modifier and TypeFieldDescriptionstatic final int
The default matches per page.static final int
The default tab id to use when the gallery is opened.static final String
Name of the used JS variable. -
Constructor Summary
ConstructorDescriptionEmpty default constructor.CmsGallerySearchBean
(CmsGallerySearchBean searchObj) Constructor of the search object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCategory
(String category) Adds a category to the categories list.void
Adds a new VFS folder to search in.void
addGallery
(String gallery) Adds a gallery folder to the galleries list.void
Adds a type to the types list.void
Clears the categories list.void
Clears the list of VFS folders.void
Clears the full text search.void
Clears the galleries list.void
Clears the types list.Returns the list of the available categories.Gets the container information.long
Returns the dateCreatedEnd.long
Returns the dateCreatedStart.long
Returns the dateModifiedEnd.long
Returns the dateModifiedStart.Returns the list of selected VFS folders.Returns the list of the available galleries.Gets the gallery mode.static String
getGalleryStorageKey
(String prefix, String referenceType) Creates the key used to store the last selected gallery.Gets the key used to store the last selected gallery.Gets the initial tab id.int
Gets the index of the last search results page.Returns the search locale.int
Returns the number of matches per search page.Returns the reason why an upload to the current target folder is not allowed.Returns the original gallery data.int
getPage()
Returns the page.getQuery()
Returns the search query string.Gets the gallery reference path.Returns the path to the selected resource in the current search.Returns the resource type of the selected resource.int
Returns the resultCount.Returns the results.getScope()
Gets the search scope.Gets the server search types.Gets the sitemap preload data.Returns the sort order of the search results.getTabId()
Returns the tabId.Gets the template context information.getTypes()
Returns the list of the available type.Gets the VFS preload data.boolean
hasMore()
Checks if there are more search items available on the next page.boolean
Returns true if the search results were replaced with something else.boolean
Checks if the gallery selection was changed by the user.boolean
Returns true if no preview should be shown for the search result.boolean
isEmpty()
Checks if any search parameter are selected.boolean
Returns the search exclude property ignore flag.boolean
Returns if the search should include expired or unreleased resources.void
removeCategory
(String category) Removes a category from the categories list.void
removeFolder
(String folder) Removes a folder from the folder list.void
removeGallery
(String gallery) Removes a gallery folder from the galleries list.void
removeType
(String type) Removes a type from the types list.void
setCategories
(List<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
(Set<String> folders) Sets the folders to search in.void
setGalleries
(List<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
(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
Sets the locale.void
setMatchesPerPage
(int matchesPerPage) Sets the matchesPerPage.void
setNoUploadReason
(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
Sets the query.void
setReferencePath
(String referencePath) Sets the gallery reference path.void
setReplacedResults
(boolean replacedResults) Sets the 'results were replaced' status.void
setResourcePath
(String resourcePath) Sets the resourcePath.void
setResourceType
(String resourceType) Sets the resource type of the selected resource.void
setResultCount
(int resultCount) Sets the resultCount.void
setResults
(List<CmsResultItemBean> results) Sets the results.void
setScope
(CmsGallerySearchScope scope) Sets the search scope.void
setServerSearchTypes
(List<String> types) Sets the server search types.void
setSitemapPreloadData
(CmsSitemapEntryBean preloadData) Sets the sitemap preload data.void
setSortOrder
(String sortOrder) Sets the sortOrder.void
Sets the tabId.void
setTemplateContextInfo
(CmsTemplateContextInfo cmsTemplateContextInfo) void
Sets the type names.void
setVfsPreloadData
(CmsVfsEntryBean preloadData) Sets the VFS tree preload data.
-
Field Details
-
DEFAULT_MATCHES_PER_PAGE
The default matches per page.- See Also:
-
DEFAULT_TAB_ID
The default tab id to use when the gallery is opened.- See Also:
-
DICT_NAME
Name of the used JS variable.- See Also:
-
-
Constructor Details
-
CmsGallerySearchBean
public CmsGallerySearchBean()Empty default constructor.
-
-
Method Details
-
getGalleryStorageKey
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
Adds a category to the categories list.- Parameters:
category
- the category
-
addFolder
Adds a new VFS folder to search in.- Parameters:
folder
- the folder to add
-
addGallery
Adds a gallery folder to the galleries list.- Parameters:
gallery
- the gallery
-
addType
Adds a type to the types list.- Parameters:
type
- the type
-
clearCategories
Clears the categories list. -
clearFolders
Clears the list of VFS folders. -
clearFullTextSearch
Clears the full text search. -
clearGalleries
Clears the galleries list. -
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
Returns the dateCreatedEnd.- Returns:
- the dateCreatedEnd
-
getDateCreatedStart
Returns the dateCreatedStart.- Returns:
- the dateCreatedStart
-
getDateModifiedEnd
Returns the dateModifiedEnd.- Returns:
- the dateModifiedEnd
-
getDateModifiedStart
Returns the dateModifiedStart.- Returns:
- the dateModifiedStart
-
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
Gets the index of the last search results page.- Returns:
- the index of the last search results page
-
getLocale
Returns the search locale.- Returns:
- the locale
-
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
Returns the page.- Returns:
- the page
-
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
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
Returns the sort order of the search results.- Returns:
- the sortOrder
-
getTabId
Returns the tabId.- Returns:
- the tabId
-
getTemplateContextInfo
Gets the template context information.- Returns:
- the template context information
-
getTypes
Returns the list of the available type.- Returns:
- the typeNames
-
getVfsPreloadData
Gets the VFS preload data.- Returns:
- the VFS preload data
-
hasMore
Checks if there are more search items available on the next page.- Returns:
true
if there are more search results availablefalse
otherwise
-
hasReplacedResults
Returns true if the search results were replaced with something else.- Returns:
- true if the search results were replaced with something else
-
haveGalleriesChanged
Checks if the gallery selection was changed by the user.- Returns:
- true if the gallery selection was changed
-
isDisablePreview
Returns true if no preview should be shown for the search result.- Returns:
- true if no preview should be shown
-
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
Returns the search exclude property ignore flag.- Returns:
- the search exclude property ignore flag
-
isIncludeExpired
Returns if the search should include expired or unreleased resources.- Returns:
true
if the search should include expired or unreleased resources
-
removeCategory
Removes a category from the categories list.- Parameters:
category
- the category
-
removeFolder
Removes a folder from the folder list.- Parameters:
folder
- the folder to remove
-
removeGallery
Removes a gallery folder from the galleries list.- Parameters:
gallery
- the gallery
-
removeType
Removes a type from the types list.- Parameters:
type
- the type
-
setCategories
Sets the categories.- Parameters:
categories
- the categories to set
-
setDateCreatedEnd
Sets the dateCreatedEnd.- Parameters:
dateCreatedEnd
- the dateCreatedEnd to set
-
setDateCreatedStart
Sets the dateCreatedStart.- Parameters:
dateCreatedStart
- the dateCreatedStart to set
-
setDateModifiedEnd
Sets the dateModifiedEnd.- Parameters:
dateModifiedEnd
- the dateModifiedEnd to set
-
setDateModifiedStart
Sets the dateModifiedStart.- Parameters:
dateModifiedStart
- the dateModifiedStart to set
-
setDisablePreview
Sets the 'disable preview' flag.- Parameters:
disablePreview
- true if the preview for the search result should not be shown
-
setFolders
Sets the folders to search in.- Parameters:
folders
- the folders
-
setGalleries
Sets the galleries.- Parameters:
galleries
- the galleries to set
-
setGalleriesChanged
Sets the "galleries changed" flag.- Parameters:
changed
- the new flag value
-
setGalleryStoragePrefix
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
Sets the search exclude property ignore flag.- Parameters:
excludeForPageEditor
- the search exclude property ignore flag
-
setIncludeExpired
Sets if the search should include expired or unreleased resources.- Parameters:
includeExpired
- if the search should include expired or unreleased resources
-
setLastPage
Sets the index of the last search result page.- Parameters:
lastPage
- the index of the last search result page
-
setLocale
Sets the locale.- Parameters:
locale
- the locale to set
-
setMatchesPerPage
Sets the matchesPerPage.- Parameters:
matchesPerPage
- the matchesPerPage to set
-
setNoUploadReason
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
-
setPage
Sets the page.- Parameters:
page
- the page to set
-
setQuery
Sets the query.- Parameters:
query
- the query to set
-
setReferencePath
Sets the gallery reference path.- Parameters:
referencePath
- the gallery reference path
-
setReplacedResults
Sets the 'results were replaced' status.- Parameters:
replacedResults
- the new value for the 'results were replaced' status
-
setResourcePath
Sets the resourcePath.- Parameters:
resourcePath
- the resourcePath to set
-
setResourceType
Sets the resource type of the selected resource.- Parameters:
resourceType
- the resource type to set
-
setResultCount
Sets the resultCount.- Parameters:
resultCount
- the resultCount to set
-
setResults
Sets the results.- Parameters:
results
- the results to set
-
setServerSearchTypes
Sets the server search types.- Parameters:
types
- the server search types
-
setSortOrder
Sets the sortOrder.- Parameters:
sortOrder
- the sortOrder to set
-
setTabId
Sets the tabId.- Parameters:
tabId
- the tabId to set
-
setTypes
Sets the type names.- Parameters:
types
- the type names to set
-