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, getExporter
exportAsString, getDescriptorName
public 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.NodeDescriptor
public DatasourcesDescriptor addDefaultNamespaces()
addDefaultNamespaces
in interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>
DatasourcesDescriptor
public DatasourcesDescriptor addNamespace(String name, String value)
addNamespace
in interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>
DatasourcesDescriptor
public 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>
DatasourcesDescriptor
public DatasourceType<DatasourcesDescriptor> getOrCreateDatasource()
datasource
element will be created and returned.
Otherwise, the first existing datasource
element will be returned.getOrCreateDatasource
in interface DatasourcesDescriptor
datasource
public DatasourceType<DatasourcesDescriptor> createDatasource()
datasource
elementcreateDatasource
in interface DatasourcesDescriptor
DatasourceType
public List<DatasourceType<DatasourcesDescriptor>> getAllDatasource()
datasource
elementsgetAllDatasource
in interface DatasourcesDescriptor
datasource
public DatasourcesDescriptor removeAllDatasource()
datasource
elementsremoveAllDatasource
in interface DatasourcesDescriptor
DatasourceType
public XaDatasourceType<DatasourcesDescriptor> getOrCreateXaDatasource()
xa-datasource
element will be created and returned.
Otherwise, the first existing xa-datasource
element will be returned.getOrCreateXaDatasource
in interface DatasourcesDescriptor
xa-datasource
public XaDatasourceType<DatasourcesDescriptor> createXaDatasource()
xa-datasource
elementcreateXaDatasource
in interface DatasourcesDescriptor
XaDatasourceType
public List<XaDatasourceType<DatasourcesDescriptor>> getAllXaDatasource()
xa-datasource
elementsgetAllXaDatasource
in interface DatasourcesDescriptor
xa-datasource
public DatasourcesDescriptor removeAllXaDatasource()
xa-datasource
elementsremoveAllXaDatasource
in interface DatasourcesDescriptor
XaDatasourceType
public DriversType<DatasourcesDescriptor> getOrCreateDrivers()
drivers
element with the given value will be created.
Otherwise, the existing drivers
element will be returned.getOrCreateDrivers
in interface DatasourcesDescriptor
DriversType
public DatasourcesDescriptor removeDrivers()
drivers
elementremoveDrivers
in interface DatasourcesDescriptor
DatasourcesDescriptor
Copyright © 2017 JBoss by Red Hat. All rights reserved.