org.apache.manifoldcf.authorities.authorities
Class BaseAuthorityConnector

java.lang.Object
  extended by org.apache.manifoldcf.core.connector.BaseConnector
      extended by 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
static java.lang.String _rcsid
           
 
Fields inherited from class org.apache.manifoldcf.core.connector.BaseConnector
currentContext, params
 
Constructor Summary
BaseAuthorityConnector()
           
 
Method Summary
 java.lang.String[] getAccessTokens(java.lang.String userName)
          Obtain the access tokens for a given user name.
 AuthorizationResponse getAuthorizationResponse(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.
 AuthorizationResponse getDefaultAuthorizationResponse(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, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, 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, outputConfigurationBody, outputConfigurationHeader, poll, processConfigurationPost, setThreadContext, viewConfiguration
 

Field Detail

_rcsid

public static final java.lang.String _rcsid
See Also:
Constant Field Values
Constructor Detail

BaseAuthorityConnector

public BaseAuthorityConnector()
Method Detail

getAuthorizationResponse

public AuthorizationResponse getAuthorizationResponse(java.lang.String userName)
                                               throws ManifoldCFException
Obtain the access tokens for a given user name.

Specified by:
getAuthorizationResponse in interface IAuthorityConnector
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:
getDefaultAuthorizationResponse in interface IAuthorityConnector
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 ManifoldCFException
Obtain 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.