public interface PageFilter
Page
Modifier and Type | Interface and Description |
---|---|
static class |
PageFilter.Context
The search context
|
static class |
PageFilter.ContextLanguage
The context language
|
Modifier and Type | Method and Description |
---|---|
void |
addMetadata(String metadataId,
String value)
Add a metadata filter
|
void |
addSortCriteria(String metadataId,
boolean ascending,
boolean useLowerCase)
Add a sort criteria
|
void |
addTag(String tag)
Add a tag to the filter
|
PageFilter.Context |
getContext()
Get the search context
|
PageFilter.ContextLanguage |
getContextLanguage()
Get the context language
|
int |
getDepth()
Get the search depth
|
String |
getId()
Get the filter id
|
int |
getLength()
Get the max number of results
|
AmetysObjectIterable<Page> |
getMatchingPages(String siteName,
String lang,
Page page)
Get the pages matching this filter.
|
Map<String,String> |
getMetadataValues()
Get the metadata id and value to match
|
String |
getPageId()
Get the parent page id
|
SortCriteria |
getSortCriteria()
Get the sort criteria allows to sort query results.
|
List<String> |
getTags()
Get the tag keys to match pages
|
I18nizableText |
getTitle()
Get the title
|
void |
setContext(PageFilter.Context context)
Set the search context
|
void |
setContextLanguage(PageFilter.ContextLanguage contextLang)
Set the context language
|
void |
setDepth(int depth)
Set the search depth
|
void |
setId(String id)
Set the filter id.
|
void |
setLength(int length)
Set the max number o results
|
void |
setPageId(String pageId)
set the parent page Id.
|
void |
setResolver(AmetysObjectResolver resolver)
Set the ametys object resolver to execute query
|
void |
setTitle(I18nizableText title)
Set the title
|
Map<String,String> getMetadataValues()
void addMetadata(String metadataId, String value)
metadataId
- The metadata id.value
- The value to test. Set null to test existencePageFilter.Context getContext()
void setContext(PageFilter.Context context)
context
- The search context to setPageFilter.ContextLanguage getContextLanguage()
void setContextLanguage(PageFilter.ContextLanguage contextLang)
contextLang
- The context languageint getDepth()
void setDepth(int depth)
depth
- The search depth. Set to 0
for no depth limitation.int getLength()
void setLength(int length)
length
- The max number of resultsSortCriteria getSortCriteria()
void setPageId(String pageId)
pageId
- Id of the parent page (when fetching child of a page).void addSortCriteria(String metadataId, boolean ascending, boolean useLowerCase)
metadataId
- The metadata id to sortascending
- true to ascending sortuseLowerCase
- true
for case insensitive order on a string propertyvoid setResolver(AmetysObjectResolver resolver)
resolver
- The ametys object resolver to setAmetysObjectIterable<Page> getMatchingPages(String siteName, String lang, Page page)
siteName
- The current site name.lang
- The current language. Can be null.page
- The current page.I18nizableText getTitle()
void setTitle(I18nizableText title)
title
- The title