Package com.day.cq.wcm.msm.commons
Class ItemFilterImpl
- java.lang.Object
-
- com.day.cq.wcm.msm.commons.ItemFilterImpl
-
public class ItemFilterImpl extends Object
Provides item filter capabilities through a set of patters that allow excluding of nodes, properties and node types based on a set of patterns.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
excludes(Node node)
Checks if a given node is excludedboolean
excludes(Property property)
Checks if a given property is excluded.boolean
excludesNodeType(String nodeTypeName)
Checks if a given node type name is excludedSet<Pattern>
getNodeNamePattern()
Set<Pattern>
getNodeTypePattern()
Set<Pattern>
getPropertyNamePattern()
-
-
-
Method Detail
-
excludes
public boolean excludes(Property property) throws RepositoryException
Checks if a given property is excluded.- Parameters:
property
- theProperty
to be checked- Returns:
- True in the following cases: - property is protected or automatically created - property pattern is empty and the default filter's excludes returns true - property's parent node is excluded OR the property name is a MSM reserved property (as indicated by the RolloutManager) OR one of the property patterns matches the property's name
- Throws:
RepositoryException
- Throws RepositoryException
-
excludes
public boolean excludes(Node node) throws RepositoryException
Checks if a given node is excluded- Parameters:
node
- theNode
to be checked- Returns:
- True in the following cases: - node is protected - node name is a MSM reserved property - node type or mixin type is excluded - name matches one of the patterns in the node pattern set of this filter or the default filter if this filter is empty
- Throws:
RepositoryException
- Throws RepositoryException
-
excludesNodeType
public boolean excludesNodeType(String nodeTypeName)
Checks if a given node type name is excluded- Parameters:
nodeTypeName
- aString
containing the node type- Returns:
- True if: - default filter excludeNodeType returns true, when this node type pattern set is empty - node type name matches one of patterns in the node type pattern set
-
-