org.opencms.repository
Class CmsRepositoryFilter

java.lang.Object
  extended by org.opencms.repository.CmsRepositoryFilter

public class CmsRepositoryFilter
extends java.lang.Object

This class is a filter for the repositories.

It filters path names, depending on the configuration made.

Since:
6.2.4
Version:
$Revision: 1.8 $
Author:
Peter Bonrad

Constructor Summary
CmsRepositoryFilter()
          Default constructor initializing member variables.
 
Method Summary
 void addFilterRule(java.lang.String rule)
          Adds a new filter rule (regex) to the filter.
 java.util.List getFilterRules()
          Returns the filterRules.
 java.lang.String getType()
          Returns the type.
 void initConfiguration()
          Initializes a configuration after all parameters have been added.
 boolean isFiltered(java.lang.String path)
          Checks if a path is filtered out of the filter or not.
 void setFilterRules(java.util.List filterRules)
          Sets the filterRules.
 void setType(java.lang.String type)
          Sets the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsRepositoryFilter

public CmsRepositoryFilter()
Default constructor initializing member variables.

Method Detail

addFilterRule

public void addFilterRule(java.lang.String rule)
Adds a new filter rule (regex) to the filter.

Parameters:
rule - the rule (regex) to add

getFilterRules

public java.util.List getFilterRules()
Returns the filterRules.

Returns:
the filterRules

getType

public java.lang.String getType()
Returns the type.

Returns:
the type

initConfiguration

public void initConfiguration()
                       throws CmsConfigurationException
Initializes a configuration after all parameters have been added.

Throws:
CmsConfigurationException - if something goes wrong

isFiltered

public boolean isFiltered(java.lang.String path)
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

public void setFilterRules(java.util.List filterRules)
Sets the filterRules.

Parameters:
filterRules - the filterRules to set

setType

public void setType(java.lang.String type)
Sets the type.

Parameters:
type - the type to set