Package com.day.cq.wcm.msm.commons
Class ItemFilterImpl
- java.lang.Object
-
- com.day.cq.wcm.msm.commons.ItemFilterImpl
-
public class ItemFilterImpl extends java.lang.ObjectProvides 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 booleanexcludes(Node node)Checks if a given node is excludedbooleanexcludes(Property property)Checks if a given property is excluded.booleanexcludesNodeType(java.lang.String nodeTypeName)Checks if a given node type name is excludedjava.util.Set<java.util.regex.Pattern>getNodeNamePattern()java.util.Set<java.util.regex.Pattern>getNodeTypePattern()java.util.Set<java.util.regex.Pattern>getPropertyNamePattern()
-
-
-
Method Detail
-
excludes
public boolean excludes(Property property) throws RepositoryException
Checks if a given property is excluded.- Parameters:
property- thePropertyto 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- theNodeto 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(java.lang.String nodeTypeName)
Checks if a given node type name is excluded- Parameters:
nodeTypeName- aStringcontaining 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
-
getNodeTypePattern
public java.util.Set<java.util.regex.Pattern> getNodeTypePattern()
-
getNodeNamePattern
public java.util.Set<java.util.regex.Pattern> getNodeNamePattern()
-
getPropertyNamePattern
public java.util.Set<java.util.regex.Pattern> getPropertyNamePattern()
-
-