1 19 20 package org.netbeans.tests.j2eeserver.plugin.jsr88; 21 22 import javax.enterprise.deploy.spi.factories.DeploymentFactory ; 23 import javax.enterprise.deploy.spi.*; 24 import javax.enterprise.deploy.spi.exceptions.*; 25 26 30 public class DepFactory implements DeploymentFactory { 31 java.util.Map managers = new java.util.HashMap (); 32 33 34 public DepFactory() { 35 } 36 37 public javax.enterprise.deploy.spi.DeploymentManager getDeploymentManager(String str, String str1, String str2) throws javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException { 38 DepManager manager = (DepManager) managers.get(str); 39 if (manager == null){ 40 manager = new DepManager(str, str1, str2); 41 managers.put(str, manager); 42 } 43 return manager; 44 } 45 46 public javax.enterprise.deploy.spi.DeploymentManager getDisconnectedDeploymentManager(String str) throws javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException { 47 DepManager manager = (DepManager) managers.get(str); 48 if (manager == null) { 49 manager = new DepManager(str,"",""); 50 managers.put(str, manager); 51 } 52 return manager; 53 } 54 55 public String getDisplayName() { 56 return "Sample JSR88 plugin"; } 58 59 public String getProductVersion() { 60 return "0.9"; } 62 63 public boolean handlesURI(String str) { 64 return (str != null && str.startsWith("fooservice")); 65 } 66 67 } 68 | Popular Tags |