org.apache.ftpserver.ftplet
Interface User


public interface User

Basic user interface.

Author:
Apache MINA Project

Method Summary
 AuthorizationRequest authorize(AuthorizationRequest request)
          Authorize a AuthorizationRequest for this user
 java.util.List<Authority> getAuthorities()
          Get all authorities granted to this user
 java.util.List<Authority> getAuthorities(java.lang.Class<? extends Authority> clazz)
          Get authorities of the specified type granted to this user
 boolean getEnabled()
          Get the user enable status.
 java.lang.String getHomeDirectory()
          Get the user home directory
 int getMaxIdleTime()
          Get the maximum idle time in seconds.
 java.lang.String getName()
          Get the user name.
 java.lang.String getPassword()
          Get password.
 

Method Detail

getName

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

Returns:
The user name, the same used for login

getPassword

java.lang.String getPassword()
Get password.

Returns:
The users password or null if the user manager can not provide the password

getAuthorities

java.util.List<Authority> getAuthorities()
Get all authorities granted to this user

Returns:
All authorities

getAuthorities

java.util.List<Authority> getAuthorities(java.lang.Class<? extends Authority> clazz)
Get authorities of the specified type granted to this user

Parameters:
clazz - The type of Authority
Returns:
Authorities of the specified class

authorize

AuthorizationRequest authorize(AuthorizationRequest request)
Authorize a AuthorizationRequest for this user

Parameters:
request - The AuthorizationRequest to authorize
Returns:
A populated AuthorizationRequest if the user was authorized, null otherwise.

getMaxIdleTime

int getMaxIdleTime()
Get the maximum idle time in seconds. Zero or less idle time means no limit.

Returns:
The idle time in seconds

getEnabled

boolean getEnabled()
Get the user enable status.

Returns:
true if the user is enabled

getHomeDirectory

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

Returns:
The path to the home directory for the user


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