public ModuleType getType() { return deployable.getType(); }
/** * @return a @see java.io.InputStream for an existing entry in * the current abstract archive * @param the entry name */ public InputStream getEntry(String name) throws IOException { return deployObject.getEntry(name); }
/** * @return an @see java.util.Enumeration of entries in this abstract * archive */ public Enumeration entries() { return deployObject.entries(); }
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 DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException { if (getDeployableObject().getDDBeanRoot().equals(bean)) { return dConfigRoot; } return null; }
public Class findClass(String name) { return deployableObject.getClassFromScope(name); }
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 DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException { if (getDeployableObject().getDDBeanRoot().equals(bean)) { return dConfigRoot; } return null; }
public Class findClass(String name) { return deployableObject.getClassFromScope(name); }
public DeploymentConfiguration createConfiguration(DeployableObject deployable) { if (ModuleType.WAR.equals(deployable.getType())) { return new WARConfiguration(deployable); } else { return null; } }
/** * @return a @see java.io.InputStream for an existing entry in * the current abstract archive * @param the entry name */ public InputStream getEntry(String name) throws IOException { return deployObject.getEntry(name); }
public WARConfiguration(DeployableObject deployable) { super(deployable, new WebAppDConfigRoot(deployable.getDDBeanRoot())); } }
/** * @return an @see java.util.Enumeration of entries in this abstract * archive */ public Enumeration entries() { return deployObject.entries(); }
public DeploymentConfiguration createConfiguration(DeployableObject deployable) { if (ModuleType.EAR.equals(deployable.getType())) { return new EARConfiguration(deployable); } else { return null; } }
private static XmlObject loadDefaultData(DDBeanRoot root) { InputStream in = root.getDeployableObject().getEntry("META-INF/geronimo-ra.xml"); if(in == null) { GerConnectorDocument doc = GerConnectorDocument.Factory.newInstance(); doc.addNewConnector().addNewResourceadapter(); return doc; } else { try { XmlObject result = GerConnectorDocument.Factory.parse(in); in.close(); return result; } catch (XmlException e) { throw new RuntimeException("Unable to load default Geronimo RA data", e); } catch (IOException e) { throw new RuntimeException("Unable to load default Geronimo RA data", e); } } }
@Override public DeploymentConfiguration createConfiguration(final DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
private static XmlObject loadDefaultData(DDBeanRoot root) { InputStream in = root.getDeployableObject().getEntry("META-INF/geronimo-ra.xml"); if(in == null) { GerConnectorDocument doc = GerConnectorDocument.Factory.newInstance(); doc.addNewConnector().addNewResourceadapter(); return doc; } else { try { XmlObject result = GerConnectorDocument.Factory.parse(in); in.close(); return result; } catch (XmlException e) { throw new RuntimeException("Unable to load default Geronimo RA data", e); } catch (IOException e) { throw new RuntimeException("Unable to load default Geronimo RA data", e); } } }
public DeploymentConfiguration createConfiguration(DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }
private XmlObject loadDefaultData(DDBeanRoot root) { InputStream in = root.getDeployableObject().getEntry("META-INF/geronimo-ra.xml"); if(in == null) { GerConnectorDocument doc = GerConnectorDocument.Factory.newInstance(); DDBean[] list = root.getChildBean("connector"); if(list.length > 0) { connector = new ConnectorDCB(list[0], doc.addNewConnector()); } return doc; } else { try { GerConnectorDocument result = GerConnectorDocument.Factory.parse(in); in.close(); DDBean[] list = root.getChildBean("connector"); if(list.length > 0) { connector = new ConnectorDCB(list[0], result.getConnector()); } return result; } catch (XmlException e) { throw new RuntimeException("Unable to load default Geronimo RA data", e); } catch (IOException e) { throw new RuntimeException("Unable to load default Geronimo RA data", e); } } }
@Override public DeploymentConfiguration createConfiguration(final DeployableObject deployableObject) throws InvalidModuleException { throw new InvalidModuleException("Not supported: " + deployableObject.getType()); }