Package org.alfresco.opencmis.dictionary
Class QNameFilterImpl
java.lang.Object
org.alfresco.opencmis.dictionary.QNameFilterImpl
- All Implemented Interfaces:
QNameFilter
Filters a QName and excludes any that are defined using the excludedTypes parameter. The list of types can either be defined using a property name such as "cm:name" or with a wildcard: "cm:*" It validates the definitions against the DataDictionary.
- Author:
- steveglover, Gethin James
-
Field Summary
Fields inherited from interface org.alfresco.opencmis.dictionary.QNameFilter
WILDCARD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilterQName(Collection<QName> typesToFilter) Filters out any QName defined in the "excludedModels" propertyvoidbooleanisExcluded(QName typeQName) Indicates that this QName should be excluded.I don't like hard code values, but have been persuaded its less pain than having to keep a config file in sync with both sides of SOLR.protected voidpreprocessExcludedTypes(List<String> excludeTypeNames) Processes the user-defined list of types into valid QNames and models, it validates them against the dictionary and also supports wildcardsvoidsetExcluded(QName typeQName, boolean excluded) Exclude the typevoidsetExcludedTypes(List<String> excludedTypes)
-
Constructor Details
-
QNameFilterImpl
public QNameFilterImpl()
-
-
Method Details
-
filterQName
Filters out any QName defined in the "excludedModels" property- Specified by:
filterQNamein interfaceQNameFilter- Parameters:
typesToFilter- - original list- Returns:
- the filtered list
-
preprocessExcludedTypes
Processes the user-defined list of types into valid QNames and models, it validates them against the dictionary and also supports wildcards -
isExcluded
Indicates that this QName should be excluded.- Specified by:
isExcludedin interfaceQNameFilter- Parameters:
typeQName- QName- Returns:
- boolean true if it is excluded
-
initFilter
public void initFilter()- Specified by:
initFilterin interfaceQNameFilter
-
setExcludedTypes
-
listOfHardCodedExcludedTypes
I don't like hard code values, but have been persuaded its less pain than having to keep a config file in sync with both sides of SOLR. -
setExcluded
Description copied from interface:QNameFilterExclude the type- Specified by:
setExcludedin interfaceQNameFilter- Parameters:
typeQName- the type to exclude
-