You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by ng...@apache.org on 2008/10/06 23:45:12 UTC
svn commit: r702282 - in /mina/ftpserver/trunk:
core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java
ftplet-api/src/main/java/org/apache/ftpserver/ftplet/UserManager.java pom.xml
Author: ngn
Date: Mon Oct 6 14:45:11 2008
New Revision: 702282
URL: http://svn.apache.org/viewvc?rev=702282&view=rev
Log:
Improved UserManager JavaDoc. Patch by Andrea Francia (FTPSERVER-181)
Modified:
mina/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java
mina/ftpserver/trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/UserManager.java
mina/ftpserver/trunk/pom.xml
Modified: mina/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java
URL: http://svn.apache.org/viewvc/mina/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java?rev=702282&r1=702281&r2=702282&view=diff
==============================================================================
--- mina/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java (original)
+++ mina/ftpserver/trunk/core/src/test/java/org/apache/ftpserver/usermanager/UserManagerTestTemplate.java Mon Oct 6 14:45:11 2008
@@ -47,6 +47,7 @@
*
* @see junit.framework.TestCase#setUp()
*/
+ @Override
protected void setUp() throws Exception {
userManager = createUserManager();
}
Modified: mina/ftpserver/trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/UserManager.java
URL: http://svn.apache.org/viewvc/mina/ftpserver/trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/UserManager.java?rev=702282&r1=702281&r2=702282&view=diff
==============================================================================
--- mina/ftpserver/trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/UserManager.java (original)
+++ mina/ftpserver/trunk/ftplet-api/src/main/java/org/apache/ftpserver/ftplet/UserManager.java Mon Oct 6 14:45:11 2008
@@ -29,48 +29,69 @@
/**
* Get user by name.
+ *
+ * @param username the name to search for.
+ * @throws FtpException when the UserManager can't fulfill the request.
+ * @return the user with the specified name, or null if a such user does
+ * not exist.
*/
- User getUserByName(String login) throws FtpException;
+ User getUserByName(String username) throws FtpException;
/**
* Get all user names in the system.
+ *
+ * @throws FtpException when the UserManager can't fulfill the request.
+ * @return an array of username strings, note that the result should never
+ * be null, if there is no users the result is an empty array.
*/
String[] getAllUserNames() throws FtpException;
/**
* Delete the user from the system.
- *
+ *
+ * @throws FtpException when the UserManager can't fulfill the request.
* @throws UnsupportedOperationException
* if UserManager in read-only mode
*/
- void delete(String login) throws FtpException;
+ void delete(String username) throws FtpException;
/**
* Save user. If a new user, create it else update the existing user.
- *
+ *
+ * @param user the Uset to save
+ * @throws FtpException when the UserManager can't fulfill the request.
* @throws UnsupportedOperationException
* if UserManager in read-only mode
*/
void save(User user) throws FtpException;
/**
- * User existance check.
+ * Check if the user exists.
+ * @param username the name of the user to check.
+ * @return true if the user exist, false otherwise.
*/
- boolean doesExist(String login) throws FtpException;
+ boolean doesExist(String username) throws FtpException;
/**
* Authenticate user
+ * @throws FtpException when the UserManager can't fulfill the request.
+ * @param authentication
+ * @return the autheticated account.
*/
User authenticate(Authentication authentication)
throws AuthenticationFailedException;
/**
* Get admin user name
+ * @return the admin user name
+ * @throws FtpException when the UserManager can't fulfill the request.
*/
String getAdminName() throws FtpException;
/**
+ * Check if the user is admin.
* @return true if user with this login is administrator
+ * @throws FtpException when the UserManager can't fulfill the request.
*/
- boolean isAdmin(String login) throws FtpException;
+ boolean isAdmin(String username) throws FtpException;
}
Modified: mina/ftpserver/trunk/pom.xml
URL: http://svn.apache.org/viewvc/mina/ftpserver/trunk/pom.xml?rev=702282&r1=702281&r2=702282&view=diff
==============================================================================
--- mina/ftpserver/trunk/pom.xml (original)
+++ mina/ftpserver/trunk/pom.xml Mon Oct 6 14:45:11 2008
@@ -120,6 +120,10 @@
<contributor>
<name>Nick Vincent</name>
</contributor>
+ <contributor>
+ <name>Andrea Francia</name>
+ <url>http://andreafrancia.blogspot.com</url>
+ </contributor>
</contributors>
<scm>