Package org.apache.catalina.storeconfig
Class StoreConfig
- java.lang.Object
- 
- org.apache.catalina.storeconfig.StoreConfig
 
- 
- All Implemented Interfaces:
- IStoreConfig
 
 public class StoreConfig extends java.lang.Object implements IStoreConfig Store Server/Service/Host/Context at file or PrintWriter. Default server.xml is at $catalina.base/conf/server.xml
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringManagersm
 - 
Constructor SummaryConstructors Constructor Description StoreConfig()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StoreRegistrygetRegistry()Get the StoreRegistry with all factory to generate the server.xml/context.xml files.ServergetServer()Get associated serverjava.lang.StringgetServerFilename()Get server.xml locationvoidsetRegistry(StoreRegistry aRegistry)set StoreRegistryvoidsetServer(Server aServer)Set associated servervoidsetServerFilename(java.lang.String string)Set new server.xml location.voidstore(java.io.PrintWriter aWriter, int indent, Context aContext)Store the specified Context properties.voidstore(java.io.PrintWriter aWriter, int indent, Host aHost)Store the specified Host properties.voidstore(java.io.PrintWriter writer, int indent, Server aServer)Store the specified Server properties.voidstore(java.io.PrintWriter aWriter, int indent, Service aService)Store the specified Service properties.booleanstore(Context aContext)Store the specified Context properties.booleanstore(Server aServer)Write the configuration information for this entireServerout to the server.xml configuration file.voidstoreConfig()Store current Server.voidstoreContext(java.lang.String aContextName, boolean backup, boolean externalAllowed)Store a Context from ObjectName.voidstoreServer(java.lang.String aServerName, boolean backup, boolean externalAllowed)Store Server from Object Name (Catalina:type=Server).
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm 
 
- 
 - 
Method Detail- 
getServerFilenamepublic java.lang.String getServerFilename() Get server.xml location- Returns:
- The server file name
 
 - 
setServerFilenamepublic void setServerFilename(java.lang.String string) Set new server.xml location.- Parameters:
- string- The server.xml location
 
 - 
getRegistrypublic StoreRegistry getRegistry() Get the StoreRegistry with all factory to generate the server.xml/context.xml files.- Specified by:
- getRegistryin interface- IStoreConfig
- Returns:
- aRegistry that handle the store operations
- See Also:
- IStoreConfig.getRegistry()
 
 - 
setServerpublic void setServer(Server aServer) Description copied from interface:IStoreConfigSet associated server- Specified by:
- setServerin interface- IStoreConfig
- Parameters:
- aServer- the associated server
 
 - 
getServerpublic Server getServer() Description copied from interface:IStoreConfigGet associated server- Specified by:
- getServerin interface- IStoreConfig
- Returns:
- aServer the associated server
 
 - 
setRegistrypublic void setRegistry(StoreRegistry aRegistry) set StoreRegistry- Specified by:
- setRegistryin interface- IStoreConfig
- Parameters:
- aRegistry- aregistry that handle the store operations
- See Also:
- IStoreConfig.setRegistry(org.apache.catalina.storeconfig.StoreRegistry)
 
 - 
storeConfigpublic void storeConfig() Store current Server.- Specified by:
- storeConfigin interface- IStoreConfig
 
 - 
storeServerpublic void storeServer(java.lang.String aServerName, boolean backup, boolean externalAllowed) throws javax.management.MalformedObjectNameExceptionStore Server from Object Name (Catalina:type=Server).- Parameters:
- aServerName- Server ObjectName
- backup-- trueto backup existing configuration files before rewriting them
- externalAllowed-- trueto allow saving webapp configuration for webapps that are not inside the host's app directory
- Throws:
- javax.management.MalformedObjectNameException- Bad MBean name
 
 - 
storeContextpublic void storeContext(java.lang.String aContextName, boolean backup, boolean externalAllowed) throws javax.management.MalformedObjectNameExceptionStore a Context from ObjectName.- Parameters:
- aContextName- MBean ObjectName
- backup-- trueto backup existing configuration files before rewriting them
- externalAllowed-- trueto allow saving webapp configuration for webapps that are not inside the host's app directory
- Throws:
- javax.management.MalformedObjectNameException- Bad MBean name
 
 - 
storepublic boolean store(Server aServer) Write the configuration information for this entireServerout to the server.xml configuration file.- Specified by:
- storein interface- IStoreConfig
- Parameters:
- aServer- Server instance
- Returns:
- trueif the store operation was successful
 
 - 
storepublic boolean store(Context aContext) Description copied from interface:IStoreConfigStore the specified Context properties.- Specified by:
- storein interface- IStoreConfig
- Parameters:
- aContext- Object to be stored
- Returns:
- trueif the store operation was successful
- See Also:
- IStoreConfig.store(org.apache.catalina.Context)
 
 - 
storepublic void store(java.io.PrintWriter aWriter, int indent, Context aContext) throws java.lang.ExceptionDescription copied from interface:IStoreConfigStore the specified Context properties.- Specified by:
- storein interface- IStoreConfig
- Parameters:
- aWriter- PrintWriter to which we are storing
- indent- Number of spaces to indent this element
- aContext- Object to be stored
- Throws:
- java.lang.Exception- Store error occurred
- See Also:
- IStoreConfig.store(java.io.PrintWriter, int, org.apache.catalina.Context)
 
 - 
storepublic void store(java.io.PrintWriter aWriter, int indent, Host aHost) throws java.lang.ExceptionDescription copied from interface:IStoreConfigStore the specified Host properties.- Specified by:
- storein interface- IStoreConfig
- Parameters:
- aWriter- PrintWriter to which we are storing
- indent- Number of spaces to indent this element
- aHost- Object to be stored
- Throws:
- java.lang.Exception- Store error occurred
- See Also:
- IStoreConfig.store(java.io.PrintWriter, int, org.apache.catalina.Host)
 
 - 
storepublic void store(java.io.PrintWriter aWriter, int indent, Service aService) throws java.lang.ExceptionDescription copied from interface:IStoreConfigStore the specified Service properties.- Specified by:
- storein interface- IStoreConfig
- Parameters:
- aWriter- PrintWriter to which we are storing
- indent- Number of spaces to indent this element
- aService- Object to be stored
- Throws:
- java.lang.Exception- Store error occurred
- See Also:
- IStoreConfig.store(java.io.PrintWriter, int, org.apache.catalina.Service)
 
 - 
storepublic void store(java.io.PrintWriter writer, int indent, Server aServer) throws java.lang.ExceptionDescription copied from interface:IStoreConfigStore the specified Server properties.- Specified by:
- storein interface- IStoreConfig
- Parameters:
- writer- PrintWriter to which we are storing
- indent- Number of spaces to indent this element
- aServer- Object to be stored
- Throws:
- java.lang.Exception- Store error occurred
- See Also:
- IStoreConfig.store(java.io.PrintWriter, int, org.apache.catalina.Server)
 
 
- 
 
-