Interface DatasourcesDescriptor
- All Superinterfaces:
org.jboss.shrinkwrap.descriptor.api.Descriptor,org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>
- All Known Implementing Classes:
DatasourcesDescriptorImpl
public interface DatasourcesDescriptor
extends org.jboss.shrinkwrap.descriptor.api.Descriptor, org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace<DatasourcesDescriptor>
This deployment descriptor provides the functionalities as described in the specification
Example:
DatasourcesDescriptor descriptor = Descriptors.create(DatasourcesDescriptor.class);
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newdatasourceelementCreates a newxa-datasourceelementReturns alldatasourceelementsReturns allxa-datasourceelementsIf not already created, a newdatasourceelement will be created and returned.If not already created, a newdriverselement with the given value will be created.If not already created, a newxa-datasourceelement will be created and returned.Removes alldatasourceelementsRemoves allxa-datasourceelementsRemoves thedriverselementMethods inherited from interface org.jboss.shrinkwrap.descriptor.api.Descriptor
exportAsString, exportTo, getDescriptorNameMethods inherited from interface org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace
addDefaultNamespaces, addNamespace, getNamespaces, removeAllNamespaces
-
Method Details
-
getOrCreateDatasource
DatasourceType<DatasourcesDescriptor> getOrCreateDatasource()If not already created, a newdatasourceelement will be created and returned. Otherwise, the first existingdatasourceelement will be returned.- Returns:
- the instance defined for the element
datasource
-
createDatasource
DatasourceType<DatasourcesDescriptor> createDatasource()Creates a newdatasourceelement- Returns:
- the new created instance of
DatasourceType
-
getAllDatasource
List<DatasourceType<DatasourcesDescriptor>> getAllDatasource()Returns alldatasourceelements- Returns:
- list of
datasource
-
removeAllDatasource
DatasourcesDescriptor removeAllDatasource()Removes alldatasourceelements- Returns:
- the current instance of
DatasourceType
-
getOrCreateXaDatasource
XaDatasourceType<DatasourcesDescriptor> getOrCreateXaDatasource()If not already created, a newxa-datasourceelement will be created and returned. Otherwise, the first existingxa-datasourceelement will be returned.- Returns:
- the instance defined for the element
xa-datasource
-
createXaDatasource
XaDatasourceType<DatasourcesDescriptor> createXaDatasource()Creates a newxa-datasourceelement- Returns:
- the new created instance of
XaDatasourceType
-
getAllXaDatasource
List<XaDatasourceType<DatasourcesDescriptor>> getAllXaDatasource()Returns allxa-datasourceelements- Returns:
- list of
xa-datasource
-
removeAllXaDatasource
DatasourcesDescriptor removeAllXaDatasource()Removes allxa-datasourceelements- Returns:
- the current instance of
XaDatasourceType
-
getOrCreateDrivers
DriversType<DatasourcesDescriptor> getOrCreateDrivers()If not already created, a newdriverselement with the given value will be created. Otherwise, the existingdriverselement will be returned.- Returns:
- a new or existing instance of
DriversType
-
removeDrivers
DatasourcesDescriptor removeDrivers()Removes thedriverselement- Returns:
- the current instance of
DatasourcesDescriptor
-