goldengate.ftp.exec.file
Class SimpleAuth

java.lang.Object
  extended by goldengate.ftp.exec.file.SimpleAuth

public class SimpleAuth
extends Object

Simple Authentication based on a previously load XML file.

Author:
Frederic Bregier

Field Summary
 String[] accounts
          Multiple accounts
 AbstractExecutor.CommandExecutor commandExecutor
           
 boolean isAdmin
          Is the current user an administrator (which can shutdown or change bandwidth limitation)
 String password
          Password
 String retrCmd
          Specific Retrieve command for this user
 long retrDelay
          Specific Retrieve command delay for this user
 String storCmd
          Specific Store command for this user
 long storDelay
          Specific Store command delay for this user
 String user
          User name
 
Constructor Summary
SimpleAuth(String user, String password, String[] accounts, String storCmd, long storDelay, String retrCmd, long retrDelay)
           
 
Method Summary
 boolean isAccountValid(String account)
          Is the given account a valid one
 boolean isPasswordValid(String newpassword)
          Is the given password a valid one
 void setAdmin(boolean isAdmin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

user

public String user
User name


password

public String password
Password


accounts

public String[] accounts
Multiple accounts


isAdmin

public boolean isAdmin
Is the current user an administrator (which can shutdown or change bandwidth limitation)


storCmd

public String storCmd
Specific Store command for this user


storDelay

public long storDelay
Specific Store command delay for this user


retrCmd

public String retrCmd
Specific Retrieve command for this user


retrDelay

public long retrDelay
Specific Retrieve command delay for this user


commandExecutor

public AbstractExecutor.CommandExecutor commandExecutor
Constructor Detail

SimpleAuth

public SimpleAuth(String user,
                  String password,
                  String[] accounts,
                  String storCmd,
                  long storDelay,
                  String retrCmd,
                  long retrDelay)
Parameters:
user -
password -
accounts -
storCmd -
storDelay -
retrCmd -
retrDelay -
Method Detail

isPasswordValid

public boolean isPasswordValid(String newpassword)
Is the given password a valid one

Parameters:
newpassword -
Returns:
True if the password is valid (or any password is valid)

isAccountValid

public boolean isAccountValid(String account)
Is the given account a valid one

Parameters:
account -
Returns:
True if the account is valid (or any account is valid)

setAdmin

public void setAdmin(boolean isAdmin)
Parameters:
isAdmin - True if the user should be an administrator


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