private URL buildUrl ( final String styleSheetPath , final boolean skipStylesFolder ) { URL cssResource = null ; final List < String > stylePaths = skipStylesFolder ? Collections . singletonList ( "" ) : ResourceParameters . STYLE_FOLDER . get ( ) ; for ( int i = 0 ; i < stylePaths . size ( ) && cssResource == null ; i ++ ) { String stylePath = stylePaths . get ( i ) ; if ( ! stylePath . isEmpty ( ) ) { stylePath += Resources . PATH_SEP ; } cssResource = Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( stylePath + styleSheetPath ) ; } if ( cssResource == null ) { LOGGER . error ( "Style Sheet : {} not found into base folder: {}" , styleSheetPath , ResourceParameters . STYLE_FOLDER . get ( ) ) ; } return cssResource ; }
Get a style sheet URL .