Class RegexpMapper
- java.lang.Object
-
- org.apache.manifoldcf.core.connector.BaseConnector
-
- org.apache.manifoldcf.authorities.mappers.BaseMappingConnector
-
- org.apache.manifoldcf.authorities.mappers.regexp.RegexpMapper
-
- All Implemented Interfaces:
org.apache.manifoldcf.authorities.interfaces.IMappingConnector
,org.apache.manifoldcf.core.interfaces.IConnector
public class RegexpMapper extends org.apache.manifoldcf.authorities.mappers.BaseMappingConnector
This is the regexp mapper implementation, which uses a regular expression to manipulate a user name.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
-
Constructor Summary
Constructors Constructor Description RegexpMapper()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disconnect()
Close the connection.java.lang.String
mapUser(java.lang.String userName)
Map an input user name to an output name.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
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.-
Methods inherited from class org.apache.manifoldcf.core.connector.BaseConnector
check, clearThreadContext, connect, deinstall, getConfiguration, install, isConnected, outputConfigurationBody, outputConfigurationHeader, outputConfigurationHeader, pack, packFixedList, packList, packList, poll, processConfigurationPost, setThreadContext, unpack, unpackFixedList, unpackList, viewConfiguration
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
-
Method Detail
-
disconnect
public void disconnect() throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Close the connection. Call this before discarding the mapping connection.- Specified by:
disconnect
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
disconnect
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
mapUser
public java.lang.String mapUser(java.lang.String userName) throws org.apache.manifoldcf.core.interfaces.ManifoldCFException
Map an input user name to an output name.- Parameters:
userName
- is the name to map- Returns:
- the mapped user name
- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
-
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
Output the configuration header section. This method is called in the head section of the connector's configuration page. Its purpose is to add the required tabs to the list, and to output any javascript methods that might be needed by the configuration editing HTML.- Specified by:
outputConfigurationHeader
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
outputConfigurationHeader
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.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
Output the configuration body section. This method is called in the body section of the authority connector's configuration page. Its purpose is to present the required form elements for editing. The coder can presume that the HTML that is output from this configuration will be within appropriate <html>, <body>, and <form> tags. The name of the form is "editconnection".- Specified by:
outputConfigurationBody
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
outputConfigurationBody
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.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
Process a configuration post. This method is called at the start of the authority connector's configuration page, whenever there is a possibility that form data for a connection has been posted. Its purpose is to gather form information and modify the configuration parameters accordingly. The name of the posted form is "editconnection".- Specified by:
processConfigurationPost
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
processConfigurationPost
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Returns:
- null if all is well, or a string error message if there is an error that should prevent saving of the connection (and cause a redirection to an error page).
- 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
View configuration. This method is called in the body section of the authority connector's view configuration page. Its purpose is to present the connection information to the user. The coder can presume that the HTML that is output from this configuration will be within appropriate <html> and <body>tags.- Specified by:
viewConfiguration
in interfaceorg.apache.manifoldcf.core.interfaces.IConnector
- Overrides:
viewConfiguration
in classorg.apache.manifoldcf.core.connector.BaseConnector
- Parameters:
threadContext
- 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.- Throws:
org.apache.manifoldcf.core.interfaces.ManifoldCFException
java.io.IOException
-
-