CatalinaBaseConfigurationSource (Apache Tomcat 9.0.37 API Documentation)

org.apache.catalina.startup

## Class CatalinaBaseConfigurationSource

- java.lang.Object
- - org.apache.catalina.startup.CatalinaBaseConfigurationSource

- All Implemented Interfaces:
    ConfigurationSource

      public class CatalinaBaseConfigurationSource
      extends Object
      implements ConfigurationSource

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tomcat.util.file.ConfigurationSource

      `ConfigurationSource.Resource`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static StringManager` | `sm`

    - ### Fields inherited from interface org.apache.tomcat.util.file.ConfigurationSource

      `DEFAULT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CatalinaBaseConfigurationSource(File catalinaBaseFile, String serverXmlPath)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConfigurationSource.Resource` | `getResource(String name)` Get a resource, not based on the conf path.
    `ConfigurationSource.Resource` | `getServerXml()` Returns the contents of the main conf/server.xml file.
    `URI` | `getURI(String name)` Get a URI to the given resource.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.tomcat.util.file.ConfigurationSource

      `getConfResource, getSharedWebXml`

- - ### Field Detail

    - #### sm

          protected static final StringManager sm

  - ### Constructor Detail

    - #### CatalinaBaseConfigurationSource

          public CatalinaBaseConfigurationSource(File catalinaBaseFile,
                                                 String serverXmlPath)

  - ### Method Detail

    - #### getServerXml

          public ConfigurationSource.Resource getServerXml()
                                                    throws IOException

      Description copied from interface: `ConfigurationSource`
      Returns the contents of the main conf/server.xml file.
      Specified by:
        `getServerXml` in interface `ConfigurationSource`
      Returns:
        the server.xml as an InputStream
      Throws:
        `IOException` - if an error occurs or if the resource does not exist

    - #### getResource

          public ConfigurationSource.Resource getResource(String name)
                                                   throws IOException

      Description copied from interface: `ConfigurationSource`
      Get a resource, not based on the conf path.
      Specified by:
        `getResource` in interface `ConfigurationSource`
      Parameters:
        `name` - The resource name
      Returns:
        the resource
      Throws:
        `IOException` - if an error occurs or if the resource does not exist

    - #### getURI

          public URI getURI(String name)

      Description copied from interface: `ConfigurationSource`
      Get a URI to the given resource. Unlike getResource, this will also return URIs to locations where no resource exists.
      Specified by:
        `getURI` in interface `ConfigurationSource`
      Parameters:
        `name` - The resource name
      Returns:
        a URI representing the resource location

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.