org.apache.catalina.storeconfig

## Class StoreFactoryBase

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

- All Implemented Interfaces:
    IStoreFactory
  Direct Known Subclasses:
    CatalinaClusterSF, ChannelSF, ConnectorSF, CredentialHandlerSF, GlobalNamingResourcesSF, InterceptorSF, JarScannerSF, LoaderSF, ManagerSF, NamingResourcesSF, OpenSSLConfSF, PersistentManagerSF, RealmSF, SenderSF, SSLHostConfigSF, StandardContextSF, StandardEngineSF, StandardHostSF, StandardServerSF, StandardServiceSF, WatchedResourceSF, WebResourceRootSF, WrapperLifecycleSF, WrapperListenerSF

      public class StoreFactoryBase
      extends Object
      implements IStoreFactory

  StoreFactory saves special elements. Output was generate with StoreAppenders.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static StringManager` | `sm` The string manager for this package.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StoreFactoryBase()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getInfo()`
    `StoreRegistry` | `getRegistry()` get Registry
    `StoreAppender` | `getStoreAppender()`
    `void` | `setRegistry(StoreRegistry aRegistry)` Set Registry
    `void` | `setStoreAppender(StoreAppender storeAppender)`
    `void` | `store(PrintWriter aWriter, int indent, Object aElement)` Store a server.xml element with attributes and children
    `void` | `storeChildren(PrintWriter aWriter, int indent, Object aElement, StoreDescription elementDesc)` Must Implement at subclass for custom store children handling.
    `protected void` | `storeElement(PrintWriter aWriter, int indent, Object aTagElement)` Store only elements from storeChildren methods that are not a transient child.
    `protected void` | `storeElementArray(PrintWriter aWriter, int indent, Object[] elements)` Save a array of elements.
    `void` | `storeXMLHead(PrintWriter aWriter)`

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

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

- - ### Field Detail

    - #### sm

          protected static final StringManager sm

      The string manager for this package.

  - ### Constructor Detail

    - #### StoreFactoryBase

          public StoreFactoryBase()

  - ### Method Detail

    - #### getInfo

          public String getInfo()

      Returns:
        descriptive information about this Factory implementation and the corresponding version number, in the format `<description>/<version>`.

    - #### getStoreAppender

          public StoreAppender getStoreAppender()

      Specified by:
        `getStoreAppender` in interface `IStoreFactory`
      Returns:
        Returns the storeAppender.

    - #### setStoreAppender

          public void setStoreAppender(StoreAppender storeAppender)

      Specified by:
        `setStoreAppender` in interface `IStoreFactory`
      Parameters:
        `storeAppender` - The storeAppender to set.

    - #### setRegistry

          public void setRegistry(StoreRegistry aRegistry)

      Set Registry
      Specified by:
        `setRegistry` in interface `IStoreFactory`
      See Also:
        `IStoreFactory.setRegistry(org.apache.catalina.storeconfig.StoreRegistry)`

    - #### getRegistry

          public StoreRegistry getRegistry()

      get Registry
      Specified by:
        `getRegistry` in interface `IStoreFactory`
      See Also:
        `IStoreFactory.getRegistry()`

    - #### storeXMLHead

          public void storeXMLHead(PrintWriter aWriter)

      Specified by:
        `storeXMLHead` in interface `IStoreFactory`

    - #### store

          public void store(PrintWriter aWriter,
                   int indent,
                   Object aElement)
                     throws Exception

      Store a server.xml element with attributes and children
      Specified by:
        `store` in interface `IStoreFactory`
      Throws:
        `Exception`
      See Also:
        `IStoreFactory.store(java.io.PrintWriter, int, java.lang.Object)`

    - #### storeChildren

          public void storeChildren(PrintWriter aWriter,
                           int indent,
                           Object aElement,
                           StoreDescription elementDesc)
                             throws Exception

      Must Implement at subclass for custom store children handling.
      Parameters:
        `aWriter` - Current output writer
        `indent` - Indentation level
        `aElement` - Current element
        `elementDesc` - The element description
      Throws:
        `Exception` - Configuration storing error

    - #### storeElement

          protected void storeElement(PrintWriter aWriter,
                          int indent,
                          Object aTagElement)
                               throws Exception

      Store only elements from storeChildren methods that are not a transient child.
      Parameters:
        `aWriter` - Current output writer
        `indent` - Indentation level
        `aTagElement` - Current element
      Throws:
        `Exception` - Configuration storing error

    - #### storeElementArray

          protected void storeElementArray(PrintWriter aWriter,
                               int indent,
                               Object[] elements)
                                    throws Exception

      Save a array of elements.
      Parameters:
        `aWriter` - Current output writer
        `indent` - Indentation level
        `elements` - Array of elements
      Throws:
        `Exception` - Configuration storing error

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