Package com.composum.sling.nodes.console
Class Consoles.ConsoleFilter
- java.lang.Object
-
- com.composum.sling.core.filter.ResourceFilter.AbstractResourceFilter
-
- com.composum.sling.nodes.console.Consoles.ConsoleFilter
-
- All Implemented Interfaces:
ResourceFilter
- Enclosing class:
- Consoles
public class Consoles.ConsoleFilter extends ResourceFilter.AbstractResourceFilter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.composum.sling.core.filter.ResourceFilter
ResourceFilter.AbstractResourceFilter, ResourceFilter.AllFilter, ResourceFilter.ContentNodeFilter, ResourceFilter.FilterSet, ResourceFilter.FolderFilter, ResourceFilter.MimeTypeFilter, ResourceFilter.NameFilter, ResourceFilter.NodeTypeFilter, ResourceFilter.PathFilter, ResourceFilter.PatternFilter, ResourceFilter.PrimaryTypeFilter, ResourceFilter.PropertyFilter, ResourceFilter.ResourceTypeFilter, ResourceFilter.TypeFilter
-
-
Field Summary
-
Fields inherited from interface com.composum.sling.core.filter.ResourceFilter
ALL, FOLDER, SIMPLE_ARRAY_PATTERN
-
-
Constructor Summary
Constructors Constructor Description ConsoleFilter(@NotNull BeanContext context, String... selectors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(@Nullable org.apache.sling.api.resource.Resource resource)
the core function of a filters says: this resource is appropriate or notboolean
isRestriction()
"Is a blacklist": this is a hint forResourceFilter.FilterSet
s that signals that the filter primary restricts values (is a blacklist) or not (is a whitelist).void
toString(@NotNull StringBuilder builder)
This constructs a rebuildable String view of the filter:ResourceFilterMapping.toString(ResourceFilter)
uses this method to construct that view,ResourceFilterMapping.fromString(String)
implements the inverse function to reconstruct the filter from the String view.-
Methods inherited from class com.composum.sling.core.filter.ResourceFilter.AbstractResourceFilter
toString
-
-
-
-
Constructor Detail
-
ConsoleFilter
public ConsoleFilter(@NotNull @NotNull BeanContext context, String... selectors)
-
-
Method Detail
-
accept
public boolean accept(@Nullable @Nullable org.apache.sling.api.resource.Resource resource)
Description copied from interface:ResourceFilter
the core function of a filters says: this resource is appropriate or not- Parameters:
resource
- the resource object to check- Returns:
- 'true' if the resource matches
-
isRestriction
public boolean isRestriction()
Description copied from interface:ResourceFilter
"Is a blacklist": this is a hint forResourceFilter.FilterSet
s that signals that the filter primary restricts values (is a blacklist) or not (is a whitelist).Basic idea: whitelist (restriction = false) is something that matches nothing except specified values, blacklist (restriction = true) is something that matches everything except specified values (restricts the set of everything).
- Returns:
- 'true' if this filter excludes objects
-
toString
public void toString(@NotNull @NotNull StringBuilder builder)
Description copied from interface:ResourceFilter
This constructs a rebuildable String view of the filter:ResourceFilterMapping.toString(ResourceFilter)
uses this method to construct that view,ResourceFilterMapping.fromString(String)
implements the inverse function to reconstruct the filter from the String view.- Parameters:
builder
- here the string representation is appended.- See Also:
ResourceFilterMapping
-
-