public ModuleType getType() { return deployable.getType(); }
public DeploymentConfiguration createConfiguration(DeployableObject deployable) { if (ModuleType.WAR.equals(deployable.getType())) { return new WARConfiguration(deployable); } else { return null; } }
public DeploymentConfiguration createConfiguration(DeployableObject deployable) { if (ModuleType.EAR.equals(deployable.getType())) { return new EARConfiguration(deployable); } else { return null; } }
@Override public DeploymentConfiguration createConfiguration(final DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
public DeploymentConfiguration createConfiguration(DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
@Override public DeploymentConfiguration createConfiguration(final DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
public DeploymentConfiguration createConfiguration(final DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
public DeploymentConfiguration createConfiguration(final DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
public DeploymentConfiguration createConfiguration(DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException { if (dObj == null) { throw new NullPointerException("No deployable object supplied to configure"); } ModuleConfigurer configurer = null; for (ModuleConfigurer moduleConfigurer : moduleConfigurers) { if (moduleConfigurer.getModuleType() == dObj.getType()) { configurer = moduleConfigurer; break; } } if (configurer == null) { throw new InvalidModuleException("No configurer for module type: " + dObj.getType() + " registered"); } return configurer.createConfiguration(dObj); }
public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException { if (dObj == null) { throw new NullPointerException("No deployable object supplied to configure"); } ModuleConfigurer configurer = null; for (ModuleConfigurer moduleConfigurer : moduleConfigurers) { if (moduleConfigurer.getModuleType() == dObj.getType()) { configurer = moduleConfigurer; break; } } if (configurer == null) { throw new InvalidModuleException("No configurer for module type: " + dObj.getType() + " registered"); } return configurer.createConfiguration(dObj); }
/** * Retrieve server specific configuration for a component * * @param obj the deployable component * @return the configuration * @throws javax.enterprise.deploy.spi.exceptions.InvalidModuleException * when the module does not exist or is not supported */ public DeploymentConfiguration createConfiguration(DeployableObject obj) throws InvalidModuleException { // do some stuff to figure out what kind of config to return. if (obj.getType().equals(ModuleType.WAR)) return new WarConfiguration(obj); throw new InvalidModuleException("CreateConfiguration: Module type not yet supported"); }
/** * Retrieve server specific configuration for a component * * @param obj the deployable component * @return the configuration * @throws javax.enterprise.deploy.spi.exceptions.InvalidModuleException * when the module does not exist or is not supported */ public DeploymentConfiguration createConfiguration(DeployableObject obj) throws InvalidModuleException { if (obj == null) throw new IllegalArgumentException(MESSAGES.nullArgument("deployableObject")); // do some stuff to figure out what kind of config to return. if (obj.getType().equals(ModuleType.WAR)) return new WarConfiguration(obj); throw new InvalidModuleException(MESSAGES.moduleTypeNotSupported(obj.getType())); }
public DeploymentConfiguration createConfiguration(DeployableObject deployable) { if (ModuleType.RAR.equals(deployable.getType())) { String ddBeanRootVersion = deployable.getDDBeanRoot().getDDBeanRootVersion(); if (ddBeanRootVersion != null && ddBeanRootVersion.equals("1.5")) { return new RARConfiguration(deployable, new Connector15DCBRoot(deployable.getDDBeanRoot())); } String[] specVersion = deployable.getDDBeanRoot().getText("connector/spec-version"); if (specVersion.length > 0 && "1.0".equals(specVersion[0])) { return new RARConfiguration(deployable, new ResourceAdapter_1_0DConfigRoot(deployable.getDDBeanRoot())); } throw new IllegalArgumentException("Unknown resource adapter version: " + deployable.getDDBeanRoot().getDDBeanRootVersion()); } else { return null; } }
public DeploymentConfiguration createConfiguration(DeployableObject deployable) { if (ModuleType.RAR.equals(deployable.getType())) { String ddBeanRootVersion = deployable.getDDBeanRoot().getDDBeanRootVersion(); if (ddBeanRootVersion != null && ddBeanRootVersion.equals("1.5")) { return new RARConfiguration(deployable, new Connector15DCBRoot(deployable.getDDBeanRoot())); } String[] specVersion = deployable.getDDBeanRoot().getText("connector/spec-version"); if (specVersion.length > 0 && "1.0".equals(specVersion[0])) { return new RARConfiguration(deployable, new ResourceAdapter_1_0DConfigRoot(deployable.getDDBeanRoot())); } throw new IllegalArgumentException("Unknown resource adapter version: " + deployable.getDDBeanRoot().getDDBeanRootVersion()); } else { return null; } }