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 SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGet the StoreRegistry with all factory to generate the server.xml/context.xml files.Get associated serverGet server.xml locationvoidsetRegistry(StoreRegistry aRegistry) set StoreRegistryvoidSet 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 current 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- 
StoreConfigpublic StoreConfig()
 
- 
- 
Method Details- 
getServerFilenameGet server.xml location- Returns:
- The server file name
 
- 
setServerFilenameSet new server.xml location.- Parameters:
- string- The server.xml location
 
- 
getRegistryGet 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:
 
- 
setServerDescription copied from interface:IStoreConfigSet associated server- Specified by:
- setServerin interface- IStoreConfig
- Parameters:
- aServer- the associated server
 
- 
getServerDescription copied from interface:IStoreConfigGet associated server- Specified by:
- getServerin interface- IStoreConfig
- Returns:
- aServer the associated server
 
- 
setRegistryset StoreRegistry- Specified by:
- setRegistryin interface- IStoreConfig
- Parameters:
- aRegistry- aregistry that handle the store operations
- See Also:
 
- 
storeConfigpublic void storeConfig()Store current Server.- Specified by:
- storeConfigin interface- IStoreConfig
 
- 
storeServerpublic void storeServer(String aServerName, boolean backup, boolean externalAllowed) throws MalformedObjectNameException Store 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:
- MalformedObjectNameException- Bad MBean name
 
- 
storeContextpublic void storeContext(String aContextName, boolean backup, boolean externalAllowed) throws MalformedObjectNameException Store 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:
- MalformedObjectNameException- Bad MBean name
 
- 
storeWrite 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
 
- 
storeDescription 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:
 
- 
storeDescription 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:
- Exception- Store error occurred
- See Also:
 
- 
storeDescription 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:
- Exception- Store error occurred
- See Also:
 
- 
storeDescription 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:
- Exception- Store error occurred
- See Also:
 
- 
storeDescription 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:
- Exception- Store error occurred
- See Also:
 
 
-