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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet Configuration RegistryGet associated serverGet server.xml locationvoidsetRegistry(StoreRegistry aRegistry) Set Configuration RegistryvoidSet associated servervoidsetServerFilename(String string) Set new server.xml location.voidstore(PrintWriter aWriter, int indent, Context aContext) Store the specified Context properties.voidstore(PrintWriter aWriter, int indent, Host aHost) Store the specified Host properties.voidstore(PrintWriter writer, int indent, Server aServer) Store the specified Server properties.voidstore(PrintWriter aWriter, int indent, Service aService) Store the specified Service properties.booleanStore the specified Context properties.booleanWrite the configuration information for this entireServerout to the server.xml configuration file.voidStore the current StoreFactory Server.voidstoreContext(String aContextName, boolean backup, boolean externalAllowed) Store a Context from ObjectName.voidstoreServer(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:IStoreConfigGet Configuration Registry- Specified by:
getRegistryin interfaceIStoreConfig- Returns:
- aRegistry that handle the store operations
-
setServer
Description copied from interface:IStoreConfigSet associated server- Specified by:
setServerin interfaceIStoreConfig- Parameters:
aServer- the associated server
-
getServer
Description copied from interface:IStoreConfigGet associated server- Specified by:
getServerin interfaceIStoreConfig- Returns:
- aServer the associated server
-
setRegistry
Description copied from interface:IStoreConfigSet Configuration Registry- Specified by:
setRegistryin interfaceIStoreConfig- Parameters:
aRegistry- aregistry that handle the store operations
-
storeConfig
public void storeConfig()Description copied from interface:IStoreConfigStore the current StoreFactory Server.- Specified by:
storeConfigin 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-trueto backup existing configuration files before rewriting themexternalAllowed-trueto 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-trueto backup existing configuration files before rewriting themexternalAllowed-trueto 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:IStoreConfigWrite the configuration information for this entireServerout to the server.xml configuration file.- Specified by:
storein interfaceIStoreConfig- Parameters:
aServer- Server instance- Returns:
trueif the store operation was successful
-
store
Description copied from interface:IStoreConfigStore the specified Context properties.- Specified by:
storein interfaceIStoreConfig- Parameters:
aContext- Object to be stored- Returns:
trueif the store operation was successful
-
store
Description copied from interface:IStoreConfigStore the specified Context properties.- Specified by:
storein 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:IStoreConfigStore the specified Host properties.- Specified by:
storein 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:IStoreConfigStore the specified Service properties.- Specified by:
storein 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:IStoreConfigStore the specified Server properties.- Specified by:
storein 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
-