public class SPECCHIODatabaseDescriptor extends java.lang.Object implements SPECCHIOServerDescriptor
Constructor and Description |
---|
SPECCHIODatabaseDescriptor(java.lang.String[] tokens)
Constructor for SPECCHIOClientFactory.process_line().
|
SPECCHIODatabaseDescriptor(java.lang.String server,
int port,
java.lang.String schema,
java.lang.String dataSourceName)
Constructor for an anonymous connection to the database.
|
SPECCHIODatabaseDescriptor(java.lang.String server,
int port,
java.lang.String schema,
java.lang.String dataSourceName,
java.lang.String user,
java.lang.String password)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
SPECCHIOClient |
createClient()
Create a web client that can connect to the server represented by
this descriptor.
|
java.lang.String |
getAccountConfigurationString()
Get the string describing the account configuration for db_config.txt
|
java.lang.String |
getDatabaseName()
The the database name.
|
java.lang.String |
getDataSourceName()
Get a name of the datasource (JNDI).
|
java.lang.String |
getDisplayName(boolean showUser,
boolean show_datasource_name)
Get the display name of this server.
|
java.lang.String |
getDisplayUser()
Get the user name.
|
int |
getList_index()
index at which this descriptor is found in the list of known connections
|
java.lang.String |
getPassword()
Get the password.
|
int |
getPort()
Get the port number.
|
java.lang.String |
getPreferenceNodeName()
Get the node name in preferences or line number in legacy file
|
java.lang.String |
getServer()
Get the database server name.
|
java.lang.Boolean |
isEncrypted()
Defines if this connection is encrypted
|
void |
setDataSourceName(java.lang.String dataSourceName) |
void |
setList_index(int list_index)
set index at which this descriptor is found in the list of known connections
|
void |
setUser(User user)
Set the user information associated with this account.
|
java.lang.String |
toString()
Get a string representation of the server.
|
java.lang.Boolean |
usesDefaultTrustStore()
Defines if this connection relies on the default JVM trust store
|
public SPECCHIODatabaseDescriptor(java.lang.String server, int port, java.lang.String schema, java.lang.String dataSourceName, java.lang.String user, java.lang.String password)
server
- the database host nameport
- the database port numberschema
- the database schema nameuser
- the usernamepassword
- the passwordpublic SPECCHIODatabaseDescriptor(java.lang.String server, int port, java.lang.String schema, java.lang.String dataSourceName)
server
- the database host nameport
- the database port numberschema
- the database schema nameuser
- the usernamepassword
- the passwordpublic SPECCHIODatabaseDescriptor(java.lang.String[] tokens) throws SPECCHIODatabaseClientException
tokens
- the array of strings read from the input fileSPECCHIODatabaseClientException
- the tokens are not correctly formattedpublic SPECCHIOClient createClient()
createClient
in interface SPECCHIOServerDescriptor
public java.lang.String getAccountConfigurationString()
public java.lang.String getDatabaseName()
public java.lang.String getDisplayName(boolean showUser, boolean show_datasource_name)
getDisplayName
in interface SPECCHIOServerDescriptor
showUser
- include the user account details in the display?show_datasource_name
- include the JNDI details in the display?public java.lang.String getDisplayUser()
getDisplayUser
in interface SPECCHIOServerDescriptor
public java.lang.String getPassword()
public int getPort()
public java.lang.String getServer()
public void setUser(User user)
setUser
in interface SPECCHIOServerDescriptor
user
- the user informationpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDataSourceName()
SPECCHIOServerDescriptor
getDataSourceName
in interface SPECCHIOServerDescriptor
public void setDataSourceName(java.lang.String dataSourceName)
public java.lang.String getPreferenceNodeName()
SPECCHIOServerDescriptor
getPreferenceNodeName
in interface SPECCHIOServerDescriptor
public java.lang.Boolean usesDefaultTrustStore()
SPECCHIOServerDescriptor
usesDefaultTrustStore
in interface SPECCHIOServerDescriptor
public java.lang.Boolean isEncrypted()
SPECCHIOServerDescriptor
isEncrypted
in interface SPECCHIOServerDescriptor
public int getList_index()
SPECCHIOServerDescriptor
getList_index
in interface SPECCHIOServerDescriptor
public void setList_index(int list_index)
SPECCHIOServerDescriptor
setList_index
in interface SPECCHIOServerDescriptor