|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sourceid.saml20.adapter.gui.FieldDescriptor
org.sourceid.saml20.adapter.gui.AbstractSelectionFieldDescriptor
org.sourceid.saml20.adapter.gui.SelectFieldDescriptor
org.sourceid.saml20.adapter.gui.JdbcDatastoreFieldDescriptor
public class JdbcDatastoreFieldDescriptor
A field descriptor that will render (in GUI configuration screen) a drop down selection of all the
configured JDBC data stores.
The value of this field in the Configuration
will
be the JNDI name of the Data Store (datasource).
To access a Connection
object that is created from the JNDI name, you can use the
DataSourceAccessor
class.
You can also use this JNDI name to perform your own lookup. Here is some example code if you want to do it
on your own:
FieldDescriptor jdbcFieldDescriptor = conf.getField( "MyJDBCDatastoreFieldDescriptorName" );
String jndiName = jdbcFieldDescriptor.getValue();
InitialContext initialContext = new InitialContext();
DataSource dataSource = (DataSource)initialContext.lookup("java:/" + jndiName);
Connection conn = dataSource.getConnection();
...
DataSourceAccessor.getConnection(String)
,
AdapterConfigurationGuiDescriptor.addField(FieldDescriptor)
,
AdapterConfigurationGuiDescriptor.addAdvancedField(FieldDescriptor)
,
TableDescriptor.addRowField(FieldDescriptor)
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.AbstractSelectionFieldDescriptor |
---|
AbstractSelectionFieldDescriptor.OptionValue |
Nested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor |
---|
FieldDescriptor.FieldValidationWrapper |
Field Summary |
---|
Fields inherited from class org.sourceid.saml20.adapter.gui.SelectFieldDescriptor |
---|
SELECT_ONE |
Fields inherited from class org.sourceid.saml20.adapter.gui.AbstractSelectionFieldDescriptor |
---|
optionValues |
Constructor Summary | |
---|---|
JdbcDatastoreFieldDescriptor(java.lang.String name,
java.lang.String description)
Create a new JdbcDatastoreFieldDescriptor. |
Method Summary | |
---|---|
java.util.List<AbstractSelectionFieldDescriptor.OptionValue> |
getOptionValues()
Gets the option values list constructed from all the JDBC data sources configured in the system. |
Methods inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor |
---|
addValidator, addValidator, getDefaultValue, getDescription, getName, getValidationChain, setDefaultValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcDatastoreFieldDescriptor(java.lang.String name, java.lang.String description)
name
- the field name (must be unique per AdapterConfigurationGuiDescriptor or TableDescriptor).description
- a helpful description of the field.Method Detail |
---|
public java.util.List<AbstractSelectionFieldDescriptor.OptionValue> getOptionValues()
getOptionValues
in class AbstractSelectionFieldDescriptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |