Class DatasourcesDescriptorImpl
- java.lang.Object
-
- org.jboss.shrinkwrap.descriptor.spi.DescriptorImplBase<org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptor>
-
- org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase
-
- org.jboss.jca.embedded.dsl.datasources11.impl.DatasourcesDescriptorImpl
-
- All Implemented Interfaces:
DatasourcesDescriptor,org.jboss.shrinkwrap.descriptor.api.Descriptor,org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>,org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptor
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 Summary
Constructors Constructor Description DatasourcesDescriptorImpl(String descriptorName)DatasourcesDescriptorImpl(String descriptorName, org.jboss.shrinkwrap.descriptor.spi.node.Node node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasourcesDescriptoraddDefaultNamespaces()Adds the default namespaces as defined in the specificationDatasourcesDescriptoraddNamespace(String name, String value)Adds a new namespaceDatasourceType<DatasourcesDescriptor>createDatasource()Creates a newdatasourceelementXaDatasourceType<DatasourcesDescriptor>createXaDatasource()Creates a newxa-datasourceelementList<DatasourceType<DatasourcesDescriptor>>getAllDatasource()Returns alldatasourceelementsList<XaDatasourceType<DatasourcesDescriptor>>getAllXaDatasource()Returns allxa-datasourceelementsList<String>getNamespaces()Returns all defined namespaces.DatasourceType<DatasourcesDescriptor>getOrCreateDatasource()If not already created, a newdatasourceelement will be created and returned.DriversType<DatasourcesDescriptor>getOrCreateDrivers()If not already created, a newdriverselement with the given value will be created.XaDatasourceType<DatasourcesDescriptor>getOrCreateXaDatasource()If not already created, a newxa-datasourceelement will be created and returned.org.jboss.shrinkwrap.descriptor.spi.node.NodegetRootNode()DatasourcesDescriptorremoveAllDatasource()Removes alldatasourceelementsDatasourcesDescriptorremoveAllNamespaces()Removes all existing namespaces.DatasourcesDescriptorremoveAllXaDatasource()Removes allxa-datasourceelementsDatasourcesDescriptorremoveDrivers()Removes thedriverselement-
Methods inherited from class org.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptorImplBase
exportTo, getExporter
-
Methods inherited from class org.jboss.shrinkwrap.descriptor.spi.DescriptorImplBase
exportAsString, getDescriptorName
-
-
-
-
Method Detail
-
getRootNode
public org.jboss.shrinkwrap.descriptor.spi.node.Node getRootNode()
- Specified by:
getRootNodein interfaceorg.jboss.shrinkwrap.descriptor.spi.node.NodeDescriptor
-
addDefaultNamespaces
public DatasourcesDescriptor addDefaultNamespaces()
Adds the default namespaces as defined in the specification- Specified by:
addDefaultNamespacesin interfaceorg.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>- Returns:
- the current instance of
DatasourcesDescriptor
-
addNamespace
public DatasourcesDescriptor addNamespace(String name, String value)
Adds a new namespace- Specified by:
addNamespacein interfaceorg.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>- Returns:
- the current instance of
DatasourcesDescriptor
-
getNamespaces
public List<String> getNamespaces()
Returns all defined namespaces.- Specified by:
getNamespacesin interfaceorg.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>- Returns:
- all defined namespaces
-
removeAllNamespaces
public DatasourcesDescriptor removeAllNamespaces()
Removes all existing namespaces.- Specified by:
removeAllNamespacesin interfaceorg.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>- Returns:
- the current instance of
DatasourcesDescriptor
-
getOrCreateDatasource
public DatasourceType<DatasourcesDescriptor> getOrCreateDatasource()
If not already created, a newdatasourceelement will be created and returned. Otherwise, the first existingdatasourceelement will be returned.- Specified by:
getOrCreateDatasourcein interfaceDatasourcesDescriptor- Returns:
- the instance defined for the element
datasource
-
createDatasource
public DatasourceType<DatasourcesDescriptor> createDatasource()
Creates a newdatasourceelement- Specified by:
createDatasourcein interfaceDatasourcesDescriptor- Returns:
- the new created instance of
DatasourceType
-
getAllDatasource
public List<DatasourceType<DatasourcesDescriptor>> getAllDatasource()
Returns alldatasourceelements- Specified by:
getAllDatasourcein interfaceDatasourcesDescriptor- Returns:
- list of
datasource
-
removeAllDatasource
public DatasourcesDescriptor removeAllDatasource()
Removes alldatasourceelements- Specified by:
removeAllDatasourcein interfaceDatasourcesDescriptor- Returns:
- the current instance of
DatasourceType
-
getOrCreateXaDatasource
public XaDatasourceType<DatasourcesDescriptor> getOrCreateXaDatasource()
If not already created, a newxa-datasourceelement will be created and returned. Otherwise, the first existingxa-datasourceelement will be returned.- Specified by:
getOrCreateXaDatasourcein interfaceDatasourcesDescriptor- Returns:
- the instance defined for the element
xa-datasource
-
createXaDatasource
public XaDatasourceType<DatasourcesDescriptor> createXaDatasource()
Creates a newxa-datasourceelement- Specified by:
createXaDatasourcein interfaceDatasourcesDescriptor- Returns:
- the new created instance of
XaDatasourceType
-
getAllXaDatasource
public List<XaDatasourceType<DatasourcesDescriptor>> getAllXaDatasource()
Returns allxa-datasourceelements- Specified by:
getAllXaDatasourcein interfaceDatasourcesDescriptor- Returns:
- list of
xa-datasource
-
removeAllXaDatasource
public DatasourcesDescriptor removeAllXaDatasource()
Removes allxa-datasourceelements- Specified by:
removeAllXaDatasourcein interfaceDatasourcesDescriptor- Returns:
- the current instance of
XaDatasourceType
-
getOrCreateDrivers
public DriversType<DatasourcesDescriptor> getOrCreateDrivers()
If not already created, a newdriverselement with the given value will be created. Otherwise, the existingdriverselement will be returned.- Specified by:
getOrCreateDriversin interfaceDatasourcesDescriptor- Returns:
- a new or existing instance of
DriversType
-
removeDrivers
public DatasourcesDescriptor removeDrivers()
Removes thedriverselement- Specified by:
removeDriversin interfaceDatasourcesDescriptor- Returns:
- the current instance of
DatasourcesDescriptor
-
-