Package org.ametys.web.filter
Class StaticPageFilter
- java.lang.Object
-
- org.ametys.web.filter.DefaultPageFilter
-
- org.ametys.web.filter.StaticPageFilter
-
- All Implemented Interfaces:
PluginAware
,PageFilter
,Configurable
,Serviceable
public class StaticPageFilter extends DefaultPageFilter implements Configurable, PluginAware, Serviceable
This class represents a static filter for pages
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.web.filter.PageFilter
PageFilter.Context, PageFilter.ContextLanguage
-
-
Field Summary
Fields Modifier and Type Field Description protected String
_featureName
The feature nameprotected String
_pluginName
The plugin name-
Fields inherited from class org.ametys.web.filter.DefaultPageFilter
_context, _contextLang, _depth, _id, _length, _logger, _metadata, _pageId, _resolver, _sortCriteria, _tags, _title
-
-
Constructor Summary
Constructors Constructor Description StaticPageFilter()
Empty constructorStaticPageFilter(String id, AmetysObjectResolver resolver)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PageFilter.Context
_configureContext(Configuration configuration)
Configure the context searchprotected PageFilter.ContextLanguage
_configureContextLanguage(Configuration configuration)
Configure the context languageprotected int
_configureDepth(Configuration configuration)
Configure the depth searchprotected Map<String,String>
_configureMetadata(Configuration configuration)
Configure the metadataprotected SortCriteria
_configureSortCriteria(Configuration configuration)
Configure the sort criteriaprotected List<String>
_configureTags(Configuration configuration)
Configure the tag keysvoid
configure(Configuration configuration)
void
service(ServiceManager smanager)
void
setPluginInfo(String pluginName, String featureName, String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.-
Methods inherited from class org.ametys.web.filter.DefaultPageFilter
addMetadata, addSortCriteria, addTag, getContext, getContextExpression, getContextLanguage, getContextLanguagesExpression, getDepth, getFilterExpression, getId, getLength, getMatchingPages, getMetadataExpression, getMetadataValues, getPageId, getSortCriteria, getTags, getTagsExpression, getTitle, getXPathQuery, getXPathQuery, setContext, setContextLanguage, setDepth, setId, setLength, setPageId, setResolver, setTitle
-
-
-
-
Field Detail
-
_pluginName
protected String _pluginName
The plugin name
-
_featureName
protected String _featureName
The feature name
-
-
Constructor Detail
-
StaticPageFilter
public StaticPageFilter()
Empty constructor
-
StaticPageFilter
public StaticPageFilter(String id, AmetysObjectResolver resolver)
Constructor- Parameters:
id
- The filter idresolver
- The ametys object resolver
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
setPluginInfo
public void setPluginInfo(String pluginName, String featureName, String id)
Description copied from interface:PluginAware
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfo
in interfacePluginAware
- Parameters:
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this component
-
configure
public void configure(Configuration configuration) throws ConfigurationException
- Specified by:
configure
in interfaceConfigurable
- Throws:
ConfigurationException
-
_configureTags
protected List<String> _configureTags(Configuration configuration) throws ConfigurationException
Configure the tag keys- Parameters:
configuration
- The tags configuration- Returns:
- The set of tag keys
- Throws:
ConfigurationException
- If an error occurs
-
_configureMetadata
protected Map<String,String> _configureMetadata(Configuration configuration) throws ConfigurationException
Configure the metadata- Parameters:
configuration
- The metadata configuration- Returns:
- The metadata to filter by
- Throws:
ConfigurationException
- If an error occurs
-
_configureSortCriteria
protected SortCriteria _configureSortCriteria(Configuration configuration) throws ConfigurationException
Configure the sort criteria- Parameters:
configuration
- The sort criteria configuration- Returns:
- The sort criteria
- Throws:
ConfigurationException
- If an error occurs
-
_configureContext
protected PageFilter.Context _configureContext(Configuration configuration) throws ConfigurationException
Configure the context search- Parameters:
configuration
- The context configuration- Returns:
- The search context
- Throws:
ConfigurationException
- If an error occurs
-
_configureContextLanguage
protected PageFilter.ContextLanguage _configureContextLanguage(Configuration configuration) throws ConfigurationException
Configure the context language- Parameters:
configuration
- The context configuration- Returns:
- The context language
- Throws:
ConfigurationException
- If an error occurs
-
_configureDepth
protected int _configureDepth(Configuration configuration) throws ConfigurationException
Configure the depth search- Parameters:
configuration
- The depth configuration- Returns:
- The depth
- Throws:
ConfigurationException
- If an error occurs
-
-