Package io.wcm.sling.commons.request
Class RequestPath
- java.lang.Object
-
- io.wcm.sling.commons.request.RequestPath
-
@ProviderType public final class RequestPath extends java.lang.Object
Utility methods when for sling paths and resources.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasAnySelector(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull java.lang.String @NotNull ... expectedSelectors)
Checks if one of the given selectors is present in the current URL request (at any position).static boolean
hasSelector(@NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull java.lang.String expectedSelector)
Checks if the given selector is present in the current URL request (at any position).
-
-
-
Method Detail
-
hasSelector
public static boolean hasSelector(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull java.lang.String expectedSelector)
Checks if the given selector is present in the current URL request (at any position).- Parameters:
request
- Sling requestexpectedSelector
- Selector string to check for.- Returns:
- true if the selector was found
-
hasAnySelector
public static boolean hasAnySelector(@NotNull @NotNull org.apache.sling.api.SlingHttpServletRequest request, @NotNull @NotNull java.lang.String @NotNull ... expectedSelectors)
Checks if one of the given selectors is present in the current URL request (at any position).- Parameters:
request
- Sling requestexpectedSelectors
- Selectors string to check for.- Returns:
- true if the selector was found
-
-