goldengate.common.file
Interface AuthInterface

All Known Implementing Classes:
FilesystemBasedAuthImpl, PassthroughBasedAuthImpl

public interface AuthInterface

Interface for Authentication

Author:
Frederic Bregier

Method Summary
 void clear()
          Clean object
 String getBaseDirectory()
          Return the mount point
 String getBusinessPath()
          Return the relative path for this account according to the Business (without true root of mount).
 String getRelativePath(String file)
          Return the relative path from a file (without mount point)
 SessionInterface getSession()
           
 String getUser()
           
 boolean isAdmin()
           
 boolean isBusinessPathValid(String newPath)
          Is the given complete relative Path valid from Authentication/Business point of view.
 boolean isIdentified()
          Is the current Authentication OK for full identification.
 NextCommandReply setPassword(String password)
           
 NextCommandReply setUser(String user)
           
 

Method Detail

getSession

SessionInterface getSession()
Returns:
the Ftp SessionInterface

setUser

NextCommandReply setUser(String user)
                         throws Reply421Exception,
                                Reply530Exception
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:
Reply421Exception - if there is a problem during the authentication
Reply530Exception - if there is a problem during the authentication

getUser

String getUser()
Returns:
the user

setPassword

NextCommandReply setPassword(String password)
                             throws Reply421Exception,
                                    Reply530Exception
Parameters:
password - the password to set
Returns:
(NOOP,230) if the Password is OK, else return the following command that must follow (usually ACCT) and the associated reply
Throws:
Reply421Exception - if there is a problem during the authentication
Reply530Exception - if there is a problem during the authentication

isIdentified

boolean isIdentified()
Is the current Authentication OK for full identification. It must be true after a correct sequence of identification: At most, it is true when setAccount is OK. It could be positive before (user name only, user+password only).
In the current implementation, as USER+PASS+ACCT are needed, it will be true only after a correct ACCT.

Returns:
True if the user has a positive login, else False

isAdmin

boolean isAdmin()
Returns:
True if the current authentication has an admin right (shutdown, bandwidth limitation)

isBusinessPathValid

boolean isBusinessPathValid(String newPath)
Is the given complete relative Path valid from Authentication/Business point of view.

Parameters:
newPath -
Returns:
True if it is Valid

getBusinessPath

String getBusinessPath()
Return the relative path for this account according to the Business (without true root of mount).

Returns:
Return the relative path for this account

getBaseDirectory

String getBaseDirectory()
Return the mount point

Returns:
the mount point

getRelativePath

String getRelativePath(String file)
Return the relative path from a file (without mount point)

Parameters:
file - (full path with mount point)
Returns:
the relative path from a file

clear

void clear()
Clean object



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