public class CmsGallerySearch
extends java.lang.Object
构造器和说明 |
---|
CmsGallerySearch() |
限定符和类型 | 方法和说明 |
---|---|
java.lang.String |
getIndex()
Returns the name of the current search index.
|
CmsGallerySearchResultList |
getResult(CmsGallerySearchParameters params)
Returns the gallery search result list.
|
CmsGallerySearchIndex |
getSearchIndex()
Returns the current gallery search index.
|
void |
init(CmsObject cms)
Initializes the bean with the provided OpenCms context object.
|
static CmsGallerySearchResult |
searchById(CmsObject cms,
CmsUUID structureId,
java.util.Locale locale)
Searches by structure id.
|
CmsGallerySearchResult |
searchById(CmsUUID id,
java.util.Locale locale)
Searches by structure id.
|
static CmsGallerySearchResult |
searchByPath(CmsObject cms,
java.lang.String rootPath,
java.util.Locale locale)
Searches by structure id.
|
CmsGallerySearchResult |
searchByPath(java.lang.String path,
java.util.Locale locale)
Searches by structure id.
|
void |
setIndex(java.lang.String indexName)
Set the name of the index to search.
|
protected transient CmsObject m_cms
public static CmsGallerySearchResult searchById(CmsObject cms, CmsUUID structureId, java.util.Locale locale) throws CmsException
cms
- the OpenCms context to use for the searchstructureId
- the structure id of the document to search forlocale
- the locale for which the search result should be returnedCmsException
- if something goes wrongpublic static CmsGallerySearchResult searchByPath(CmsObject cms, java.lang.String rootPath, java.util.Locale locale) throws CmsException
cms
- the OpenCms context to use for the searchrootPath
- the resource root pathlocale
- the locale for which the search result should be returnedCmsException
- if something goes wrongpublic java.lang.String getIndex()
public CmsGallerySearchResultList getResult(CmsGallerySearchParameters params) throws CmsException
params
- the gallery search parametersCmsException
- if the search failedpublic CmsGallerySearchIndex getSearchIndex()
public void init(CmsObject cms)
cms
- the OpenCms context to use for the searchpublic CmsGallerySearchResult searchById(CmsUUID id, java.util.Locale locale) throws CmsException
id
- the structure id of the document to search forlocale
- the locale for which the search result should be returnedCmsException
- if something goes wrongpublic CmsGallerySearchResult searchByPath(java.lang.String path, java.util.Locale locale) throws CmsException
path
- the resource pathlocale
- the locale for which the search result should be returnedCmsException
- if something goes wrongpublic void setIndex(java.lang.String indexName) throws CmsException
A former search result will be deleted.
indexName
- the name of the indexCmsException
- if the index was not found or was not an instance of @link CmsGallerySearchIndex