Class Filters
- java.lang.Object
-
- com.adobe.acs.commons.fam.actions.Filters
-
@ProviderType public class Filters extends Object
Utility filters useful for sifting through search results without over-complicating search queries.
-
-
Field Summary
Fields Modifier and Type Field Description static CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean>FILTER_ASSETS_WITH_OUTDATED_RENDITIONSThis filter identifies assets where the original rendition is newer than any of the other renditions.static CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean>FILTER_NON_ASSETSDetermine if node is a valid asset, skip any non-assets It's better to filter via query if possible to avoid having to use this return True if assetstatic CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean>FILTER_OUT_SUBASSETSExclude subassets from processingstatic CheckedFunction<Boolean,Boolean>NOTReturns opposite of its input, e.g.static StringORIGINAL_RENDITION
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean>filterMatching(String glob)Returns true of glob matches provided pathstatic CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean>filterNotMatching(String glob)Returns false if glob matches provided path Useful for things like filterOutSubassets
-
-
-
Field Detail
-
ORIGINAL_RENDITION
public static final String ORIGINAL_RENDITION
- See Also:
- Constant Field Values
-
NOT
public static final CheckedFunction<Boolean,Boolean> NOT
Returns opposite of its input, e.g. filterMatching(glob).andThen(not)
-
FILTER_OUT_SUBASSETS
public static final CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean> FILTER_OUT_SUBASSETS
Exclude subassets from processing
-
FILTER_NON_ASSETS
public static final CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean> FILTER_NON_ASSETS
Determine if node is a valid asset, skip any non-assets It's better to filter via query if possible to avoid having to use this return True if asset
-
FILTER_ASSETS_WITH_OUTDATED_RENDITIONS
public static final CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean> FILTER_ASSETS_WITH_OUTDATED_RENDITIONS
This filter identifies assets where the original rendition is newer than any of the other renditions. This is an especially useful function for updating assets with missing or outdated thumbnails. return True if asset has no thumbnails or outdated thumbnails
-
-
Method Detail
-
filterMatching
public static final CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean> filterMatching(String glob)
Returns true of glob matches provided path- Parameters:
glob- Regex expression- Returns:
- True for matches
-
filterNotMatching
public static final CheckedBiFunction<org.apache.sling.api.resource.ResourceResolver,String,Boolean> filterNotMatching(String glob)
Returns false if glob matches provided path Useful for things like filterOutSubassets- Parameters:
glob- Regex expression- Returns:
- False for matches
-
-