Package org.alfresco.repo.transfer
Class ContentClassFilter
java.lang.Object
org.alfresco.repo.transfer.AbstractNodeFilter
org.alfresco.repo.transfer.ContentClassFilter
- All Implemented Interfaces:
NodeFilter
- Author:
- brian
-
Field Summary
Fields inherited from class org.alfresco.repo.transfer.AbstractNodeFilter
serviceRegistry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanExamines the supplied node and indicates whether it has been accepted by the filter.voidinit()voidsetContentClasses(Collection<QName> contentClasses) Set the classes of content (types and aspects) to filter by.voidsetContentClasses(QName... contentClasses) Set the classes of content (types and aspects) to filter by.voidsetDirectOnly(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.voidsetExclude(boolean exclude) Specify whether the filter should exclude the specified classes of content.Methods inherited from class org.alfresco.repo.transfer.AbstractNodeFilter
setServiceRegistry
-
Constructor Details
-
ContentClassFilter
public ContentClassFilter() -
ContentClassFilter
-
-
Method Details
-
accept
Description copied from interface:NodeFilterExamines 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.
-
init
public void init()- Overrides:
initin classAbstractNodeFilter
-
setContentClasses
Set the classes of content (types and aspects) to filter by.- Parameters:
contentClasses- the contentClasses to set
-
setContentClasses
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.
-