@ Override public void init ( final FilterConfig filterConfig ) throws ServletException { // final String decoraManagerClass = filterConfig . getInitParameter ( PARAM_DECORA_MANAGER ) ; if ( decoraManagerClass != null ) { try { final Class decoraManagerType = ClassLoaderUtil . loadClass ( decoraManagerClass ) ; decoraManager = ( DecoraManager ) ClassUtil . newInstance ( decoraManagerType ) ; } catch ( Exception ex ) { log . error ( "Unable to load Decora manager class: " + decoraManagerClass , ex ) ; throw new ServletException ( ex ) ; } } else { decoraManager = createDecoraManager ( ) ; } // final String decoraParserClass = filterConfig . getInitParameter ( PARAM_DECORA_PARSER ) ; if ( decoraParserClass != null ) { try { final Class decoraParserType = ClassLoaderUtil . loadClass ( decoraParserClass ) ; decoraParser = ( DecoraParser ) ClassUtil . newInstance ( decoraParserType ) ; } catch ( Exception ex ) { log . error ( "Unable to load Decora parser class: " + decoraParserClass , ex ) ; throw new ServletException ( ex ) ; } } else { decoraParser = createDecoraParser ( ) ; } // final String decoraCache = filterConfig . getInitParameter ( PARAM_DECORA_CACHE ) ; if ( decoraCache != null ) { cached = Converter . get ( ) . toBoolean ( decoraCache , false ) ; } }
Initializes Decora filter . Loads manager and parser from init parameters .