org.gcube.portlets.user.searchportlet.server
Class SearchServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.gcube.portlets.user.searchportlet.server.SearchServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, SearchService

public class SearchServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements SearchService

Search Servlet

Author:
Panagiota Koltsida, NKUA
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
SearchServlet()
           
 
Method Summary
 HashMap<CollectionBean,ArrayList<CollectionBean>> getAvailableCollections()
           
 String getLogoURL()
           
 Integer getNumberOfSelectedCollections()
          Gets the number of the selected collections, excluding group collections
 SearchAvailabilityType getSearchStatus()
           
 HashSet<String> getSelectedCollectionsFromSession()
           
 SearchTypeBean getSelectedSearchType()
           
 String getSimpleSearchTerm()
          This method returns the text that was last used in a simple search
 void init(javax.servlet.ServletConfig conf)
          Init Method
 void sendEmailWithErrorToSupport(Throwable caught)
           
 void setSelectedCollectionsToSession(HashSet<String> selectedCollections)
           
 void setSimpleSearchTerm(String term)
           
 String stackTraceAsString(Throwable caught)
           
 void submitGenericQuery(String term, SearchTypeBean type, HashSet<String> selectedCollections)
          Submits a simple query
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchServlet

public SearchServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig conf)
          throws javax.servlet.ServletException
Init Method

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

getLogoURL

public String getLogoURL()
Specified by:
getLogoURL in interface SearchService

getAvailableCollections

public HashMap<CollectionBean,ArrayList<CollectionBean>> getAvailableCollections()
                                                                          throws CollectionRetrievalException
Specified by:
getAvailableCollections in interface SearchService
Throws:
CollectionRetrievalException

getNumberOfSelectedCollections

public Integer getNumberOfSelectedCollections()
Gets the number of the selected collections, excluding group collections

Specified by:
getNumberOfSelectedCollections in interface SearchService
Returns:
the number of the selected collections

getSimpleSearchTerm

public String getSimpleSearchTerm()
This method returns the text that was last used in a simple search

Specified by:
getSimpleSearchTerm in interface SearchService
Returns:
the last text that used in a simple search

setSimpleSearchTerm

public void setSimpleSearchTerm(String term)
Specified by:
setSimpleSearchTerm in interface SearchService

setSelectedCollectionsToSession

public void setSelectedCollectionsToSession(HashSet<String> selectedCollections)
Specified by:
setSelectedCollectionsToSession in interface SearchService

getSelectedCollectionsFromSession

public HashSet<String> getSelectedCollectionsFromSession()
Specified by:
getSelectedCollectionsFromSession in interface SearchService

getSelectedSearchType

public SearchTypeBean getSelectedSearchType()
Specified by:
getSelectedSearchType in interface SearchService

getSearchStatus

public SearchAvailabilityType getSearchStatus()
Specified by:
getSearchStatus in interface SearchService

sendEmailWithErrorToSupport

public void sendEmailWithErrorToSupport(Throwable caught)
Specified by:
sendEmailWithErrorToSupport in interface SearchService

stackTraceAsString

public String stackTraceAsString(Throwable caught)
Specified by:
stackTraceAsString in interface SearchService

submitGenericQuery

public void submitGenericQuery(String term,
                               SearchTypeBean type,
                               HashSet<String> selectedCollections)
                        throws SearchSubmissionException
Submits a simple query

Specified by:
submitGenericQuery in interface SearchService
Throws:
SearchSubmissionException


Copyright © 2013. All Rights Reserved.