Author: adietish
Date: 2011-04-15 12:03:03 -0400 (Fri, 15 Apr 2011)
New Revision: 30590
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/IJBossDeploymentManager.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/JBossDeploymentManager.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/TypedDeployer.java
Log:
implementing service
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/IJBossDeploymentManager.java
===================================================================
---
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/IJBossDeploymentManager.java 2011-04-15
15:57:31 UTC (rev 30589)
+++
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/IJBossDeploymentManager.java 2011-04-15
16:03:03 UTC (rev 30590)
@@ -23,9 +23,10 @@
* @param monitor The progress monitor
*
* @return Not sure what to return yet
+ * @throws Exception
*/
- public Object asyncDeploy(String host, int port,
- String deploymentName, File file, IProgressMonitor monitor);
+ public Object deployAsync(String host, int port,
+ String deploymentName, File file, IProgressMonitor monitor) throws Exception;
/**
* Synchronously deploy a file to a server
@@ -37,9 +38,10 @@
* @param monitor The progress monitor
*
* @return Not sure what to return yet
+ * @throws Exception
*/
- public Object syncDeploy(String host, int port,
- String deploymentName, File file, IProgressMonitor monitor);
+ public Object deploySync(String host, int port,
+ String deploymentName, File file, IProgressMonitor monitor) throws Exception;
/**
@@ -52,9 +54,10 @@
* @param monitor The progress monitor
*
* @return Not sure what to return yet
+ * @throws Exception
*/
- public Object asyncUndeploy(String host, int port,
- String deploymentName, boolean removeFile, IProgressMonitor monitor);
+ public Object undeployAsync(String host, int port,
+ String deploymentName, boolean removeFile, IProgressMonitor monitor) throws
Exception;
/**
@@ -67,9 +70,10 @@
* @param monitor The progress monitor
*
* @return Not sure what to return yet
+ * @throws Exception
*/
public Object syncUndeploy(String host, int port,
- String deploymentName, boolean removeFile, IProgressMonitor monitor);
+ String deploymentName, boolean removeFile, IProgressMonitor monitor) throws
Exception;
}
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/JBossDeploymentManager.java
===================================================================
---
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/JBossDeploymentManager.java 2011-04-15
15:57:31 UTC (rev 30589)
+++
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/JBossDeploymentManager.java 2011-04-15
16:03:03 UTC (rev 30590)
@@ -1,35 +1,35 @@
package org.jboss.ide.eclipse.as7.internal.deployment;
import java.io.File;
-import java.util.concurrent.Future;
import org.eclipse.core.runtime.IProgressMonitor;
import org.jboss.ide.eclipse.as7.deployment.IJBossDeploymentManager;
+import org.jboss.ide.eclipse.as7.internal.deployment.TypedDeployer.DeploymentResult;
public class JBossDeploymentManager implements IJBossDeploymentManager {
- public Future asyncDeploy(String host, int port, String deploymentName,
- File file, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
+ public DeploymentResult deployAsync(String host, int port, String deploymentName,
+ File file, IProgressMonitor monitor) throws Exception {
+ TypedDeployer deployer = new TypedDeployer(host, port);
+ return deployer.deploy(deploymentName, file);
}
- public Object syncDeploy(String host, int port, String deploymentName,
- File file, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
+ public DeploymentResult deploySync(String host, int port, String deploymentName,
+ File file, IProgressMonitor monitor) throws Exception {
+ TypedDeployer deployer = new TypedDeployer(host, port);
+ return deployer.deploySync(deploymentName, file, monitor);
}
- public Future asyncUndeploy(String host, int port, String deploymentName,
- boolean removeFile, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
+ public DeploymentResult undeployAsync(String host, int port, String deploymentName,
+ boolean removeFile, IProgressMonitor monitor) throws Exception {
+ TypedDeployer deployer = new TypedDeployer(host, port);
+ return deployer.undeploy(deploymentName, monitor);
}
- public Object syncUndeploy(String host, int port, String deploymentName,
- boolean removeFile, IProgressMonitor monitor) {
- // TODO Auto-generated method stub
- return null;
+ public DeploymentResult syncUndeploy(String host, int port, String deploymentName,
+ boolean removeFile, IProgressMonitor monitor) throws Exception {
+ TypedDeployer deployer = new TypedDeployer(host, port);
+ return deployer.undeploySync(deploymentName, monitor);
}
}
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/TypedDeployer.java
===================================================================
---
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/TypedDeployer.java 2011-04-15
15:57:31 UTC (rev 30589)
+++
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/internal/deployment/TypedDeployer.java 2011-04-15
16:03:03 UTC (rev 30590)
@@ -53,17 +53,19 @@
this.manager = ServerDeploymentManager.Factory.create(client);
}
- public void undeploySync(String name, IProgressMonitor monitor) throws DeployerException
{
- DeploymentResult result = undeploy(name);
+ public DeploymentResult undeploySync(String name, IProgressMonitor monitor) throws
DeployerException {
+ DeploymentResult result = undeploy(name, monitor);
result.getStatus();
+ return result;
}
- public void syncDeploy(String name, File file, IProgressMonitor monitor) throws
DeployerException {
+ public DeploymentResult deploySync(String name, File file, IProgressMonitor monitor)
throws DeployerException {
DeploymentResult result = deploy(name, file);
result.getStatus();
+ return result;
}
- public DeploymentResult undeploy(String name) throws DeployerException {
+ public DeploymentResult undeploy(String name, IProgressMonitor monitor) throws
DeployerException {
try {
DeploymentPlanBuilder builder = manager.newDeploymentPlan();
builder = builder.undeploy(name).andRemoveUndeployed();