Package 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 java.lang.Object implements IStoreFactory
StoreFactory saves special elements. Output was generate with StoreAppenders.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringManagersmThe string manager for this package.
-
Constructor Summary
Constructors Constructor Description StoreFactoryBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetInfo()StoreRegistrygetRegistry()StoreAppendergetStoreAppender()voidsetRegistry(StoreRegistry aRegistry)Set the registry.voidsetStoreAppender(StoreAppender storeAppender)Set the store appender.voidstore(java.io.PrintWriter aWriter, int indent, java.lang.Object aElement)Store a server.xml element with attributes and children.voidstoreChildren(java.io.PrintWriter aWriter, int indent, java.lang.Object aElement, StoreDescription elementDesc)Must Implement at subclass for custom store children handling.protected voidstoreElement(java.io.PrintWriter aWriter, int indent, java.lang.Object aTagElement)Store only elements from storeChildren methods that are not a transient child.protected voidstoreElementArray(java.io.PrintWriter aWriter, int indent, java.lang.Object[] elements)Save an array of elements.voidstoreXMLHead(java.io.PrintWriter aWriter)Store XML header.
-
-
-
Field Detail
-
sm
protected static final StringManager sm
The string manager for this package.
-
-
Method Detail
-
getInfo
public java.lang.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:
getStoreAppenderin interfaceIStoreFactory- Returns:
- the writer
-
setStoreAppender
public void setStoreAppender(StoreAppender storeAppender)
Description copied from interface:IStoreFactorySet the store appender.- Specified by:
setStoreAppenderin interfaceIStoreFactory- Parameters:
storeAppender- the writer
-
setRegistry
public void setRegistry(StoreRegistry aRegistry)
Description copied from interface:IStoreFactorySet the registry.- Specified by:
setRegistryin interfaceIStoreFactory- Parameters:
aRegistry- the registry to be associated with
-
getRegistry
public StoreRegistry getRegistry()
- Specified by:
getRegistryin interfaceIStoreFactory- Returns:
- the associated registry
-
storeXMLHead
public void storeXMLHead(java.io.PrintWriter aWriter)
Description copied from interface:IStoreFactoryStore XML header.- Specified by:
storeXMLHeadin interfaceIStoreFactory- Parameters:
aWriter- the writer to write to
-
store
public void store(java.io.PrintWriter aWriter, int indent, java.lang.Object aElement) throws java.lang.ExceptionDescription copied from interface:IStoreFactoryStore a server.xml element with attributes and children.- Specified by:
storein interfaceIStoreFactory- Parameters:
aWriter- the writer to write toindent- the indentationaElement- the element to write- Throws:
java.lang.Exception- if an error occurs
-
storeChildren
public void storeChildren(java.io.PrintWriter aWriter, int indent, java.lang.Object aElement, StoreDescription elementDesc) throws java.lang.ExceptionMust Implement at subclass for custom store children handling.- Parameters:
aWriter- Current output writerindent- Indentation levelaElement- Current elementelementDesc- The element description- Throws:
java.lang.Exception- Configuration storing error
-
storeElement
protected void storeElement(java.io.PrintWriter aWriter, int indent, java.lang.Object aTagElement) throws java.lang.ExceptionStore only elements from storeChildren methods that are not a transient child.- Parameters:
aWriter- Current output writerindent- Indentation levelaTagElement- Current element- Throws:
java.lang.Exception- Configuration storing error
-
storeElementArray
protected void storeElementArray(java.io.PrintWriter aWriter, int indent, java.lang.Object[] elements) throws java.lang.ExceptionSave an array of elements.- Parameters:
aWriter- Current output writerindent- Indentation levelelements- Array of elements- Throws:
java.lang.Exception- Configuration storing error
-
-