use of com.axway.ats.agent.webapp.client.executors.LocalExecutor in project ats-framework by Axway.
the class EnvironmentCleanupClient method restoreFrom.
/**
* Restore the component environment from a specific folder using a specific environment configuration
*
* @param componentName the name of the component
* @param environmentName the name of the environment configuration
* @param folderPath the backup folder to use for restore
* @throws AgentException
*/
@PublicAtsApi
public void restoreFrom(String componentName, String environmentName, String folderPath) throws AgentException {
log.info("Executing restore for component '" + componentName + "' using environment '" + environmentName + "' from folder '" + folderPath + "'");
if (atsAgent.equals(LOCAL_JVM)) {
LocalExecutor localExecutor = new LocalExecutor();
localExecutor.restore(componentName, environmentName, folderPath);
} else {
RemoteExecutor remoteExecutor = new RemoteExecutor(atsAgent);
remoteExecutor.restore(componentName, environmentName, folderPath);
}
log.info("Finished executing restore for component '" + componentName + "' using environment '" + environmentName + "' from folder '" + folderPath + "'");
}
use of com.axway.ats.agent.webapp.client.executors.LocalExecutor in project ats-framework by Axway.
the class EnvironmentCleanupClient method restore.
/**
* Restore the environment for given component with a specific environment configuration
*
* @param componentName the name of the component
* @param environmentName the name of the environment configuration
* @throws AgentException
*/
@PublicAtsApi
public void restore(String componentName, String environmentName) throws AgentException {
log.info("Executing restore for component '" + componentName + "' using environment configuration '" + environmentName + "'");
if (atsAgent.equals(LOCAL_JVM)) {
LocalExecutor localExecutor = new LocalExecutor();
localExecutor.restore(componentName, environmentName, null);
} else {
RemoteExecutor remoteExecutor = new RemoteExecutor(atsAgent);
remoteExecutor.restore(componentName, environmentName, null);
}
log.info("Finished executing restore for component '" + componentName + "' using environment configuration '" + environmentName + "'");
}
use of com.axway.ats.agent.webapp.client.executors.LocalExecutor in project ats-framework by Axway.
the class EnvironmentCleanupClient method backupAllComponents.
/**
* Create backup for all registered components
*
* @throws AgentException
*/
@PublicAtsApi
public void backupAllComponents() throws AgentException {
log.info("Executing backup for all registered components");
if (atsAgent.equals(LOCAL_JVM)) {
LocalExecutor localExecutor = new LocalExecutor();
localExecutor.backupAll(null);
} else {
RemoteExecutor remoteExecutor = new RemoteExecutor(atsAgent);
remoteExecutor.backupAll(null);
}
log.info("Finished executing backup for all registered components");
}
use of com.axway.ats.agent.webapp.client.executors.LocalExecutor in project ats-framework by Axway.
the class EnvironmentCleanupClient method backupTo.
/**
* Create backup for given component to specific backup folder
*
* @param componentName the name of the component
* @param environmentName the name of the environment configuration
* @param folderPath backup folder path
* @throws AgentException
*/
@PublicAtsApi
public void backupTo(String componentName, String folderPath) throws AgentException {
log.info("Executing backup for component '" + componentName + "' to folder '" + folderPath + "'");
if (atsAgent.equals(LOCAL_JVM)) {
LocalExecutor localExecutor = new LocalExecutor();
localExecutor.backup(componentName, null, folderPath);
} else {
RemoteExecutor remoteExecutor = new RemoteExecutor(atsAgent);
remoteExecutor.backup(componentName, null, folderPath);
}
log.info("Finished executing backup for component '" + componentName + "' to folder '" + folderPath + "'");
}
use of com.axway.ats.agent.webapp.client.executors.LocalExecutor in project ats-framework by Axway.
the class Test_LocalExecutor method executeActionPositive.
@Test
public void executeActionPositive() throws Exception {
LocalExecutor localExecutor = new LocalExecutor();
localExecutor.executeAction(new ActionRequest(TEST_COMPONENT_NAME, "action 1", new Object[] { 1 }));
assertEquals(1, ActionClassOne.ACTION_VALUE);
}
Aggregations