Package org.alfresco.filesys.auth.ftp
Class FTPAuthenticatorBase
- java.lang.Object
-
- org.alfresco.filesys.auth.ftp.FTPAuthenticatorBase
-
- All Implemented Interfaces:
org.alfresco.jlan.ftp.FTPAuthenticator,ActivateableBean,org.springframework.beans.factory.DisposableBean
- Direct Known Subclasses:
AbstractChainingFtpAuthenticator,AlfrescoFtpAuthenticator
public abstract class FTPAuthenticatorBase extends java.lang.Object implements org.alfresco.jlan.ftp.FTPAuthenticator, ActivateableBean, org.springframework.beans.factory.DisposableBean
- Author:
- gkspencer
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Logloggerprotected org.alfresco.jlan.server.config.ServerConfigurationAccessorserverConfiguration
-
Constructor Summary
Constructors Constructor Description FTPAuthenticatorBase()Default constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanauthenticateUser(org.alfresco.jlan.server.auth.ClientInfo info, org.alfresco.jlan.ftp.FTPSrvSession sess)Authenticate the userprotected voidcheckForAdminUserName(org.alfresco.jlan.server.auth.ClientInfo cInfo)Check if the user is an administrator user namevoidcloseAuthenticator()Close the authenticator, perform any cleanupprotected javax.transaction.UserTransactioncreateTransaction()Create a transaction, this will be a wrteable transaction unless the system is in read-only mode.voiddestroy()Handle tidy up on container shutdownprotected AuthenticationComponentgetAuthenticationComponent()Return the authentication componenetprotected AuthenticationServicegetAuthenticationService()Return the authentication serviceprotected AuthorityServicegetAuthorityService()Return the authority serviceprotected TransactionServicegetTransactionService()Return the transaction servicevoidinitialize()Initialize the authenticator (after properties have been set)voidinitialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params)Initialize the authenticatorbooleanisActive()Determines whether this bean is active.voidsetActive(boolean active)Activates or deactivates the bean.voidsetAuthenticationComponent(AuthenticationComponent authenticationComponent)voidsetAuthenticationService(AuthenticationService authenticationService)voidsetAuthorityService(AuthorityService authorityService)voidsetConfig(org.alfresco.jlan.server.config.ServerConfigurationAccessor config)voidsetTransactionService(TransactionService transactionService)
-
-
-
Method Detail
-
setConfig
public void setConfig(org.alfresco.jlan.server.config.ServerConfigurationAccessor config)
-
setAuthenticationComponent
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
-
setAuthenticationService
public void setAuthenticationService(AuthenticationService authenticationService)
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
setAuthorityService
public void setAuthorityService(AuthorityService authorityService)
-
isActive
public boolean isActive()
Description copied from interface:ActivateableBeanDetermines whether this bean is active.- Specified by:
isActivein interfaceActivateableBean- Returns:
trueif this bean is active
-
setActive
public void setActive(boolean active)
Activates or deactivates the bean.- Parameters:
active-trueif the bean is active and initialization should complete
-
initialize
public void initialize(org.alfresco.jlan.server.config.ServerConfiguration config, org.springframework.extensions.config.ConfigElement params) throws org.alfresco.jlan.server.config.InvalidConfigurationExceptionInitialize the authenticator- Specified by:
initializein interfaceorg.alfresco.jlan.ftp.FTPAuthenticator- Parameters:
config- ServerConfigurationparams- ConfigElement- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
initialize
public void initialize() throws org.alfresco.jlan.server.config.InvalidConfigurationExceptionInitialize the authenticator (after properties have been set)- Throws:
org.alfresco.jlan.server.config.InvalidConfigurationException
-
authenticateUser
public abstract boolean authenticateUser(org.alfresco.jlan.server.auth.ClientInfo info, org.alfresco.jlan.ftp.FTPSrvSession sess)Authenticate the user- Specified by:
authenticateUserin interfaceorg.alfresco.jlan.ftp.FTPAuthenticator- Parameters:
info- ClientInfosess- FTPSrvSession- Returns:
- boolean
-
closeAuthenticator
public void closeAuthenticator()
Close the authenticator, perform any cleanup- Specified by:
closeAuthenticatorin interfaceorg.alfresco.jlan.ftp.FTPAuthenticator
-
getAuthenticationComponent
protected final AuthenticationComponent getAuthenticationComponent()
Return the authentication componenet- Returns:
- AuthenticationComponent
-
getAuthenticationService
protected final AuthenticationService getAuthenticationService()
Return the authentication service- Returns:
- AuthenticationService
-
getTransactionService
protected final TransactionService getTransactionService()
Return the transaction service- Returns:
- TransactionService
-
getAuthorityService
protected final AuthorityService getAuthorityService()
Return the authority service- Returns:
- AuthorityService
-
checkForAdminUserName
protected final void checkForAdminUserName(org.alfresco.jlan.server.auth.ClientInfo cInfo)
Check if the user is an administrator user name- Parameters:
cInfo- ClientInfo
-
createTransaction
protected final javax.transaction.UserTransaction createTransaction()
Create a transaction, this will be a wrteable transaction unless the system is in read-only mode. return UserTransaction
-
destroy
public void destroy()
Handle tidy up on container shutdown- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean
-
-