Class ConfluenceAuthorityConnector
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
-
- org.apache.manifoldcf.authorities.authorities.confluence.ConfluenceAuthorityConnector
-
- All Implemented Interfaces:
org.apache.manifoldcf.authorities.interfaces.IAuthorityConnector,org.apache.manifoldcf.core.interfaces.IConnector
public class ConfluenceAuthorityConnector extends org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnectorConfluence Authority Connector class
ManifoldCF Authority connector to deal with Confluence documents
- Author:
- Antonio David Perez Morales <adperezmorales@gmail.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfluenceClientconfluenceClientprotected java.lang.Stringhostprotected java.lang.Stringpasswordprotected java.lang.Stringpathprotected java.lang.Stringportprotected java.lang.Stringprotocolprotected java.lang.Stringusername-
Fields inherited from class org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
_rcsid, RESPONSE_UNREACHABLE, RESPONSE_UNREACHABLE_ADDITIVE, RESPONSE_USERNOTFOUND, RESPONSE_USERNOTFOUND_ADDITIVE, RESPONSE_USERUNAUTHORIZED, RESPONSE_USERUNAUTHORIZED_ADDITIVE
-
-
Constructor Summary
Constructors Constructor Description ConfluenceAuthorityConnector()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcheck()Checks if connection is availablevoidconnect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)Makes connection to servervoiddisconnect()Close the connection.org.apache.manifoldcf.authorities.interfaces.AuthorizationResponsegetAuthorizationResponse(java.lang.String userName)org.apache.manifoldcf.authorities.interfaces.AuthorizationResponsegetDefaultAuthorizationResponse(java.lang.String userName)protected voidinitConfluenceClient()Initialize Confluence client using the configured parametersbooleanisConnected()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)java.lang.StringprocessConfigurationPost(org.apache.manifoldcf.core.interfaces.IThreadContext threadContext, org.apache.manifoldcf.core.interfaces.IPostParameters variableContext, org.apache.manifoldcf.core.interfaces.ConfigParams parameters)voidsetConfluenceClient(ConfluenceClient client)Used Mainly for testingvoidviewConfiguration(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, poll, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration
-
-
-
-
Field Detail
-
protocol
protected java.lang.String protocol
-
host
protected java.lang.String host
-
port
protected java.lang.String port
-
path
protected java.lang.String path
-
username
protected java.lang.String username
-
password
protected java.lang.String password
-
confluenceClient
protected ConfluenceClient confluenceClient
-
-
Method Detail
-
setConfluenceClient
public void setConfluenceClient(ConfluenceClient client)
Used Mainly for testing- Parameters:
client- Injected Confluence Client
-
disconnect
public void disconnect() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionClose the connection. Call this before discarding the connection.- Specified by:
disconnectin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
disconnectin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
connect
public void connect(org.apache.manifoldcf.core.interfaces.ConfigParams configParams)
Makes connection to server- Specified by:
connectin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
connectin classorg.apache.manifoldcf.core.connector.BaseConnector
-
check
public java.lang.String check() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionChecks if connection is available- Specified by:
checkin interfaceorg.apache.manifoldcf.core.interfaces.IConnector- Overrides:
checkin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
initConfluenceClient
protected void initConfluenceClient() throws org.apache.manifoldcf.core.interfaces.ManifoldCFExceptionInitialize Confluence client using the configured parameters
- 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.
-
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
-
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, org.apache.manifoldcf.core.interfaces.ConfigParams parameters) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException- Overrides:
processConfigurationPostin classorg.apache.manifoldcf.core.connector.BaseConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
getDefaultAuthorizationResponse
public org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getDefaultAuthorizationResponse(java.lang.String userName)
- Specified by:
getDefaultAuthorizationResponsein interfaceorg.apache.manifoldcf.authorities.interfaces.IAuthorityConnector- Overrides:
getDefaultAuthorizationResponsein classorg.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector
-
getAuthorizationResponse
public org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse getAuthorizationResponse(java.lang.String userName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException- Specified by:
getAuthorizationResponsein interfaceorg.apache.manifoldcf.authorities.interfaces.IAuthorityConnector- Overrides:
getAuthorizationResponsein classorg.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
-