public class JDBCAuthority extends BaseAuthorityConnector
| Modifier and Type | Class and Description |
|---|---|
protected class |
JDBCAuthority.JdbcAuthorizationResponseDescription
This is the cache object descriptor for cached access tokens from this
connector.
|
protected static class |
JDBCAuthority.VariableMap
Variable map.
|
protected static class |
JDBCAuthority.VariableMapItem
Variable map entry.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
_rcsid |
protected String |
accessMethod |
protected JDBCConnection |
connection |
protected String |
databaseName |
protected static StringSet |
emptyStringSet |
protected String |
host |
protected String |
idQuery |
protected String |
jdbcProvider |
protected String |
password |
protected String |
rawDriverString |
protected String |
tokenQuery |
protected String |
userName |
RESPONSE_UNREACHABLE, RESPONSE_UNREACHABLE_ADDITIVE, RESPONSE_USERNOTFOUND, RESPONSE_USERNOTFOUND_ADDITIVE, RESPONSE_USERUNAUTHORIZED, RESPONSE_USERUNAUTHORIZED_ADDITIVEcurrentContext, paramsGLOBAL_DENY_TOKEN| Constructor and Description |
|---|
JDBCAuthority() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addConstant(JDBCAuthority.VariableMap map,
String varName,
String value)
Add string query constants
|
protected static void |
addVariable(JDBCAuthority.VariableMap map,
String varName,
String variable)
Add string query variables
|
String |
check()
Check status of connection.
|
void |
connect(ConfigParams configParams)
Connect.
|
void |
disconnect()
Close the connection.
|
AuthorizationResponse |
getAuthorizationResponse(String userName)
Obtain the access tokens for a given user name.
|
AuthorizationResponse |
getAuthorizationResponseUncached(String userName) |
protected void |
getSession()
Set up a session
|
protected static void |
loadPS(PreparedStatement ps,
ArrayList data) |
void |
outputConfigurationBody(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
String tabName)
Output the configuration body section.
|
void |
outputConfigurationHeader(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters,
List<String> tabsArray)
Output the configuration header section.
|
String |
processConfigurationPost(IThreadContext threadContext,
IPostParameters variableContext,
Locale locale,
ConfigParams parameters)
Process a configuration post.
|
void |
setThreadContext(IThreadContext tc)
Set thread context.
|
protected static void |
substituteQuery(String inputString,
JDBCAuthority.VariableMap inputMap,
StringBuilder outputQuery,
ArrayList outputParams)
Given a query, and a parameter map, substitute it.
|
void |
viewConfiguration(IThreadContext threadContext,
IHTTPOutput out,
Locale locale,
ConfigParams parameters)
View configuration.
|
getAccessTokens, getDefaultAccessTokens, getDefaultAuthorizationResponseclearThreadContext, deinstall, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, unpack, unpackFixedList, unpackList, viewConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearThreadContext, deinstall, getConfiguration, install, isConnected, pollpublic static final String _rcsid
protected JDBCConnection connection
protected String jdbcProvider
protected String accessMethod
protected String host
protected String databaseName
protected String rawDriverString
protected String userName
protected String password
protected String idQuery
protected String tokenQuery
protected static StringSet emptyStringSet
public void setThreadContext(IThreadContext tc) throws ManifoldCFException
setThreadContext in interface IConnectorsetThreadContext in class BaseConnectorManifoldCFExceptionpublic void connect(ConfigParams configParams)
connect in interface IConnectorconnect in class BaseConnectorconfigParams - are the configuration parameters for this connection.public String check() throws ManifoldCFException
check in interface IConnectorcheck in class BaseConnectorManifoldCFExceptionpublic void disconnect()
throws ManifoldCFException
disconnect in interface IConnectordisconnect in class BaseConnectorManifoldCFExceptionprotected void getSession()
throws ManifoldCFException,
ServiceInterruption
public AuthorizationResponse getAuthorizationResponse(String userName) throws ManifoldCFException
getAuthorizationResponse in interface IAuthorityConnectorgetAuthorizationResponse in class BaseAuthorityConnectoruserName - is the user name or identifier.ManifoldCFExceptionpublic AuthorizationResponse getAuthorizationResponseUncached(String userName) throws ManifoldCFException
ManifoldCFExceptionpublic void outputConfigurationHeader(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, List<String> tabsArray) throws ManifoldCFException, IOException
outputConfigurationHeader in interface IConnectoroutputConfigurationHeader in class BaseConnectorthreadContext - is the local thread context.out - is the output to which any HTML should be sent.parameters - are the configuration parameters, as they currently
exist, for this connection being configured.tabsArray - is an array of tab names. Add to this array any tab names
that are specific to the connector.ManifoldCFExceptionIOExceptionpublic void outputConfigurationBody(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters, String tabName) throws ManifoldCFException, IOException
outputConfigurationBody in interface IConnectoroutputConfigurationBody in class BaseConnectorthreadContext - is the local thread context.out - is the output to which any HTML should be sent.parameters - are the configuration parameters, as they currently
exist, for this connection being configured.tabName - is the current tab name.ManifoldCFExceptionIOExceptionpublic String processConfigurationPost(IThreadContext threadContext, IPostParameters variableContext, Locale locale, ConfigParams parameters) throws ManifoldCFException
processConfigurationPost in interface IConnectorprocessConfigurationPost in class BaseConnectorthreadContext - is the local thread context.variableContext - is the set of variables available from the post,
including binary file post information.parameters - are the configuration parameters, as they currently
exist, for this connection being configured.ManifoldCFExceptionpublic void viewConfiguration(IThreadContext threadContext, IHTTPOutput out, Locale locale, ConfigParams parameters) throws ManifoldCFException, IOException
viewConfiguration in interface IConnectorviewConfiguration in class BaseConnectorthreadContext - is the local thread context.out - is the output to which any HTML should be sent.parameters - are the configuration parameters, as they currently
exist, for this connection being configured.ManifoldCFExceptionIOExceptionprotected static void substituteQuery(String inputString, JDBCAuthority.VariableMap inputMap, StringBuilder outputQuery, ArrayList outputParams) throws ManifoldCFException
ManifoldCFExceptionprotected static void addVariable(JDBCAuthority.VariableMap map, String varName, String variable)
protected static void addConstant(JDBCAuthority.VariableMap map, String varName, String value)
protected static void loadPS(PreparedStatement ps, ArrayList data) throws SQLException, ManifoldCFException
SQLExceptionManifoldCFException