|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager
public class ServerConfigurationManager
This class can be used to configure server by replacing axis2.xml or carbon.xml
| Constructor Summary | |
|---|---|
ServerConfigurationManager(org.wso2.carbon.automation.engine.context.AutomationContext autoCtx)
Create a ServerConfigurationManager |
|
ServerConfigurationManager(String productGroup,
org.wso2.carbon.automation.engine.context.TestUserMode userMode)
Create a ServerConfigurationManager |
|
| Method Summary | |
|---|---|
void |
applyConfiguration(File newConfig)
apply configuration file and restart server to take effect the configuration |
void |
applyConfiguration(File sourceFile,
File targetFile)
Methods to replace configuration files in products. |
void |
applyConfiguration(File sourceFile,
File targetFile,
boolean backupConfigFile,
boolean restartServer)
|
void |
applyConfigurationWithoutRestart(File newConfig)
apply configuration file and restart server to take effect the configuration |
void |
applyConfigurationWithoutRestart(File sourceFile,
File targetFile,
boolean backup)
Apply configuration from source file to a target file without restarting. |
void |
copyToComponentDropins(File jar)
/** Copy Jar file to server component/dropins |
void |
copyToComponentLib(File jar)
Copy Jar file to server component/lib |
static String |
getCarbonHome()
|
void |
removeFromComponentDropins(String fileName)
|
void |
removeFromComponentLib(String fileName)
|
void |
restartForcefully()
Restart Server forcefully from admin user |
void |
restartGracefully()
Restart Server Gracefully from admin user |
void |
restartGracefully(String sessionCookie)
Restart server gracefully from current user session |
void |
restoreToLastConfiguration()
restore to a last configuration and restart the server |
void |
restoreToLastConfiguration(boolean isRestartRequired)
restore all files to last configuration and restart the server |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServerConfigurationManager(String productGroup,
org.wso2.carbon.automation.engine.context.TestUserMode userMode)
throws IOException,
XPathExpressionException,
org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException,
URISyntaxException,
SAXException,
XMLStreamException
productGroup - product groupuserMode - user mode
IOException
XPathExpressionException
org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException
URISyntaxException
SAXException
XMLStreamException
public ServerConfigurationManager(org.wso2.carbon.automation.engine.context.AutomationContext autoCtx)
throws IOException,
XPathExpressionException,
org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException,
URISyntaxException,
SAXException,
XMLStreamException
autoCtx - automation context
IOException
XPathExpressionException
org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException
URISyntaxException
SAXException
XMLStreamException| Method Detail |
|---|
public static String getCarbonHome()
public void applyConfigurationWithoutRestart(File sourceFile,
File targetFile,
boolean backup)
throws Exception
sourceFile - Source file to copy.targetFile - Target file that is to be backed up and replaced.backup - boolean value, set this to true if you want to backup the original file.
Exception
public void applyConfiguration(File sourceFile,
File targetFile,
boolean backupConfigFile,
boolean restartServer)
throws Exception
sourceFile - file of the new configuration filetargetFile - configuration file required to replace in the server. File must be created
with the absolute path.backupConfigFile - require to back the existing filerestartServer - require to restart the server after replacing the config file
Exception
public void restoreToLastConfiguration()
throws Exception
Exception
public void restoreToLastConfiguration(boolean isRestartRequired)
throws Exception
Exception
public void applyConfiguration(File newConfig)
throws Exception
newConfig - configuration file
Exception
public void applyConfigurationWithoutRestart(File newConfig)
throws Exception
newConfig - configuration file
Exception
public void applyConfiguration(File sourceFile,
File targetFile)
throws Exception
sourceFile - - configuration file to be copied for your local machine or carbon server it self.targetFile - - configuration file in carbon server. e.g - path to axis2.xml in config directory
Exception - - if file IO error
public void restartGracefully()
throws Exception
Exception
public void restartGracefully(String sessionCookie)
throws Exception
sessionCookie - session cookie
Exception
public void restartForcefully()
throws Exception
Exception
public void copyToComponentLib(File jar)
throws IOException,
URISyntaxException
jar - jar file
IOException
URISyntaxException
public void removeFromComponentLib(String fileName)
throws IOException,
URISyntaxException
fileName - file name
IOException
URISyntaxException
public void copyToComponentDropins(File jar)
throws IOException,
URISyntaxException
jar - jar file
IOException
URISyntaxException
public void removeFromComponentDropins(String fileName)
throws IOException,
URISyntaxException
fileName - file name
IOException
URISyntaxException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||