Class GenericAuthority
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
-
- org.apache.manifoldcf.authorities.authorities.generic.GenericAuthority
-
- All Implemented Interfaces:
org.apache.manifoldcf.authorities.interfaces.IAuthorityConnector,org.apache.manifoldcf.core.interfaces.IConnector
public class GenericAuthority extends org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector- Author:
- krycek
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGenericAuthority.CheckThreadprotected static classGenericAuthority.FetchTokensThreadprotected classGenericAuthority.GenericAuthorizationResponseDescriptionThis is the cache object descriptor for cached access tokens from this connector.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected static org.apache.manifoldcf.core.interfaces.StringSetemptyStringSet-
Fields inherited from class org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
RESPONSE_UNREACHABLE, RESPONSE_UNREACHABLE_ADDITIVE, RESPONSE_USERNOTFOUND, RESPONSE_USERNOTFOUND_ADDITIVE, RESPONSE_USERUNAUTHORIZED, RESPONSE_USERUNAUTHORIZED_ADDITIVE
-
-
Constructor Summary
Constructors Constructor Description GenericAuthority()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcheck()Check connection for sanity.voidconnect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)Connect.protected java.lang.StringcreateCacheConnectionString()voiddisconnect()Close the connection.org.apache.manifoldcf.authorities.interfaces.AuthorizationResponsegetAuthorizationResponse(java.lang.String userName)Obtain the access tokens for a given user name.protected org.apache.manifoldcf.authorities.interfaces.AuthorizationResponsegetAuthorizationResponseUncached(org.apache.http.client.HttpClient client, java.lang.String userName)protected org.apache.http.impl.client.DefaultHttpClientgetClient()org.apache.manifoldcf.authorities.interfaces.AuthorizationResponsegetDefaultAuthorizationResponse(java.lang.String userName)Obtain the default access tokens for a given user name.booleanisConnected()This method is called to assess whether to count this connector instance should actually be counted as being connected.voidoutputConfigurationBody(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)voidoutputConfigurationHeader(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)voidpoll()Poll.java.lang.StringprocessConfigurationPost(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)voidsetThreadContext(org.apache.manifoldcf.core.interfaces.IThreadContext tc)Set thread context.voidviewConfiguration(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)-
Methods inherited from class org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
getAccessTokens, getDefaultAccessTokens
-
Methods inherited from class org.apache.manifoldcf.core.connector.BaseConnector
clearThreadContext, deinstall, getConfiguration, install, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, processConfigurationPost, unpack, unpackFixedList, unpackList, viewConfiguration
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
emptyStringSet
protected static org.apache.manifoldcf.core.interfaces.StringSet emptyStringSet
-
-
Method Detail
-
setThreadContext
public void setThreadContext(org.apache.manifoldcf.core.interfaces.IThreadContext tc) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionSet thread context.- Specified by:
setThreadContextin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
setThreadContextin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
connect
public void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Connect. The configuration parameters are included.- Specified by:
connectin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
connectin classorg.apache.manifoldcf.core.connector.BaseConnector- Parameters:
configParams- are the configuration parameters for this connection.
-
getClient
protected org.apache.http.impl.client.DefaultHttpClient getClient() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
poll
public void poll() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionPoll. The connection should be closed if it has been idle for too long.- Specified by:
pollin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
pollin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
isConnected
public boolean isConnected()
This method is called to assess whether to count this connector instance should actually be counted as being connected.- Specified by:
isConnectedin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
isConnectedin classorg.apache.manifoldcf.core.connector.BaseConnector- Returns:
- true if the connector instance is actually connected.
-
check
public java.lang.String check() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionCheck connection for sanity.- Specified by:
checkin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
checkin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
disconnect
public void disconnect() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionClose the connection. Call this before discarding the repository connector.- Specified by:
disconnectin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
disconnectin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
createCacheConnectionString
protected java.lang.String createCacheConnectionString()
-
getAuthorizationResponse
public org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getAuthorizationResponse(java.lang.String userName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionObtain the access tokens for a given user name.- Specified by:
getAuthorizationResponsein interfaceorg.apache.manifoldcf.authorities.interfaces.IAuthorityConnector- Overrides:
getAuthorizationResponsein classorg.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector- Parameters:
userName- is the user name or identifier.- Returns:
- the response tokens (according to the current authority). (Should throws an exception only when a condition cannot be properly described within the authorization response object.)
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getAuthorizationResponseUncached
protected org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getAuthorizationResponseUncached(org.apache.http.client.HttpClient client, java.lang.String userName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getDefaultAuthorizationResponse
public org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getDefaultAuthorizationResponse(java.lang.String userName)
Obtain the default access tokens for a given user name.- Specified by:
getDefaultAuthorizationResponsein interfaceorg.apache.manifoldcf.authorities.interfaces.IAuthorityConnector- Overrides:
getDefaultAuthorizationResponsein classorg.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector- Parameters:
userName- is the user name or identifier.- Returns:
- the default response tokens, presuming that the connect method fails.
-
outputConfigurationHeader
public 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- Specified by:
outputConfigurationHeaderin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
outputConfigurationHeaderin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOException
-
outputConfigurationBody
public 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- Specified by:
outputConfigurationBodyin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
outputConfigurationBodyin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOException
-
processConfigurationPost
public 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- Specified by:
processConfigurationPostin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
processConfigurationPostin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
viewConfiguration
public 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- Specified by:
viewConfigurationin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
viewConfigurationin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionjava.io.IOException
-
-