Class SearchProxy

java.lang.Object
org.springframework.extensions.webscripts.AbstractWebScript
org.alfresco.repo.web.scripts.bean.SearchProxy
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.extensions.webscripts.WebScript

public class SearchProxy extends org.springframework.extensions.webscripts.AbstractWebScript implements org.springframework.beans.factory.InitializingBean
Alfresco OpenSearch Proxy Service Provides the ability to submit a request to a registered search engine via the Alfresco server.
Author:
davidc
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.AbstractWebScript

    org.springframework.extensions.webscripts.AbstractWebScript.ScriptDetails
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.extensions.config.ConfigService
     
    protected org.springframework.extensions.webscripts.FormatRegistry
     
    protected String
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    createUrl(String engine, String url, String mimetype)
    Construct a "proxied" search engine url
    Construct a "proxied" search engine url
    void
    execute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res)
     
    void
    setConfigService(org.springframework.extensions.config.ConfigService configService)
     
    void
    setFormatRegistry(org.springframework.extensions.webscripts.FormatRegistry formatRegistry)
     

    Methods inherited from class org.springframework.extensions.webscripts.AbstractWebScript

    addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • formatRegistry

      protected org.springframework.extensions.webscripts.FormatRegistry formatRegistry
    • configService

      protected org.springframework.extensions.config.ConfigService configService
    • searchConfig

      protected OpenSearchConfigElement searchConfig
    • proxyPath

      protected String proxyPath
  • Constructor Details

    • SearchProxy

      public SearchProxy()
  • Method Details

    • setFormatRegistry

      public void setFormatRegistry(org.springframework.extensions.webscripts.FormatRegistry formatRegistry)
      Parameters:
      formatRegistry - FormatRegistry
    • setConfigService

      public void setConfigService(org.springframework.extensions.config.ConfigService configService)
      Parameters:
      configService - ConfigService
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • execute

      public void execute(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.WebScriptResponse res) throws IOException
      Specified by:
      execute in interface org.springframework.extensions.webscripts.WebScript
      Throws:
      IOException
    • createUrl

      public String createUrl(OpenSearchConfigElement.EngineConfig engine, String mimetype)
      Construct a "proxied" search engine url
      Parameters:
      engine - engine name (as identified by )
      mimetype - url to proxy (as identified by mimetype)
      Returns:
      "proxied" url
    • createUrl

      public String createUrl(String engine, String url, String mimetype)
      Construct a "proxied" search engine url
      Parameters:
      engine - engine name (as identified by )
      url - engine url
      mimetype - mimetype of url
      Returns:
      "proxied" url