protected OptimizationLevel getOptimizationLevelFromRequest ( HttpServletRequest request ) { final String sourceMethod = "getOptimizationLevelFromRequest" ; //$NON-NLS-1$ boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( sourceClass , sourceMethod , new Object [ ] { request . getQueryString ( ) } ) ; } // Get the optimization level specified in the request and set the ComilationLevel String optimize = getParameter ( request , OPTIMIZATIONLEVEL_REQPARAMS ) ; OptimizationLevel level = OptimizationLevel . SIMPLE ; if ( optimize != null && ! optimize . equals ( "" ) ) { //$NON-NLS-1$ if ( optimize . equalsIgnoreCase ( "whitespace" ) ) //$NON-NLS-1$ level = OptimizationLevel . WHITESPACE ; else if ( optimize . equalsIgnoreCase ( "advanced" ) ) //$NON-NLS-1$ level = OptimizationLevel . ADVANCED ; else if ( optimize . equalsIgnoreCase ( "none" ) ) //$NON-NLS-1$ level = OptimizationLevel . NONE ; } if ( isTraceLogging ) { log . exiting ( sourceClass , sourceMethod , level ) ; } return level ; }
Returns the requested optimization level from the request .