public class StoreConfig extends Object implements IStoreConfig
Modifier and Type | Field and Description |
---|---|
protected static StringManager |
sm |
Constructor and Description |
---|
StoreConfig() |
Modifier and Type | Method and Description |
---|---|
StoreRegistry |
getRegistry()
Get the StoreRegistry with all factory to generate the
server.xml/context.xml files.
|
Server |
getServer()
Get associated server
|
String |
getServerFilename()
Get server.xml location
|
void |
setRegistry(StoreRegistry aRegistry)
set StoreRegistry
|
void |
setServer(Server aServer)
Set associated server
|
void |
setServerFilename(String string)
Set new server.xml location.
|
boolean |
store(Context aContext)
Store the specified Context properties.
|
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(Server aServer)
Write the configuration information for this entire
Server
out to the server.xml configuration file. |
void |
storeConfig()
Store current 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).
|
protected static final StringManager sm
public String getServerFilename()
public void setServerFilename(String string)
string
- The server.xml locationpublic StoreRegistry getRegistry()
getRegistry
in interface IStoreConfig
IStoreConfig.getRegistry()
public void setServer(Server aServer)
IStoreConfig
setServer
in interface IStoreConfig
aServer
- the associated serverpublic Server getServer()
IStoreConfig
getServer
in interface IStoreConfig
public void setRegistry(StoreRegistry aRegistry)
setRegistry
in interface IStoreConfig
aRegistry
- aregistry that handle the store operationsIStoreConfig.setRegistry(org.apache.catalina.storeconfig.StoreRegistry)
public void storeConfig()
storeConfig
in interface IStoreConfig
public void storeServer(String aServerName, boolean backup, boolean externalAllowed) throws MalformedObjectNameException
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
directoryMalformedObjectNameException
- Bad MBean namepublic void storeContext(String aContextName, boolean backup, boolean externalAllowed) throws MalformedObjectNameException
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
directoryMalformedObjectNameException
- Bad MBean namepublic boolean store(Server aServer)
Server
out to the server.xml configuration file.store
in interface IStoreConfig
aServer
- Server instancetrue
if the store operation was successfulpublic boolean store(Context aContext)
IStoreConfig
store
in interface IStoreConfig
aContext
- Object to be storedtrue
if the store operation was successfulIStoreConfig.store(org.apache.catalina.Context)
public void store(PrintWriter aWriter, int indent, Context aContext) throws Exception
IStoreConfig
store
in interface IStoreConfig
aWriter
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaContext
- Object to be storedException
- Store error occurredIStoreConfig.store(java.io.PrintWriter,
int, org.apache.catalina.Context)
public void store(PrintWriter aWriter, int indent, Host aHost) throws Exception
IStoreConfig
store
in interface IStoreConfig
aWriter
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaHost
- Object to be storedException
- Store error occurredIStoreConfig.store(java.io.PrintWriter,
int, org.apache.catalina.Host)
public void store(PrintWriter aWriter, int indent, Service aService) throws Exception
IStoreConfig
store
in interface IStoreConfig
aWriter
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaService
- Object to be storedException
- Store error occurredIStoreConfig.store(java.io.PrintWriter,
int, org.apache.catalina.Service)
public void store(PrintWriter writer, int indent, Server aServer) throws Exception
IStoreConfig
store
in interface IStoreConfig
writer
- PrintWriter to which we are storingindent
- Number of spaces to indent this elementaServer
- Object to be storedException
- Store error occurredIStoreConfig.store(java.io.PrintWriter,
int, org.apache.catalina.Server)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.