MOB-651: Decouple File Servers from Config Service and Authenticators

- Minor JLAN changes (backward compatible)
   - CIFSAuthenticator implements an interface (to allow dynamic proxying to authentication subsystem)
   - CIFSAuthenticator accesses ServerConfiguration via ServerConfigurationAccessor interface and doesn't retain references to config sections (again to allow dynamic proxying and hot swapping)
   - ConfigSections have way of directly setting container initialised authenticators, sharemappers, etc.
   - Authenticators, etc. still support initialisation from config service in backward compatible manner.
- Most of ServerConfigurationBean moved to AbstractServerConfigurationBean superclass.
- New org.alfresco.filesys.config package with ServerConfigurationBean implementation and supporting classes that can be initialised by a Spring container.
- File server authenticators moved into authentication subsystem. TODO: Kerberos and NTLM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13795 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-04-01 13:22:06 +00:00
parent e7d9ce8fc6
commit 972dd9a4ba
49 changed files with 9469 additions and 3276 deletions

View File

@@ -43,6 +43,7 @@ import org.alfresco.config.ConfigElement;
import org.alfresco.filesys.alfresco.AlfrescoClientInfo;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
/**
* Home Share Mapper Class
@@ -52,7 +53,7 @@ import org.apache.commons.logging.LogFactory;
*
* @author GKSpencer
*/
public class HomeShareMapper implements ShareMapper
public class HomeShareMapper implements ShareMapper, InitializingBean
{
// Logging
@@ -86,6 +87,22 @@ public class HomeShareMapper implements ShareMapper
{
}
public void setServerConfiguration(ServerConfiguration config)
{
this.m_config = config;
}
public void setName(String shareName)
{
m_homeShareName = shareName;
}
public void setDebug(boolean debug)
{
this.m_debug = debug;
}
/**
* Initialize the share mapper
*
@@ -97,19 +114,28 @@ public class HomeShareMapper implements ShareMapper
{
// Save the server configuration
m_config = config;
m_filesysConfig = (FilesystemsConfigSection) m_config.getConfigSection(FilesystemsConfigSection.SectionName);
setServerConfiguration(config);
// Check if the home share name has been specified
String homeName = params.getAttribute("name");
if ( homeName != null && homeName.length() > 0)
m_homeShareName = homeName;
setName(homeName);
// Check if debug is enabled
if (params != null && params.getChild("debug") != null)
m_debug = true;
setDebug(true);
// Complete initialization
afterPropertiesSet();
}
public void afterPropertiesSet()
{
// Save the server configuration
m_filesysConfig = (FilesystemsConfigSection) m_config.getConfigSection(FilesystemsConfigSection.SectionName);
// Search for a filesystem that uses the content driver to use the driver when creating the home shares