org.apache.catalina.storeconfig

## Class StoreLoader

- java.lang.Object
- - org.apache.catalina.storeconfig.StoreLoader

-     public class StoreLoader
      extends Object

  XML Format

       <Registry name="" encoding="UTF8" >
               <Description
                   tag="Server"
                   standard="true"
                   default="true"
                   tagClass="org.apache.catalina.core.StandardServer"
                   storeFactoryClass="org.apache.catalina.storeconfig.StandardServerSF">
                 <TransientAttributes>
                   <Attribute></Attribute>
                 </TransientAttributes>
                 <TransientChildren>
                   <Child></Child>
                 </TransientChildren>
               </Description>
         ...
             </Registry>

  Convention:
  - Factories at subpackage org.apache.catalina.core.storeconfig.xxxSF .
  - Element name are the unique Class name
  - SF for StoreFactory
  - standard implementation is false
  other things:
  - Registry XML format is a very good option
  - Store format is not fix
  - We hope with the parent declaration we can build recursive child store operation //dream
  - Problem is to access child data from array,collections or normal detail object
  - Default definitions for Listener, Valve Resource? - Based on interface type!

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static Digester` | `digester` The `Digester` instance used to parse registry descriptors.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoreLoader()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static Digester` | `createDigester()` Create and configure the Digester we will be using for setup store registry.
    `StoreRegistry` | `getRegistry()`
    `URL` | `getRegistryResource()`
    `void` | `load()` Load from defaults System Property URL catalina.storeregistry File ${catalina.base}/conf/server-registry.xml class resource org/apache/catalina/storeconfig/server-registry.xml
    `void` | `load(String aURL)` Load main configuration file from external source.
    `protected File` | `serverFile(String aFile)` Find main configuration file.
    `void` | `setRegistry(StoreRegistry registry)`

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

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

- - ### Field Detail

    - #### digester

          protected static final Digester digester

      The `Digester` instance used to parse registry descriptors.

  - ### Constructor Detail

    - #### StoreLoader

          public StoreLoader()

  - ### Method Detail

    - #### getRegistry

          public StoreRegistry getRegistry()

      Returns:
        Returns the registry.

    - #### setRegistry

          public void setRegistry(StoreRegistry registry)

      Parameters:
        `registry` - The registry to set.

    - #### createDigester

          protected static Digester createDigester()

      Create and configure the Digester we will be using for setup store registry.
      Returns:
        the XML digester that will be used to parse the configuration

    - #### serverFile

          protected File serverFile(String aFile)

      Find main configuration file.
      Parameters:
        `aFile` - File name, absolute or relative to `${catalina.base}/conf`, if not specified `server-registry.xml` is used
      Returns:
        The file

    - #### load

          public void load(String aURL)

      Load main configuration file from external source.
      Parameters:
        `aURL` - URL to the configuration file

    - #### load

          public void load()

      Load from defaults
      - System Property URL catalina.storeregistry
      - File ${catalina.base}/conf/server-registry.xml
      - class resource org/apache/catalina/storeconfig/server-registry.xml

    - #### getRegistryResource

          public URL getRegistryResource()

      Returns:
        the registryResource.

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