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
FieldsModifier and TypeFieldDescriptionstatic final intThe default matches per page.static final intThe default tab id to use when the gallery is opened.static final StringName of the used JS variable. -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructor.CmsGallerySearchBean(CmsGallerySearchBean searchObj) Constructor of the search object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(String category) Adds a category to the categories list.voidAdds a new VFS folder to search in.voidaddGallery(String gallery) Adds a gallery folder to the galleries list.voidAdds a type to the types list.voidClears the categories list.voidClears the list of VFS folders.voidClears the full text search.voidClears the galleries list.voidClears the types list.Returns the list of the available categories.Gets the container information.longReturns the dateCreatedEnd.longReturns the dateCreatedStart.longReturns the dateModifiedEnd.longReturns the dateModifiedStart.Returns the list of selected VFS folders.Returns the list of the available galleries.Gets the gallery mode.static StringgetGalleryStorageKey(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.intGets the index of the last search results page.Returns the search locale.intReturns 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.intgetPage()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.intReturns 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.booleanhasMore()Checks if there are more search items available on the next page.booleanReturns true if the search results were replaced with something else.booleanChecks if the gallery selection was changed by the user.booleanReturns true if no preview should be shown for the search result.booleanisEmpty()Checks if any search parameter are selected.booleanReturns the search exclude property ignore flag.booleanReturns if the search should include expired or unreleased resources.voidremoveCategory(String category) Removes a category from the categories list.voidremoveFolder(String folder) Removes a folder from the folder list.voidremoveGallery(String gallery) Removes a gallery folder from the galleries list.voidremoveType(String type) Removes a type from the types list.voidsetCategories(List<String> categories) Sets the categories.voidsetContainerInfo(CmsGalleryContainerInfo containerInfo) Sets the container information.voidsetDateCreatedEnd(long dateCreatedEnd) Sets the dateCreatedEnd.voidsetDateCreatedStart(long dateCreatedStart) Sets the dateCreatedStart.voidsetDateModifiedEnd(long dateModifiedEnd) Sets the dateModifiedEnd.voidsetDateModifiedStart(long dateModifiedStart) Sets the dateModifiedStart.voidsetDisablePreview(boolean disablePreview) Sets the 'disable preview' flag.voidsetFolders(Set<String> folders) Sets the folders to search in.voidsetGalleries(List<String> galleries) Sets the galleries.voidsetGalleriesChanged(boolean changed) Sets the "galleries changed" flag.voidsetGalleryMode(I_CmsGalleryProviderConstants.GalleryMode galleryMode) Sets the gallery mode.voidsetGalleryStoragePrefix(String prefix) Sets the prefix of the key used to store the last selected gallery.voidsetIgnoreSearchExclude(boolean excludeForPageEditor) Sets the search exclude property ignore flag.voidsetIncludeExpired(boolean includeExpired) Sets if the search should include expired or unreleased resources.voidsetInitialTabId(I_CmsGalleryProviderConstants.GalleryTabId initialTabId) Sets the initial tab id.voidsetLastPage(int lastPage) Sets the index of the last search result page.voidSets the locale.voidsetMatchesPerPage(int matchesPerPage) Sets the matchesPerPage.voidsetNoUploadReason(String noUploadReason) Sets the reason why an upload to the current target folder is not allowed.voidsetOriginalGalleryData(CmsGalleryDataBean originalGalleryData) Sets the original gallery data.voidsetPage(int page) Sets the page.voidSets the query.voidsetReferencePath(String referencePath) Sets the gallery reference path.voidsetReplacedResults(boolean replacedResults) Sets the 'results were replaced' status.voidsetResourcePath(String resourcePath) Sets the resourcePath.voidsetResourceType(String resourceType) Sets the resource type of the selected resource.voidsetResultCount(int resultCount) Sets the resultCount.voidsetResults(List<CmsResultItemBean> results) Sets the results.voidsetScope(CmsGallerySearchScope scope) Sets the search scope.voidsetServerSearchTypes(List<String> types) Sets the server search types.voidsetSitemapPreloadData(CmsSitemapEntryBean preloadData) Sets the sitemap preload data.voidsetSortOrder(String sortOrder) Sets the sortOrder.voidSets the tabId.voidsetTemplateContextInfo(CmsTemplateContextInfo cmsTemplateContextInfo) voidSets the type names.voidsetVfsPreloadData(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:
trueif there are more search results availablefalseotherwise
-
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:
trueif 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
-