Description
This juggler filters the String and URL content of a composite product. It checks to see if ANY of the specified keywords are present in any of the subproducts of a composite product. It then either passes or rejects those subproducts. Non-string and URL subproducts (e.g. files and byte arrays) are passed blindly without any keyword checking.
Configuration Variables
wordListList of keywords to match against the product's string contents. Each word is in quotes as in:
"word1" "word2" "word3"
passOrReject
The match criteria which defaults topass
. If set toreject
the juggler rejects any product that matches any of the keywords.
Product
Product is null if there are no sources, or if there is nothing to pass.
How it Works
The filterSubproductByKeyword juggler applies a filter to the string and URL subproducts of its input product. The following criteria is used to keep or reject a given subproduct:
- If the match criteria is "pass" then a subproduct is passed along if any of the keywords matches (i.e. it is rejected if none of the keywords match).
- If the match criteria is "reject" then a subproduct is rejected if any of the keywords match.
- If the subproduct is not a string or URL then it is kept with the product.
The filtered product is pruned before sending it out such that a single subproduct inside a container or containers is reduced to the single subproduct, and empty containers are removed.
Revised: 12 January 1999