Class ContentClassFilter

    • Constructor Detail

      • ContentClassFilter

        public ContentClassFilter()
      • ContentClassFilter

        public ContentClassFilter​(QName... contentClasses)
    • Method Detail

      • accept

        public boolean accept​(NodeRef thisNode)
        Description copied from interface: NodeFilter
        Examines the supplied node and indicates whether it has been accepted by the filter.
        Parameters:
        thisNode - NodeRef
        Returns:
        true if the supplied node matches the criteria specified on this filter, and false otherwise.
      • setContentClasses

        public void setContentClasses​(Collection<QName> contentClasses)
        Set the classes of content (types and aspects) to filter by.
        Parameters:
        contentClasses - the contentClasses to set
      • setContentClasses

        public void setContentClasses​(QName... contentClasses)
        Set the classes of content (types and aspects) to filter by.
        Parameters:
        contentClasses - the contentClasses to set
      • setExclude

        public void setExclude​(boolean exclude)
        Specify whether the filter should exclude the specified classes of content.
        Parameters:
        exclude - If true then this filter will not accept content that is of any of the filtered classes of content. If false then this filter will only accept content that has one or more of the filtered classes of content. Defaults to false.
      • setDirectOnly

        public void setDirectOnly​(boolean directOnly)
        Specify whether the filter should only test against the content classes that have been supplied, or if it should also test against all subclasses of those classes. For example, if "directOnly" is true and "cm:content" is in the set of content classes then a node of type "cm:thumnail" will not be filtered.
        Parameters:
        directOnly - If true then the filter only filters specifically the specified content classes. Defaults to false.