incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran...@apache.org
Subject cvs commit: incubator-ftpserver/src/java/org/apache/ftpserver SiteCommandHandler.java
Date Mon, 23 Jun 2003 16:38:43 GMT
rana_b      2003/06/23 09:38:43

  Modified:    src/java/org/apache/ftpserver SiteCommandHandler.java
  Log:
  used user attributes
  
  Revision  Changes    Path
  1.2       +16 -16    incubator-ftpserver/src/java/org/apache/ftpserver/SiteCommandHandler.java
  
  Index: SiteCommandHandler.java
  ===================================================================
  RCS file: /home/cvs/incubator-ftpserver/src/java/org/apache/ftpserver/SiteCommandHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SiteCommandHandler.java	31 Mar 2003 06:50:02 -0000	1.1
  +++ SiteCommandHandler.java	23 Jun 2003 16:38:43 -0000	1.2
  @@ -275,14 +275,14 @@
           sb.append('\n');
           User user = mConfig.getUserManager().getUserByName(args[1]);
           if(user != null) {
  -            sb.append("login : ").append(user.getName()).append('\n');
  -            sb.append("password : ").append("******").append('\n');
  -            sb.append("home : ").append(user.getVirtualDirectory().getRootDirectory()).append('\n');
  -            sb.append("writepermission : ").append(user.getVirtualDirectory().getWritePermission()).append('\n');
  -            sb.append("enable : ").append(user.getEnabled()).append('\n');
  -            sb.append("maxidletime : ").append(user.getMaxIdleTime()).append('\n');
  -            sb.append("maxuploadrate : ").append(user.getMaxUploadRate()).append('\n');
  -            sb.append("maxdownloadrate : ").append(user.getMaxDownloadRate()).append('\n');
  +            sb.append(User.ATTR_LOGIN).append(" : ").append(user.getName()).append('\n');
  +            sb.append(User.ATTR_PASSWORD).append(" : ").append("******").append('\n');
  +            sb.append(User.ATTR_HOME).append(" : ").append(user.getVirtualDirectory().getRootDirectory()).append('\n');
  +            sb.append(User.ATTR_WRITE_PERM).append(" : ").append(user.getVirtualDirectory().getWritePermission()).append('\n');
  +            sb.append(User.ATTR_ENABLE).append(" : ").append(user.getEnabled()).append('\n');
  +            sb.append(User.ATTR_MAX_IDLE_TIME).append(" : ").append(user.getMaxIdleTime()).append('\n');
  +            sb.append(User.ATTR_MAX_UPLOAD_RATE).append(" : ").append(user.getMaxUploadRate()).append('\n');
  +            sb.append(User.ATTR_MAX_DOWNLOAD_RATE).append(" : ").append(user.getMaxDownloadRate()).append('\n');
           }
           sb.append('\n');
           return mConfig.getStatus().processNewLine(sb.toString(), 200);
  @@ -372,25 +372,25 @@
               User user = mConfig.getUserManager().getUserByName(args[1]);
               if(user != null) {
   
  -                if("password".equals(args[2])) {
  +                if ( User.ATTR_PASSWORD.equals(args[2]) ) {
                       user.setPassword(args[3]);
                   }
  -                else if("home".equals(args[2])) {
  +                else if ( User.ATTR_HOME.equals(args[2]) ) {
                       user.getVirtualDirectory().setRootDirectory(args[3]);
                   }
  -                else if("writepermission".equals(args[2])) {
  +                else if ( User.ATTR_WRITE_PERM.equals(args[2]) ) {
                       user.getVirtualDirectory().setWritePermission("true".equals(args[3]));
                   }
  -                else if("enable".equals(args[2])) {
  +                else if ( User.ATTR_ENABLE.equals(args[2]) ) {
                       user.setEnabled("true".equals(args[3]));
                   }
  -                else if("maxidletime".equals(args[2])) {
  +                else if ( User.ATTR_MAX_IDLE_TIME.equals(args[2]) ) {
                       user.setMaxIdleTime(Integer.parseInt(args[3]));
                   }
  -                else if("maxuploadrate".equals(args[2])) {
  +                else if ( User.ATTR_MAX_UPLOAD_RATE.equals(args[2]) ) {
                       user.setMaxUploadRate(Integer.parseInt(args[3]));
                   }
  -                else if("maxdownloadrate".equals(args[2])) {
  +                else if ( User.ATTR_MAX_DOWNLOAD_RATE.equals(args[2]) ) {
                       user.setMaxDownloadRate(Integer.parseInt(args[3]));
                   }
                   else {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message