Class BaseAuthorityConnector
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
-
- All Implemented Interfaces:
IAuthorityConnector,IConnector
public abstract class BaseAuthorityConnector extends BaseConnector implements IAuthorityConnector
An authority connector supplies an ACL of some kind for a given user. This is necessary so that the search UI can find the documents that can be legally seen. An instance of this interface provides this functionality. Authority connector instances are pooled, so that session setup does not need to be done repeatedly. The pool is segregated by specific sets of configuration parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected static AuthorizationResponseRESPONSE_UNREACHABLEprotected static AuthorizationResponseRESPONSE_UNREACHABLE_ADDITIVEprotected static AuthorizationResponseRESPONSE_USERNOTFOUNDprotected static AuthorizationResponseRESPONSE_USERNOTFOUND_ADDITIVEprotected static AuthorizationResponseRESPONSE_USERUNAUTHORIZEDprotected static AuthorizationResponseRESPONSE_USERUNAUTHORIZED_ADDITIVE-
Fields inherited from class org.apache.manifoldcf.core.connector.BaseConnector
currentContext, params
-
Fields inherited from interface org.apache.manifoldcf.authorities.interfaces.IAuthorityConnector
GLOBAL_DENY_TOKEN
-
-
Constructor Summary
Constructors Constructor Description BaseAuthorityConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAccessTokens(java.lang.String userName)Obtain the access tokens for a given user name.AuthorizationResponsegetAuthorizationResponse(java.lang.String userName)Obtain the access tokens for a given user name.java.lang.String[]getDefaultAccessTokens(java.lang.String userName)Return the default access tokens in the case where the getAccessTokens() method could not connect with the server.AuthorizationResponsegetDefaultAuthorizationResponse(java.lang.String userName)Obtain the default access tokens for a given user name.-
Methods inherited from class org.apache.manifoldcf.core.connector.BaseConnector
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration, viewConfiguration
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.manifoldcf.core.interfaces.IConnector
check, clearThreadContext, connect, deinstall, disconnect, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfiguration
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
RESPONSE_UNREACHABLE
protected static final AuthorizationResponse RESPONSE_UNREACHABLE
-
RESPONSE_USERNOTFOUND
protected static final AuthorizationResponse RESPONSE_USERNOTFOUND
-
RESPONSE_USERUNAUTHORIZED
protected static final AuthorizationResponse RESPONSE_USERUNAUTHORIZED
-
RESPONSE_UNREACHABLE_ADDITIVE
protected static final AuthorizationResponse RESPONSE_UNREACHABLE_ADDITIVE
-
RESPONSE_USERNOTFOUND_ADDITIVE
protected static final AuthorizationResponse RESPONSE_USERNOTFOUND_ADDITIVE
-
RESPONSE_USERUNAUTHORIZED_ADDITIVE
protected static final AuthorizationResponse RESPONSE_USERUNAUTHORIZED_ADDITIVE
-
-
Method Detail
-
getAuthorizationResponse
public AuthorizationResponse getAuthorizationResponse(java.lang.String userName) throws ManifoldCFException
Obtain the access tokens for a given user name.- Specified by:
getAuthorizationResponsein interfaceIAuthorityConnector- 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:
ManifoldCFException
-
getDefaultAuthorizationResponse
public AuthorizationResponse getDefaultAuthorizationResponse(java.lang.String userName)
Obtain the default access tokens for a given user name.- Specified by:
getDefaultAuthorizationResponsein interfaceIAuthorityConnector- Parameters:
userName- is the user name or identifier.- Returns:
- the default response tokens, presuming that the connect method fails.
-
getAccessTokens
public java.lang.String[] getAccessTokens(java.lang.String userName) throws ManifoldCFExceptionObtain the access tokens for a given user name.- Parameters:
userName- is the user name or identifier.- Returns:
- the tokens (according to the current authority), or null if the user does not exist. (Throw an exception if access is denied, usually because the authority is down).
- Throws:
ManifoldCFException
-
getDefaultAccessTokens
public java.lang.String[] getDefaultAccessTokens(java.lang.String userName)
Return the default access tokens in the case where the getAccessTokens() method could not connect with the server.- Parameters:
userName- is the username that the access tokens are for. Typically this is not used.- Returns:
- the default tokens, or null if there are no default takens, and the error should be treated as a hard one.
-
-