public class DatasourcesDescriptorImpl extends org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase implements org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>, DatasourcesDescriptor
This deployment descriptor provides the functionalities as described in the specification
Example:
DatasourcesDescriptor descriptor = Descriptors.create(DatasourcesDescriptor.class);
| Constructor and Description |
|---|
DatasourcesDescriptorImpl(String descriptorName) |
DatasourcesDescriptorImpl(String descriptorName,
org.jboss.shrinkwrap.descriptor.spi.node.Node node) |
| Modifier and Type | Method and Description |
|---|---|
DatasourcesDescriptor |
addDefaultNamespaces()
Adds the default namespaces as defined in the specification
|
DatasourcesDescriptor |
addNamespace(String name,
String value)
Adds a new namespace
|
DatasourceType<DatasourcesDescriptor> |
createDatasource()
Creates a new
datasource element |
XaDatasourceType<DatasourcesDescriptor> |
createXaDatasource()
Creates a new
xa-datasource element |
List<DatasourceType<DatasourcesDescriptor>> |
getAllDatasource()
Returns all
datasource elements |
List<XaDatasourceType<DatasourcesDescriptor>> |
getAllXaDatasource()
Returns all
xa-datasource elements |
List<String> |
getNamespaces()
Returns all defined namespaces.
|
DatasourceType<DatasourcesDescriptor> |
getOrCreateDatasource()
If not already created, a new
datasource element will be created and returned. |
DriversType<DatasourcesDescriptor> |
getOrCreateDrivers()
If not already created, a new
drivers element with the given value will be created. |
XaDatasourceType<DatasourcesDescriptor> |
getOrCreateXaDatasource()
If not already created, a new
xa-datasource element will be created and returned. |
org.jboss.shrinkwrap.descriptor.spi.node.Node |
getRootNode() |
DatasourcesDescriptor |
removeAllDatasource()
Removes all
datasource elements |
DatasourcesDescriptor |
removeAllNamespaces()
Removes all existing namespaces.
|
DatasourcesDescriptor |
removeAllXaDatasource()
Removes all
xa-datasource elements |
DatasourcesDescriptor |
removeDrivers()
Removes the
drivers element |
exportTo, getExporterexportAsString, getDescriptorNamepublic DatasourcesDescriptorImpl(String descriptorName)
public DatasourcesDescriptorImpl(String descriptorName, org.jboss.shrinkwrap.descriptor.spi.node.Node node)
public org.jboss.shrinkwrap.descriptor.spi.node.Node getRootNode()
getRootNode in interface org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorpublic DatasourcesDescriptor addDefaultNamespaces()
addDefaultNamespaces in interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>DatasourcesDescriptorpublic DatasourcesDescriptor addNamespace(String name, String value)
addNamespace in interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>DatasourcesDescriptorpublic List<String> getNamespaces()
getNamespaces in interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>public DatasourcesDescriptor removeAllNamespaces()
removeAllNamespaces in interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>DatasourcesDescriptorpublic DatasourceType<DatasourcesDescriptor> getOrCreateDatasource()
datasource element will be created and returned.
Otherwise, the first existing datasource element will be returned.getOrCreateDatasource in interface DatasourcesDescriptordatasourcepublic DatasourceType<DatasourcesDescriptor> createDatasource()
datasource elementcreateDatasource in interface DatasourcesDescriptorDatasourceTypepublic List<DatasourceType<DatasourcesDescriptor>> getAllDatasource()
datasource elementsgetAllDatasource in interface DatasourcesDescriptordatasourcepublic DatasourcesDescriptor removeAllDatasource()
datasource elementsremoveAllDatasource in interface DatasourcesDescriptorDatasourceTypepublic XaDatasourceType<DatasourcesDescriptor> getOrCreateXaDatasource()
xa-datasource element will be created and returned.
Otherwise, the first existing xa-datasource element will be returned.getOrCreateXaDatasource in interface DatasourcesDescriptorxa-datasourcepublic XaDatasourceType<DatasourcesDescriptor> createXaDatasource()
xa-datasource elementcreateXaDatasource in interface DatasourcesDescriptorXaDatasourceTypepublic List<XaDatasourceType<DatasourcesDescriptor>> getAllXaDatasource()
xa-datasource elementsgetAllXaDatasource in interface DatasourcesDescriptorxa-datasourcepublic DatasourcesDescriptor removeAllXaDatasource()
xa-datasource elementsremoveAllXaDatasource in interface DatasourcesDescriptorXaDatasourceTypepublic DriversType<DatasourcesDescriptor> getOrCreateDrivers()
drivers element with the given value will be created.
Otherwise, the existing drivers element will be returned.getOrCreateDrivers in interface DatasourcesDescriptorDriversTypepublic DatasourcesDescriptor removeDrivers()
drivers elementremoveDrivers in interface DatasourcesDescriptorDatasourcesDescriptorCopyright © 2021 JBoss by Red Hat. All rights reserved.