Class ContentClassFilter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(org.alfresco.service.cmr.repository.NodeRef thisNode)
      Examines the supplied node and indicates whether it has been accepted by the filter.
      void init()  
      void setContentClasses​(java.util.Collection<org.alfresco.service.namespace.QName> contentClasses)
      Set the classes of content (types and aspects) to filter by.
      void setContentClasses​(org.alfresco.service.namespace.QName... contentClasses)
      Set the classes of content (types and aspects) to filter by.
      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.
      void setExclude​(boolean exclude)
      Specify whether the filter should exclude the specified classes of content.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContentClassFilter

        public ContentClassFilter()
      • ContentClassFilter

        public ContentClassFilter​(org.alfresco.service.namespace.QName... contentClasses)
    • Method Detail

      • accept

        public boolean accept​(org.alfresco.service.cmr.repository.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​(java.util.Collection<org.alfresco.service.namespace.QName> contentClasses)
        Set the classes of content (types and aspects) to filter by.
        Parameters:
        contentClasses - the contentClasses to set
      • setContentClasses

        public void setContentClasses​(org.alfresco.service.namespace.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.