Package org.apache.catalina.storeconfig
Class StoreConfig
java.lang.Object
org.apache.catalina.storeconfig.StoreConfig
- All Implemented Interfaces:
IStoreConfig
Store Server/Service/Host/Context at file or PrintWriter. Default server.xml is at $catalina.base/conf/server.xml
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet Configuration RegistryGet associated serverGet server.xml locationvoid
setRegistry
(StoreRegistry aRegistry) Set Configuration Registryvoid
Set associated servervoid
setServerFilename
(String string) Set new server.xml location.void
store
(PrintWriter aWriter, int indent, Context aContext) Store the specified Context properties.void
store
(PrintWriter aWriter, int indent, Host aHost) Store the specified Host properties.void
store
(PrintWriter writer, int indent, Server aServer) Store the specified Server properties.void
store
(PrintWriter aWriter, int indent, Service aService) Store the specified Service properties.boolean
Store the specified Context properties.boolean
Write the configuration information for this entireServer
out to the server.xml configuration file.void
Store the current StoreFactory Server.void
storeContext
(String aContextName, boolean backup, boolean externalAllowed) Store a Context from ObjectName.void
storeServer
(String aServerName, boolean backup, boolean externalAllowed) Store Server from Object Name (Catalina:type=Server).
-
Field Details
-
sm
-
-
Constructor Details
-
StoreConfig
public StoreConfig()
-
-
Method Details
-
getServerFilename
-
setServerFilename
Set new server.xml location.- Parameters:
string
- The server.xml location
-
getRegistry
Description copied from interface:IStoreConfig
Get Configuration Registry- Specified by:
getRegistry
in interfaceIStoreConfig
- Returns:
- aRegistry that handle the store operations
-
setServer
Description copied from interface:IStoreConfig
Set associated server- Specified by:
setServer
in interfaceIStoreConfig
- Parameters:
aServer
- the associated server
-
getServer
Description copied from interface:IStoreConfig
Get associated server- Specified by:
getServer
in interfaceIStoreConfig
- Returns:
- aServer the associated server
-
setRegistry
Description copied from interface:IStoreConfig
Set Configuration Registry- Specified by:
setRegistry
in interfaceIStoreConfig
- Parameters:
aRegistry
- aregistry that handle the store operations
-
storeConfig
public void storeConfig()Description copied from interface:IStoreConfig
Store the current StoreFactory Server.- Specified by:
storeConfig
in interfaceIStoreConfig
-
storeServer
public void storeServer(String aServerName, boolean backup, boolean externalAllowed) throws MalformedObjectNameException Store Server from Object Name (Catalina:type=Server).- Parameters:
aServerName
- Server ObjectNamebackup
-true
to backup existing configuration files before rewriting themexternalAllowed
-true
to allow saving webapp configuration for webapps that are not inside the host's app directory- Throws:
MalformedObjectNameException
- Bad MBean name
-
storeContext
public void storeContext(String aContextName, boolean backup, boolean externalAllowed) throws MalformedObjectNameException Store a Context from ObjectName.- Parameters:
aContextName
- MBean ObjectNamebackup
-true
to backup existing configuration files before rewriting themexternalAllowed
-true
to allow saving webapp configuration for webapps that are not inside the host's app directory- Throws:
MalformedObjectNameException
- Bad MBean name
-
store
Description copied from interface:IStoreConfig
Write the configuration information for this entireServer
out to the server.xml configuration file.- Specified by:
store
in interfaceIStoreConfig
- Parameters:
aServer
- Server instance- Returns:
true
if the store operation was successful
-
store
Description copied from interface:IStoreConfig
Store the specified Context properties.- Specified by:
store
in interfaceIStoreConfig
- Parameters:
aContext
- Object to be stored- Returns:
true
if the store operation was successful
-
store
Description copied from interface:IStoreConfig
Store the specified Context properties.- Specified by:
store
in interfaceIStoreConfig
- Parameters:
aWriter
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaContext
- Object to be stored- Throws:
Exception
- Store error occurred
-
store
Description copied from interface:IStoreConfig
Store the specified Host properties.- Specified by:
store
in interfaceIStoreConfig
- Parameters:
aWriter
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaHost
- Object to be stored- Throws:
Exception
- Store error occurred
-
store
Description copied from interface:IStoreConfig
Store the specified Service properties.- Specified by:
store
in interfaceIStoreConfig
- Parameters:
aWriter
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaService
- Object to be stored- Throws:
Exception
- Store error occurred
-
store
Description copied from interface:IStoreConfig
Store the specified Server properties.- Specified by:
store
in interfaceIStoreConfig
- Parameters:
writer
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaServer
- Object to be stored- Throws:
Exception
- Store error occurred
-