protected String getHasConditionsFromRequest(HttpServletRequest request) throws IOException {

		final String sourceMethod = "getHasConditionsFromRequest"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(sourceClass, sourceMethod, new Object[]{request});
		}
		String ret = null;
		if (request.getParameter(FEATUREMAPHASH_REQPARAM) != null) {
			// The cookie called 'has' contains the has conditions
			if (isTraceLogging) {
				log.finer("has hash = " + request.getParameter(FEATUREMAPHASH_REQPARAM)); //$NON-NLS-1$
			}
			Cookie[] cookies = request.getCookies();
			if (cookies != null) {
				for (int i = 0; ret == null && i < cookies.length; i++) {
					Cookie cookie = cookies[i];
					if (cookie.getName().equals(FEATUREMAP_REQPARAM) && cookie.getValue() != null) {
						if (isTraceLogging) {
							log.finer("has cookie = " + cookie.getValue()); //$NON-NLS-1$
						}
						ret = URLDecoder.decode(cookie.getValue(), "US-ASCII"); //$NON-NLS-1$
						break;
					}
				}
			}
			if (ret == null) {
				if (log.isLoggable(Level.WARNING)) {
					StringBuffer url = request.getRequestURL();
					if (url != null) {	// might be null if using mock request for unit testing
						url.append("?").append(request.getQueryString()).toString(); //$NON-NLS-1$
						log.warning(MessageFormat.format(
								Messages.AbstractHttpTransport_0,
								new Object[]{url, request.getHeader("User-Agent")})); //$NON-NLS-1$
					}
				}
			}
		}
		else {
			ret = request.getParameter(FEATUREMAP_REQPARAM);
			if (isTraceLogging) {
				log.finer("reading features from has query arg"); //$NON-NLS-1$
			}
		}
		if (isTraceLogging) {
			log.exiting(sourceClass, sourceMethod, ret);
		}
		return ret;
	}
protected String getHasConditionsFromRequest ( HttpServletRequest request ) throws IOException { final String sourceMethod = "getHasConditionsFromRequest" ; boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( sourceClass , sourceMethod , new Object [ ] { request } ) ; } String ret = null ; if ( request . getParameter ( FEATUREMAPHASH_REQPARAM ) != null ) { if ( isTraceLogging ) { log . finer ( "has hash = " + request . getParameter ( FEATUREMAPHASH_REQPARAM ) ) ; } Cookie [ ] cookies = request . getCookies ( ) ; if ( cookies != null ) { for ( int i = 0 ; ret == null && i < cookies . length ; i ++ ) { Cookie cookie = cookies [ i ] ; if ( cookie . getName ( ) . equals ( FEATUREMAP_REQPARAM ) && cookie . getValue ( ) != null ) { if ( isTraceLogging ) { log . finer ( "has cookie = " + cookie . getValue ( ) ) ; } ret = URLDecoder . decode ( cookie . getValue ( ) , "US-ASCII" ) ; break ; } } } if ( ret == null ) { if ( log . isLoggable ( Level . WARNING ) ) { StringBuffer url = request . getRequestURL ( ) ; if ( url != null ) { url . append ( "?" ) . append ( request . getQueryString ( ) ) . toString ( ) ; log . warning ( MessageFormat . format ( Messages . AbstractHttpTransport_0 , new Object [ ] { url , request . getHeader ( "User-Agent" ) } ) ) ; } } } } else { ret = request . getParameter ( FEATUREMAP_REQPARAM ) ; if ( isTraceLogging ) { log . finer ( "reading features from has query arg" ) ; } } if ( isTraceLogging ) { log . exiting ( sourceClass , sourceMethod , ret ) ; } return ret ; }
This method checks the request for the has conditions which may either be contained in URL
query arguments or in a cookie sent from the client.

@param request
the request object
@return The has conditions from the request.
@throws IOException
@throws UnsupportedEncodingException