Package org.alfresco.filesys
Class AbstractServerConfigurationBean
- java.lang.Object
-
- org.alfresco.jlan.server.config.ServerConfiguration
-
- org.alfresco.filesys.AbstractServerConfigurationBean
-
- All Implemented Interfaces:
java.util.EventListener,ExtendedServerConfigurationAccessor,org.alfresco.jlan.server.config.ServerConfigurationAccessor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
- Direct Known Subclasses:
ServerConfigurationBean
public abstract class AbstractServerConfigurationBean extends org.alfresco.jlan.server.config.ServerConfiguration implements ExtendedServerConfigurationAccessor, org.springframework.context.ApplicationListener, org.springframework.context.ApplicationContextAware
Alfresco File Server Configuration Bean Class- Author:
- gkspencer
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBIND_TO_IGNOREprotected static java.lang.StringDefaultFTPAnonymousAccountprotected static intDefaultFTPServerPortprotected static intDefaultFTPSrvSessionTimeoutprotected static int[]DefaultMemoryPoolBufSizesprotected static int[]DefaultMemoryPoolInitAllocprotected static int[]DefaultMemoryPoolMaxAllocprotected static intDefaultThreadPoolInitprotected static intDefaultThreadPoolMaxprotected static org.apache.commons.logging.Logloggerprotected AuthenticationComponentm_authenticationComponentprotected booleanm_disableNativeCodeprotected static java.lang.String[]m_ftpDebugStrprotected static java.lang.String[]m_nfsDebugStrprotected org.alfresco.repo.tenant.TenantServicem_tenantServicestatic intMaxSessionTimeoutprotected static intMemoryPoolMaximumAllocationprotected static intMemoryPoolMinimumAllocation
-
Constructor Summary
Constructors Constructor Description AbstractServerConfigurationBean()Default constructorAbstractServerConfigurationBean(java.lang.String srvName)Class constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcloseConfiguration()Close the configuration beanorg.springframework.context.ApplicationContextgetApplicationsContext()Return the applicatin contextprotected AuthenticationComponentgetAuthenticationComponent()Return the authentication componentprotected AuthenticationServicegetAuthenticationService()Return the authentication serviceAuthorityServicegetAuthorityService()Return the authority servicejava.lang.ObjectgetBean(java.lang.String beanName)Return the named beanjava.lang.StringgetLocalDomainName()Get the local domain/workgroup namejava.lang.StringgetLocalServerName(boolean trimDomain)Get the local server name and optionally trim the domain nameprotected org.alfresco.service.namespace.NamespaceServicegetNamespaceService()Return the namespace serviceprotected org.alfresco.service.cmr.repository.NodeServicegetNodeService()Return the node serviceprotected PersonServicegetPersonService()Return the person serviceExtendedDiskInterfacegetRepoDiskInterface()Return the repository disk interface to be used to create sharesprotected org.alfresco.service.cmr.search.SearchServicegetSearchService()Return the search serviceprotected org.alfresco.repo.tenant.TenantServicegetTenantService()Return the tenant serviceprotected TransactionServicegetTransactionService()Return the transaction servicevoidinit()Initialize the configuration using the configuration servicebooleanisFTPServerEnabled()Check if the FTP server is enabledbooleanisInitialised()Check if the configuration has been initializedbooleanisNativeCodeDisabled()Check if native code calls are disabledbooleanisNFSServerEnabled()Check if the NFS server is enabledvoidonApplicationEvent(org.springframework.context.ApplicationEvent event)protected java.net.InetAddressparseAdapterName(java.lang.String adapter)Parse an adapter name string and return the matching addressprotected java.util.EnumSet<org.alfresco.jlan.util.Platform.Type>parsePlatformString(java.lang.String platformStr)Parse the platforms attribute returning the set of platform idsprotected abstract voidprocessCoreServerConfig()protected abstract voidprocessFilesystemsConfig()protected abstract voidprocessFTPServerConfig()protected abstract voidprocessSecurityConfig()protected voidprocessWINSServerConfig()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetAuthenticationComponent(AuthenticationComponent component)Set the authentication componentvoidsetAuthenticationService(AuthenticationService authenticationService)Set the authentication servicevoidsetAuthorityService(AuthorityService authService)Set the authority servicevoidsetDiskInterface(ExtendedDiskInterface diskInterface)Set the filesystem driver for the node service based filesystemvoidsetNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)Set the namespace servicevoidsetNodeService(org.alfresco.service.cmr.repository.NodeService service)Set the node servicevoidsetPersonService(PersonService service)Set the person servicevoidsetSearchService(org.alfresco.service.cmr.search.SearchService searchService)Set the search servicevoidsetTenantService(org.alfresco.repo.tenant.TenantService tenantService)Set the tenant servicevoidsetTransactionService(TransactionService service)Set the transaction service-
Methods inherited from class org.alfresco.jlan.server.config.ServerConfiguration
addConfigSection, addListener, addServer, findServer, fireConfigurationChange, getConfigSection, getPlatformType, getPlatformTypeString, getServer, getServerName, hasConfigSection, hasConfigurationListeners, isServerRunning, isUpdated, loadConfiguration, numberOfServers, removeAllConfigSections, removeConfigSection, removeListener, removeServer, saveConfiguration, setServerName, setUpdated
-
-
-
-
Field Detail
-
logger
protected static final org.apache.commons.logging.Log logger
-
BIND_TO_IGNORE
public static final java.lang.String BIND_TO_IGNORE
- See Also:
- Constant Field Values
-
m_ftpDebugStr
protected static final java.lang.String[] m_ftpDebugStr
-
DefaultFTPServerPort
protected static final int DefaultFTPServerPort
- See Also:
- Constant Field Values
-
DefaultFTPSrvSessionTimeout
protected static final int DefaultFTPSrvSessionTimeout
- See Also:
- Constant Field Values
-
DefaultFTPAnonymousAccount
protected static final java.lang.String DefaultFTPAnonymousAccount
- See Also:
- Constant Field Values
-
m_nfsDebugStr
protected static final java.lang.String[] m_nfsDebugStr
-
DefaultThreadPoolInit
protected static final int DefaultThreadPoolInit
- See Also:
- Constant Field Values
-
DefaultThreadPoolMax
protected static final int DefaultThreadPoolMax
- See Also:
- Constant Field Values
-
DefaultMemoryPoolBufSizes
protected static final int[] DefaultMemoryPoolBufSizes
-
DefaultMemoryPoolInitAlloc
protected static final int[] DefaultMemoryPoolInitAlloc
-
DefaultMemoryPoolMaxAlloc
protected static final int[] DefaultMemoryPoolMaxAlloc
-
MemoryPoolMinimumAllocation
protected static final int MemoryPoolMinimumAllocation
- See Also:
- Constant Field Values
-
MemoryPoolMaximumAllocation
protected static final int MemoryPoolMaximumAllocation
- See Also:
- Constant Field Values
-
MaxSessionTimeout
public static final int MaxSessionTimeout
- See Also:
- Constant Field Values
-
m_authenticationComponent
protected AuthenticationComponent m_authenticationComponent
-
m_tenantService
protected org.alfresco.repo.tenant.TenantService m_tenantService
-
m_disableNativeCode
protected boolean m_disableNativeCode
-
-
Method Detail
-
setAuthenticationService
public void setAuthenticationService(AuthenticationService authenticationService)
Set the authentication service- Parameters:
authenticationService- AuthenticationService
-
setDiskInterface
public void setDiskInterface(ExtendedDiskInterface diskInterface)
Set the filesystem driver for the node service based filesystem- Parameters:
diskInterface- DiskInterface
-
setAuthenticationComponent
public void setAuthenticationComponent(AuthenticationComponent component)
Set the authentication component- Parameters:
component- AuthenticationComponent
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService service)
Set the node service- Parameters:
service- NodeService
-
setPersonService
public void setPersonService(PersonService service)
Set the person service- Parameters:
service- PersonService
-
setTransactionService
public void setTransactionService(TransactionService service)
Set the transaction service- Parameters:
service- TransactionService
-
setTenantService
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
Set the tenant service- Parameters:
tenantService- TenantService
-
setSearchService
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
Set the search service- Parameters:
searchService- SearchService
-
setNamespaceService
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
Set the namespace service- Parameters:
namespaceService- NamespaceService
-
setAuthorityService
public void setAuthorityService(AuthorityService authService)
Set the authority service- Parameters:
authService- AuthorityService
-
isInitialised
public boolean isInitialised()
Check if the configuration has been initialized- Returns:
- Returns true if the configuration was fully initialised
-
isFTPServerEnabled
public final boolean isFTPServerEnabled()
Check if the FTP server is enabled- Returns:
- boolean
-
isNFSServerEnabled
public final boolean isNFSServerEnabled()
Check if the NFS server is enabled- Returns:
- boolean
-
getRepoDiskInterface
public final ExtendedDiskInterface getRepoDiskInterface()
Return the repository disk interface to be used to create shares- Returns:
- DiskInterface
-
init
public void init()
Initialize the configuration using the configuration service
-
processCoreServerConfig
protected abstract void processCoreServerConfig() throws org.alfresco.jlan.server.config.InvalidConfigurationException- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
processSecurityConfig
protected abstract void processSecurityConfig()
-
processFilesystemsConfig
protected abstract void processFilesystemsConfig()
-
processFTPServerConfig
protected abstract void processFTPServerConfig()
-
processWINSServerConfig
protected void processWINSServerConfig()
-
closeConfiguration
public final void closeConfiguration()
Close the configuration bean- Overrides:
closeConfigurationin classorg.alfresco.jlan.server.config.ServerConfiguration
-
parsePlatformString
protected final java.util.EnumSet<org.alfresco.jlan.util.Platform.Type> parsePlatformString(java.lang.String platformStr)
Parse the platforms attribute returning the set of platform ids- Parameters:
platformStr- String
-
getLocalServerName
public final java.lang.String getLocalServerName(boolean trimDomain)
Get the local server name and optionally trim the domain name- Specified by:
getLocalServerNamein interfaceExtendedServerConfigurationAccessor- Parameters:
trimDomain- boolean- Returns:
- String
-
getLocalDomainName
public final java.lang.String getLocalDomainName()
Get the local domain/workgroup name- Specified by:
getLocalDomainNamein interfaceExtendedServerConfigurationAccessor- Returns:
- String
-
parseAdapterName
protected final java.net.InetAddress parseAdapterName(java.lang.String adapter) throws org.alfresco.jlan.server.config.InvalidConfigurationExceptionParse an adapter name string and return the matching address- Parameters:
adapter- String- Returns:
- InetAddress
- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getAuthenticationService
protected final AuthenticationService getAuthenticationService()
Return the authentication service- Returns:
- AuthenticationService
-
getAuthenticationComponent
protected final AuthenticationComponent getAuthenticationComponent()
Return the authentication component- Returns:
- AuthenticationComponent
-
getNodeService
protected final org.alfresco.service.cmr.repository.NodeService getNodeService()
Return the node service- Returns:
- NodeService
-
getPersonService
protected final PersonService getPersonService()
Return the person service- Returns:
- PersonService
-
getTransactionService
protected final TransactionService getTransactionService()
Return the transaction service- Returns:
- TransactionService
-
getTenantService
protected final org.alfresco.repo.tenant.TenantService getTenantService()
Return the tenant service- Returns:
- TenantService
-
getSearchService
protected final org.alfresco.service.cmr.search.SearchService getSearchService()
Return the search service- Returns:
- SearchService
-
getNamespaceService
protected final org.alfresco.service.namespace.NamespaceService getNamespaceService()
Return the namespace service- Returns:
- NamespaceService
-
isNativeCodeDisabled
public final boolean isNativeCodeDisabled()
Check if native code calls are disabled- Returns:
- boolean
-
getBean
public final java.lang.Object getBean(java.lang.String beanName)
Return the named bean- Parameters:
beanName- String- Returns:
- Object
-
getApplicationsContext
public final org.springframework.context.ApplicationContext getApplicationsContext()
Return the applicatin context- Returns:
- ApplicationContext
-
getAuthorityService
public final AuthorityService getAuthorityService()
Return the authority service- Returns:
- AuthorityService
-
-