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" propertyvoid
boolean
isExcluded
(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 void
preprocessExcludedTypes
(List<String> excludeTypeNames) Processes the user-defined list of types into valid QNames and models, it validates them against the dictionary and also supports wildcardsvoid
setExcluded
(QName typeQName, boolean excluded) Exclude the typevoid
setExcludedTypes
(List<String> excludedTypes)
-
Constructor Details
-
QNameFilterImpl
public QNameFilterImpl()
-
-
Method Details
-
filterQName
Filters out any QName defined in the "excludedModels" property- Specified by:
filterQName
in 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:
isExcluded
in interfaceQNameFilter
- Parameters:
typeQName
- QName- Returns:
- boolean true if it is excluded
-
initFilter
public void initFilter()- Specified by:
initFilter
in 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:QNameFilter
Exclude the type- Specified by:
setExcluded
in interfaceQNameFilter
- Parameters:
typeQName
- the type to exclude
-