public static boolean checkSelector ( SlingHttpServletRequest request , String key ) { String [ ] selectors = request . getRequestPathInfo ( ) . getSelectors ( ) ; for ( String selector : selectors ) { if ( selector . equals ( key ) ) { return true ; } } return false ; }
Retrieves a key in the selectors and returns true is the key is present .