org.apache.ftpserver.usermanager
Class BaseUser

java.lang.Object
  extended by org.apache.ftpserver.usermanager.BaseUser
All Implemented Interfaces:
java.io.Serializable, User

public class BaseUser
extends java.lang.Object
implements User, java.io.Serializable

Generic user class. The user attributes are:

See Also:
Serialized Form

Constructor Summary
BaseUser()
          Default constructor.
BaseUser(User user)
          Copy constructor.
 
Method Summary
 AuthorizationRequest authorize(AuthorizationRequest request)
          
 Authority[] getAuthorities()
           
 Authority[] getAuthorities(java.lang.Class<? extends Authority> clazz)
          
 boolean getEnabled()
          Get the user enable status.
 java.lang.String getHomeDirectory()
          Get the user home directory.
 int getMaxIdleTime()
          Get the maximum idle time in second.
 java.lang.String getName()
          Get the user name.
 java.lang.String getPassword()
          Get the user password.
 void setAuthorities(Authority[] authorities)
           
 void setEnabled(boolean enb)
          Set the user enable status.
 void setHomeDirectory(java.lang.String home)
          Set the user home directory.
 void setMaxIdleTime(int idleSec)
          Set the maximum idle time in second.
 void setName(java.lang.String name)
          Set user name.
 void setPassword(java.lang.String pass)
          Set user password.
 java.lang.String toString()
          String representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseUser

public BaseUser()
Default constructor.


BaseUser

public BaseUser(User user)
Copy constructor.

Method Detail

getName

public java.lang.String getName()
Get the user name.

Specified by:
getName in interface User

setName

public void setName(java.lang.String name)
Set user name.


getPassword

public java.lang.String getPassword()
Get the user password.

Specified by:
getPassword in interface User

setPassword

public void setPassword(java.lang.String pass)
Set user password.


getAuthorities

public Authority[] getAuthorities()
Specified by:
getAuthorities in interface User

setAuthorities

public void setAuthorities(Authority[] authorities)

getMaxIdleTime

public int getMaxIdleTime()
Get the maximum idle time in second.

Specified by:
getMaxIdleTime in interface User

setMaxIdleTime

public void setMaxIdleTime(int idleSec)
Set the maximum idle time in second.


getEnabled

public boolean getEnabled()
Get the user enable status.

Specified by:
getEnabled in interface User

setEnabled

public void setEnabled(boolean enb)
Set the user enable status.


getHomeDirectory

public java.lang.String getHomeDirectory()
Get the user home directory.

Specified by:
getHomeDirectory in interface User

setHomeDirectory

public void setHomeDirectory(java.lang.String home)
Set the user home directory.


toString

public java.lang.String toString()
String representation.

Overrides:
toString in class java.lang.Object

authorize

public AuthorizationRequest authorize(AuthorizationRequest request)

Specified by:
authorize in interface User

getAuthorities

public Authority[] getAuthorities(java.lang.Class<? extends Authority> clazz)

Specified by:
getAuthorities in interface User


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.