Package org.opencms.repository
Class CmsRepositoryFilter
java.lang.Object
org.opencms.repository.CmsRepositoryFilter
This class is a filter for the repositories.
It filters path names, depending on the configuration made.
- Since:
- 6.2.4
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilterRule
(String rule) Adds a new filter rule (regex) to the filter.Returns the filterRules.getType()
Returns the type.void
Initializes a configuration after all parameters have been added.boolean
isFiltered
(String path) Checks if a path is filtered out of the filter or not.void
setFilterRules
(List<Pattern> filterRules) Sets the filterRules.void
Sets the type.
-
Constructor Details
-
CmsRepositoryFilter
public CmsRepositoryFilter()Default constructor initializing member variables.
-
-
Method Details
-
addFilterRule
Adds a new filter rule (regex) to the filter.- Parameters:
rule
- the rule (regex) to add
-
getFilterRules
Returns the filterRules.- Returns:
- the filterRules
-
getType
Returns the type.- Returns:
- the type
-
initConfiguration
Initializes a configuration after all parameters have been added.- Throws:
CmsConfigurationException
- if something goes wrong
-
isFiltered
Checks if a path is filtered out of the filter or not.- Parameters:
path
- the path of a resource to check- Returns:
- true if the name matches one of the given filter patterns
-
setFilterRules
Sets the filterRules.- Parameters:
filterRules
- the filterRules to set
-
setType
Sets the type.- Parameters:
type
- the type to set
-