1 23 24 package com.sun.enterprise.deployment.phasing; 25 26 import java.io.File ; 27 import java.util.Map ; 28 29 import com.sun.enterprise.config.ConfigContext; 30 import com.sun.enterprise.deployment.backend.DeploymentRequest; 31 import com.sun.enterprise.deployment.util.DeploymentProperties; 32 import com.sun.enterprise.deployment.backend.DeploymentStatus; 33 import com.sun.enterprise.deployment.backend.IASDeploymentException; 34 import com.sun.enterprise.deployment.pluggable.DeploymentFactory; 35 import com.sun.enterprise.server.ApplicationServer; 36 import com.sun.enterprise.server.pluggable.PluggableFeatureFactory; 37 import com.sun.enterprise.management.deploy.DeploymentCallback; 38 39 43 public abstract class DeploymentService { 44 45 private static DeploymentService deployService; 46 47 51 public static DeploymentService getDeploymentService( 52 ConfigContext configContext) { 53 54 if (deployService != null) { 55 return deployService; 56 } 57 58 PluggableFeatureFactory featureFactory = 59 ApplicationServer.getServerContext().getPluggableFeatureFactory(); 60 DeploymentFactory dFactory = featureFactory.getDeploymentFactory(); 61 deployService = dFactory.createDeploymentService(configContext); 62 return deployService; 63 } 64 65 public static DeploymentService getDeploymentService() { 66 ConfigContext configContext = 67 DeploymentServiceUtils.getConfigContext(); 68 return DeploymentService.getDeploymentService(configContext); 69 } 70 71 72 77 public abstract DeploymentStatus deploy(DeploymentRequest req) throws IASDeploymentException; 78 79 83 public abstract DeploymentStatus deploy(File deployFile, 84 File planFile, String archiveName, String moduleID, 85 DeploymentProperties dProps, DeploymentCallback callback) 86 throws IASDeploymentException; 87 88 93 public abstract DeploymentStatus undeploy(DeploymentRequest req); 94 95 99 public abstract DeploymentStatus undeploy(String mModuleID, 100 Map mParams) throws IASDeploymentException; 101 102 106 public abstract DeploymentStatus associate(DeploymentRequest req) 107 throws IASDeploymentException; 108 109 113 public abstract DeploymentStatus associate(String targetName, 114 boolean enabled, String virtualServers, String referenceName) 115 throws IASDeploymentException; 116 117 121 public abstract DeploymentStatus associate(String targetName, 122 String referenceName, Map options) throws IASDeploymentException; 123 124 128 public abstract DeploymentStatus disassociate(DeploymentRequest req) 129 throws IASDeploymentException; 130 131 135 public abstract DeploymentStatus disassociate(String targetName, 136 String referenceName) throws IASDeploymentException; 137 138 public abstract DeploymentStatus disassociate(String targetName, 139 String referenceName, Map options) throws IASDeploymentException; 140 141 public abstract DeploymentStatus start(DeploymentRequest req); 142 143 public abstract DeploymentStatus stop(DeploymentRequest req) 144 throws IASDeploymentException; 145 146 public abstract DeploymentStatus start(String moduleID, String targetName, 147 Map options) throws IASDeploymentException; 148 149 public abstract DeploymentStatus stop(String moduleID, String targetName, 150 Map options) throws IASDeploymentException; 151 152 public abstract boolean quit(String moduleID); 153 154 171 public abstract String getModuleIDFromDD (File file) throws Exception ; 172 } 173 | Popular Tags |