org.jasig.portlet.search.mvc
Class GsaSearchController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.jasig.portlet.search.mvc.GsaSearchController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class GsaSearchController
extends org.springframework.web.servlet.mvc.AbstractController

GsaSearchController performs searches against a Google Search Appliance.

Version:
$Revision: 44240 $
Author:
Jen Bourey

Field Summary
 java.lang.String googleBaseUrl
           
 java.util.Map<java.lang.String,java.lang.String> googleParameters
           
 java.lang.String googleSearchServlet
           
 java.lang.String googleStylesheetName
           
 java.lang.String numberLimitParameterName
           
 java.lang.String queryParameterName
           
 java.lang.String siteParameterName
           
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
GsaSearchController()
           
 
Method Summary
protected  org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void setGoogleBaseUrl(java.lang.String googleBaseUrl)
          Set the base URL for Google searches.
 void setGoogleParameters(java.util.Map<java.lang.String,java.lang.String> googleParameters)
          Set a map of parameter names and values for google searches.
 void setGoogleStylesheetName(java.lang.String googleStylesheetName)
          Set the name of the google stylesheet to use in the "more results" link.
 void setNumberLimitParameterName(java.lang.String numberLimitParameterName)
          Set the name of the number limit parameter.
 void setQueryParameterName(java.lang.String queryParameterName)
          Set the name of the query parameter.
 void setSiteParameterName(java.lang.String siteParameterName)
          Set the name of the site parameter.
 void setView(org.springframework.web.servlet.View view)
          Set the View for the GSA search controller.
 
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
 
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

googleBaseUrl

public java.lang.String googleBaseUrl

googleStylesheetName

public java.lang.String googleStylesheetName

queryParameterName

public java.lang.String queryParameterName

siteParameterName

public java.lang.String siteParameterName

numberLimitParameterName

public java.lang.String numberLimitParameterName

googleSearchServlet

public java.lang.String googleSearchServlet

googleParameters

public java.util.Map<java.lang.String,java.lang.String> googleParameters
Constructor Detail

GsaSearchController

public GsaSearchController()
Method Detail

handleRequestInternal

protected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request,
                                                                             javax.servlet.http.HttpServletResponse response)
                                                                      throws java.lang.Exception
Specified by:
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractController
Throws:
java.lang.Exception

setView

public void setView(org.springframework.web.servlet.View view)
Set the View for the GSA search controller.

Parameters:
view -

setGoogleBaseUrl

public void setGoogleBaseUrl(java.lang.String googleBaseUrl)
Set the base URL for Google searches. This URL should include the protocol and server. Example: http://google.school.edu

Parameters:
googleBaseUrl -

setGoogleStylesheetName

public void setGoogleStylesheetName(java.lang.String googleStylesheetName)
Set the name of the google stylesheet to use in the "more results" link.

Parameters:
googleStylesheetName -

setQueryParameterName

public void setQueryParameterName(java.lang.String queryParameterName)
Set the name of the query parameter. "q" by default

Parameters:
queryParameterName -

setSiteParameterName

public void setSiteParameterName(java.lang.String siteParameterName)
Set the name of the site parameter. "site" by default

Parameters:
siteParameterName -

setNumberLimitParameterName

public void setNumberLimitParameterName(java.lang.String numberLimitParameterName)
Set the name of the number limit parameter. "num" by default

Parameters:
numberLimitParameterName -

setGoogleParameters

public void setGoogleParameters(java.util.Map<java.lang.String,java.lang.String> googleParameters)
Set a map of parameter names and values for google searches. These parameters may include instructions regarding encoding, client, etc.

Parameters:
googleParameters -


Copyright © 2009 Jasig. All Rights Reserved.