Class DeclarativeRegistry

java.lang.Object
org.springframework.extensions.webscripts.DeclarativeRegistry
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, Registry

public class DeclarativeRegistry extends Object implements Registry, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Registry of declarative (scripted/template driven) Web Scripts
Author:
davidc
  • Field Details

    • WEBSCRIPT_DESC_XML

      public static final String WEBSCRIPT_DESC_XML
      Filename extension for webscript descriptor paths
      See Also:
  • Constructor Details

    • DeclarativeRegistry

      public DeclarativeRegistry()
  • Method Details

    • setDefaultWebScript

      public void setDefaultWebScript(String defaultWebScript)
      Parameters:
      defaultWebScript - String
    • setUriIndex

      public void setUriIndex(UriIndex uriIndex)
      Parameters:
      uriIndex - UriIndex
    • setSearchPath

      public void setSearchPath(SearchPath searchPath)
      Parameters:
      searchPath - SearchPath
    • setContainer

      public void setContainer(Container container)
      Parameters:
      container - Container
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
      Gets the Application Context Changed from protected to public is for Dev Tools FreeMarker Editor plugin
      Returns:
      application context
    • afterPropertiesSet

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

      public void reset()
      Description copied from interface: Registry
      Resets the Web Script Registry
      Specified by:
      reset in interface Registry
    • getPackage

      public Path getPackage(String scriptPackage)
      Description copied from interface: Registry
      Gets a Web Script Package
      Specified by:
      getPackage in interface Registry
      Parameters:
      scriptPackage - String
      Returns:
      web script path representing package
    • getUri

      public Path getUri(String scriptUri)
      Description copied from interface: Registry
      Gets a Web Script URL
      Specified by:
      getUri in interface Registry
      Parameters:
      scriptUri - String
      Returns:
      web script path representing uri
    • getFamily

      public Path getFamily(String scriptUri)
      Description copied from interface: Registry
      Gets a Web Script Family NOTE: - To get all families, pass / - To get a specific family, pass /{familyName}
      Specified by:
      getFamily in interface Registry
      Parameters:
      scriptUri - String
      Returns:
      web script path representing family
    • getWebScripts

      public Collection<WebScript> getWebScripts()
      Description copied from interface: Registry
      Gets all Web Scripts
      Specified by:
      getWebScripts in interface Registry
      Returns:
      web scripts
    • getFailures

      public Map<String,String> getFailures()
      Description copied from interface: Registry
      Gets all Web Script definitions that failed to register
      Specified by:
      getFailures in interface Registry
      Returns:
      map of error by web script definition file path
    • getWebScript

      public WebScript getWebScript(String id)
      Description copied from interface: Registry
      Gets a Web Script by Id
      Specified by:
      getWebScript in interface Registry
      Parameters:
      id - web script id
      Returns:
      web script
    • findWebScript

      public Match findWebScript(String method, String uri)
      Description copied from interface: Registry
      Gets a Web Script given an HTTP Method and URI
      Specified by:
      findWebScript in interface Registry
      Parameters:
      method - http method
      uri - uri
      Returns:
      script match (pair of script and uri that matched)
    • getLifecycle

      public Path getLifecycle(String lifecyclePath)
      Description copied from interface: Registry
      Gets a Lifecycle Family, for example, all deprecated web scripts NOTE: - To get all lifecycles, pass / - To get a specific lifecycle, pass /{lifecycleName}
      Specified by:
      getLifecycle in interface Registry
      Parameters:
      lifecyclePath - String
      Returns:
      web script path representing family
    • getPackageDescriptionDocument

      public PackageDescriptionDocument getPackageDescriptionDocument(String scriptPackage)
      Returns package description document with the given webscript package
      Specified by:
      getPackageDescriptionDocument in interface Registry
      Parameters:
      scriptPackage - webscript package
      Returns:
      list of package description document
    • getSchemaDescriptionDocument

      public SchemaDescriptionDocument getSchemaDescriptionDocument(String schemaId)
      Returns schema description document with the given id.
      Specified by:
      getSchemaDescriptionDocument in interface Registry
      Parameters:
      schemaId - schema id
      Returns:
      schema description document
    • getPackageDescriptionDocuments

      public Collection<PackageDescriptionDocument> getPackageDescriptionDocuments()
      Returns list of package description documents
      Specified by:
      getPackageDescriptionDocuments in interface Registry
      Returns:
      list of package description documents
    • getSchemaDescriptionDocuments

      public Collection<SchemaDescriptionDocument> getSchemaDescriptionDocuments()
      Returns list of schema description documents
      Specified by:
      getSchemaDescriptionDocuments in interface Registry
      Returns:
      list of schema description documents
    • getSchemaTypeDescriptionById

      public TypeDescription getSchemaTypeDescriptionById(String typeId)
      Returns schema type description document with given id
      Specified by:
      getSchemaTypeDescriptionById in interface Registry
      Parameters:
      typeId - id for schema description document
      Returns:
      schema type description document
    • getFailedPackageDescriptionsByPath

      public Map<String,String> getFailedPackageDescriptionsByPath()
      Returns list of package description documents that fail to register
      Specified by:
      getFailedPackageDescriptionsByPath in interface Registry
      Returns:
      the failedPackageDescriptionsByPath
    • getFailedSchemaDescriptionsByPath

      public Map<String,String> getFailedSchemaDescriptionsByPath()
      Returns list of schema description documents that fail to register
      Specified by:
      getFailedSchemaDescriptionsByPath in interface Registry
      Returns:
      the failedSchemaDescriptionsByPath