public class JDBCAuthority
extends org.apache.manifoldcf.authorities.authorities.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 java.lang.String |
_rcsid |
protected java.lang.String |
accessMethod |
protected JDBCConnection |
connection |
protected java.lang.String |
databaseName |
protected static org.apache.manifoldcf.core.interfaces.StringSet |
emptyStringSet |
protected java.lang.String |
host |
protected java.lang.String |
idQuery |
protected java.lang.String |
jdbcProvider |
protected java.lang.String |
password |
protected java.lang.String |
rawDriverString |
protected java.lang.String |
tokenQuery |
protected java.lang.String |
userName |
RESPONSE_UNREACHABLE, RESPONSE_UNREACHABLE_ADDITIVE, RESPONSE_USERNOTFOUND, RESPONSE_USERNOTFOUND_ADDITIVE, RESPONSE_USERUNAUTHORIZED, RESPONSE_USERUNAUTHORIZED_ADDITIVE| Constructor and Description |
|---|
JDBCAuthority() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addConstant(JDBCAuthority.VariableMap map,
java.lang.String varName,
java.lang.String value)
Add string query constants
|
protected static void |
addVariable(JDBCAuthority.VariableMap map,
java.lang.String varName,
java.lang.String variable)
Add string query variables
|
java.lang.String |
check()
Check status of connection.
|
void |
connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Connect.
|
void |
disconnect()
Close the connection.
|
org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse |
getAuthorizationResponse(java.lang.String userName)
Obtain the access tokens for a given user name.
|
org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse |
getAuthorizationResponseUncached(java.lang.String userName) |
protected void |
getSession()
Set up a session
|
protected static void |
loadPS(java.sql.PreparedStatement ps,
java.util.ArrayList data) |
void |
outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.lang.String tabName)
Output the configuration body section.
|
void |
outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.util.List<java.lang.String> tabsArray)
Output the configuration header section.
|
java.lang.String |
processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
Process a configuration post.
|
void |
setThreadContext(org.apache.manifoldcf.core.interfaces.IThreadContext tc)
Set thread context.
|
protected static void |
substituteQuery(java.lang.String inputString,
JDBCAuthority.VariableMap inputMap,
java.lang.StringBuilder outputQuery,
java.util.ArrayList outputParams)
Given a query, and a parameter map, substitute it.
|
void |
viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
View configuration.
|
getAccessTokens, getDefaultAccessTokens, getDefaultAuthorizationResponseclearThreadContext, deinstall, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, unpack, unpackFixedList, unpackList, viewConfigurationpublic static final java.lang.String _rcsid
protected JDBCConnection connection
protected java.lang.String jdbcProvider
protected java.lang.String accessMethod
protected java.lang.String host
protected java.lang.String databaseName
protected java.lang.String rawDriverString
protected java.lang.String userName
protected java.lang.String password
protected java.lang.String idQuery
protected java.lang.String tokenQuery
protected static org.apache.manifoldcf.core.interfaces.StringSet emptyStringSet
public void setThreadContext(org.apache.manifoldcf.core.interfaces.IThreadContext tc)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
setThreadContext in interface org.apache.manifoldcf.core.interfaces.IConnectorsetThreadContext in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
connect in interface org.apache.manifoldcf.core.interfaces.IConnectorconnect in class org.apache.manifoldcf.core.connector.BaseConnectorconfigParams - are the configuration parameters for this connection.public java.lang.String check()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
check in interface org.apache.manifoldcf.core.interfaces.IConnectorcheck in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void disconnect()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
disconnect in interface org.apache.manifoldcf.core.interfaces.IConnectordisconnect in class org.apache.manifoldcf.core.connector.BaseConnectororg.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected void getSession()
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
org.apache.manifoldcf.agents.interfaces.ServiceInterruption
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionorg.apache.manifoldcf.agents.interfaces.ServiceInterruptionpublic org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getAuthorizationResponse(java.lang.String userName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
getAuthorizationResponse in interface org.apache.manifoldcf.authorities.interfaces.IAuthorityConnectorgetAuthorizationResponse in class org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnectoruserName - is the user name or identifier.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getAuthorizationResponseUncached(java.lang.String userName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void outputConfigurationHeader(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.util.List<java.lang.String> tabsArray)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputConfigurationHeader in interface org.apache.manifoldcf.core.interfaces.IConnectoroutputConfigurationHeader in class org.apache.manifoldcf.core.connector.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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionpublic void outputConfigurationBody(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters,
java.lang.String tabName)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
outputConfigurationBody in interface org.apache.manifoldcf.core.interfaces.IConnectoroutputConfigurationBody in class org.apache.manifoldcf.core.connector.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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionpublic java.lang.String processConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IPostParameters variableContext,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
processConfigurationPost in interface org.apache.manifoldcf.core.interfaces.IConnectorprocessConfigurationPost in class org.apache.manifoldcf.core.connector.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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionpublic void viewConfiguration(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext,
org.apache.manifoldcf.core.interfaces.IHTTPOutput out,
java.util.Locale locale,
org.apache.manifoldcf.core.interfaces.ConfigParams parameters)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException,
java.io.IOException
viewConfiguration in interface org.apache.manifoldcf.core.interfaces.IConnectorviewConfiguration in class org.apache.manifoldcf.core.connector.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.org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOExceptionprotected static void substituteQuery(java.lang.String inputString,
JDBCAuthority.VariableMap inputMap,
java.lang.StringBuilder outputQuery,
java.util.ArrayList outputParams)
throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionprotected static void addVariable(JDBCAuthority.VariableMap map, java.lang.String varName, java.lang.String variable)
protected static void addConstant(JDBCAuthority.VariableMap map, java.lang.String varName, java.lang.String value)
protected static void loadPS(java.sql.PreparedStatement ps,
java.util.ArrayList data)
throws java.sql.SQLException,
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.sql.SQLExceptionorg.apache.manifoldcf.core.interfaces.ManifoldCFException