goldengate.ftp.exec.file
Class FileBasedAuth

java.lang.Object
  extended by goldengate.common.file.filesystembased.FilesystemBasedAuthImpl
      extended by goldengate.ftp.filesystembased.FilesystemBasedFtpAuth
          extended by goldengate.ftp.exec.file.FileBasedAuth
All Implemented Interfaces:
goldengate.common.file.AuthInterface, goldengate.ftp.core.file.FtpAuth

public class FileBasedAuth
extends goldengate.ftp.filesystembased.FilesystemBasedFtpAuth

FtpAuth implementation based on a list of (user/password/account) stored in a xml file load at startup from configuration.

Author:
Frederic Bregier

Field Summary
 
Fields inherited from class goldengate.ftp.filesystembased.FilesystemBasedFtpAuth
account
 
Fields inherited from class goldengate.common.file.filesystembased.FilesystemBasedAuthImpl
isIdentified, password, rootFromAuth, session, user
 
Constructor Summary
FileBasedAuth(goldengate.ftp.core.session.FtpSession session)
           
 
Method Summary
protected  void businessClean()
           
 AbstractExecutor.CommandExecutor getCommandExecutor()
           
 long getSpecialId()
           
 boolean isAdmin()
           
 boolean isBusinessPathValid(String newPath)
           
protected  goldengate.common.command.NextCommandReply setBusinessAccount(String account)
          Set the account according to any implementation and could set the rootFromAuth.
protected  goldengate.common.command.NextCommandReply setBusinessPassword(String password)
          Set the password according to any implementation and could set the rootFromAuth.
protected  String setBusinessRootFromAuth()
           
protected  goldengate.common.command.NextCommandReply setBusinessUser(String user)
           
 void setSpecialId(long specialId)
           
 void specialNoSessionAuth(String hostid)
          Special Authentication for local execution
 
Methods inherited from class goldengate.ftp.filesystembased.FilesystemBasedFtpAuth
clear, getAccount, getBaseDirectory, setAccount
 
Methods inherited from class goldengate.common.file.filesystembased.FilesystemBasedAuthImpl
getAbsolutePath, getBusinessPath, getRelativePath, getSession, getUser, isIdentified, setIsIdentified, setPassword, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface goldengate.common.file.AuthInterface
getBusinessPath, getRelativePath, getSession, getUser, isIdentified, setPassword, setUser
 

Constructor Detail

FileBasedAuth

public FileBasedAuth(goldengate.ftp.core.session.FtpSession session)
Parameters:
session -
Method Detail

businessClean

protected void businessClean()
Specified by:
businessClean in class goldengate.common.file.filesystembased.FilesystemBasedAuthImpl

setBusinessUser

protected goldengate.common.command.NextCommandReply setBusinessUser(String user)
                                                              throws goldengate.common.command.exception.Reply421Exception,
                                                                     goldengate.common.command.exception.Reply530Exception
Specified by:
setBusinessUser in class goldengate.common.file.filesystembased.FilesystemBasedAuthImpl
Parameters:
user - the user to set
Returns:
(NOOP,230) if the user is OK, else return the following command that must follow (usually PASS) and the associated reply
Throws:
goldengate.common.command.exception.Reply421Exception - if there is a problem during the authentication
goldengate.common.command.exception.Reply530Exception - if there is a problem during the authentication

setBusinessPassword

protected goldengate.common.command.NextCommandReply setBusinessPassword(String password)
                                                                  throws goldengate.common.command.exception.Reply421Exception,
                                                                         goldengate.common.command.exception.Reply530Exception
Set the password according to any implementation and could set the rootFromAuth. If NOOP is returned, isIdentifed must be TRUE. A special case is implemented for test user.

Specified by:
setBusinessPassword in class goldengate.common.file.filesystembased.FilesystemBasedAuthImpl
Parameters:
password -
Returns:
(NOOP,230) if the Password is OK, else return the following command that must follow (usually ACCT) and the associated reply
Throws:
goldengate.common.command.exception.Reply421Exception - if there is a problem during the authentication
goldengate.common.command.exception.Reply530Exception - if there is a problem during the authentication

setBusinessAccount

protected goldengate.common.command.NextCommandReply setBusinessAccount(String account)
                                                                 throws goldengate.common.command.exception.Reply421Exception,
                                                                        goldengate.common.command.exception.Reply530Exception
Set the account according to any implementation and could set the rootFromAuth. If NOOP is returned, isIdentifed must be TRUE.

Specified by:
setBusinessAccount in class goldengate.ftp.filesystembased.FilesystemBasedFtpAuth
Parameters:
account -
Returns:
(NOOP,230) if the Account is OK, else return the following command that must follow and the associated reply
Throws:
goldengate.common.command.exception.Reply421Exception - if there is a problem during the authentication
goldengate.common.command.exception.Reply530Exception - if there is a problem during the authentication

isBusinessPathValid

public boolean isBusinessPathValid(String newPath)

setBusinessRootFromAuth

protected String setBusinessRootFromAuth()
                                  throws goldengate.common.command.exception.Reply421Exception
Specified by:
setBusinessRootFromAuth in class goldengate.common.file.filesystembased.FilesystemBasedAuthImpl
Throws:
goldengate.common.command.exception.Reply421Exception

isAdmin

public boolean isAdmin()

specialNoSessionAuth

public void specialNoSessionAuth(String hostid)
Special Authentication for local execution

Parameters:
hostid -

getSpecialId

public long getSpecialId()
Returns:
the specialId

setSpecialId

public void setSpecialId(long specialId)
Parameters:
specialId - the specialId to set

getCommandExecutor

public AbstractExecutor.CommandExecutor getCommandExecutor()
Returns:
the associated Command Executor


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.