public final class JndiDatasource extends Object implements Datasource
Constructor and Description |
---|
JndiDatasource(org.ofbiz.core.entity.config.JndiDatasourceInfo jndi) |
JndiDatasource(String jndiName) |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection(com.atlassian.config.bootstrap.AtlassianBootstrapManager bootstrapManager)
Uses the given
link AtlassianBootstrapManager to acquire a Connection to the database defined by
this Datasource . |
org.ofbiz.core.entity.config.DatasourceInfo |
getDatasource(String datasourceName,
String fieldType,
String schemaName)
Get the equivalent Ofbiz DatasourceInfo config class for this Datasource.
|
String |
getDescriptorLabel()
Provides the name of the datasource field that this datasource represents.
|
String |
getDescriptorValue(String databaseType)
Provides a text description suitable for an administrator that identifies the datasource.
|
String |
getJndiName()
Get the JNDI name
|
public JndiDatasource(String jndiName)
public JndiDatasource(org.ofbiz.core.entity.config.JndiDatasourceInfo jndi)
public String getJndiName()
public Connection getConnection(com.atlassian.config.bootstrap.AtlassianBootstrapManager bootstrapManager) throws com.atlassian.config.bootstrap.BootstrapException
Datasource
link AtlassianBootstrapManager
to acquire a Connection
to the database defined by
this Datasource
.getConnection
in interface Datasource
bootstrapManager
- the bootstrapManager to use to get the connection.com.atlassian.config.bootstrap.BootstrapException
- if the connection cannot be established.public org.ofbiz.core.entity.config.DatasourceInfo getDatasource(String datasourceName, String fieldType, String schemaName)
Datasource
getDatasource
in interface Datasource
datasourceName
- the ofbiz name of the datasource.fieldType
- the field-type for the datasource as defined in ofbiz field-types.xmlschemaName
- the name of the schema for the database (may be empty)DatasourceInfo
suitable for configuring Ofbiz.public String getDescriptorValue(String databaseType)
Datasource
getDescriptorValue
in interface Datasource
databaseType
- the field-type for the datasource as defined in ofbiz field-types.xmlpublic String getDescriptorLabel()
Datasource
getDescriptorLabel
in interface Datasource
Copyright © 2002-2019 Atlassian. All Rights Reserved.