Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (C) 2009 eXo Platform SAS.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
   * the License, or (at your option) any later version.
   *
   * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.exoplatform.services.ftp.config;
 
Created by The eXo Platform SAS Author : Vitaly Guly <gavrik-vetal@ukr.net/mail.ru>.

Version:
$Id: $
 
 public class FtpConfigImpl implements FtpConfig
 {
 
    private static Log log = ExoLogger.getLogger(. + "FtpConfigImpl");

   
"command-port".
 
    public static final String INIT_PARAM_COMMAND_PORT = "command-port";

   
"data-min-port".
 
    public static final String INIT_PARAM_DATA_MIN_PORT = "data-min-port";

   
"data-max-port".
 
    public static final String INIT_PARAM_DATA_MAX_PORT = "data-max-port";

   
"system".
 
    public static final String INIT_PARAM_SYSTEM = "system";

   
"client-side-encoding".
 
    public static final String INIT_PARAM_CLIENT_SIDE_ENCODING = "client-side-encoding";

   
"def-folder-node-type".
 
    public static final String INIT_PARAM_DEF_FOLDER_NODE_TYPE = "def-folder-node-type";

   
"def-file-node-type".
 
    public static final String INIT_PARAM_DEF_FILE_NODE_TYPE = "def-file-node-type";

   
"def-file-mime-type".
 
    public static final String INIT_PARAM_DEF_FILE_MIME_TYPE = "def-file-mime-type";

   
"cache-folder-name".
 
    public static final String INIT_PARAM_CACHE_FOLDER_NAME = "cache-folder-name";

   
"upload-speed-limit".
 
    public static final String INIT_PARAM_UPLOAD_SPEED_LIMIT = "upload-speed-limit";

   
"download-speed-limit".
 
    public static final String INIT_PARAM_DOWNLOAD_SPEED_LIMIT = "download-speed-limit";
   
   
replace-forbidden-chars
 
    public static final String INIT_PARAM_REPLACE_FORBIDDEN_CHARS = "replace-forbidden-chars";
   
   
forbidden-chars
   public static final String INIT_PARAM_FORBIDDEN_CHARS      = "forbidden-chars"
   
   
replace-char
   public static final String INIT_PARAM_REPLACE_CHAR         = "replace-char";

   
"timeout".
   public static final String INIT_PARAM_TIME_OUT = "timeout";
   
   
According JCR specification JSR-170 . See 4.6 Path Syntax: Any Unicode character except: '/', ':', '[', ']', '*', ''', '"', '|'
   public static final String DEFAULT_JCR_FORBIDDEN_CHARS     = ":[]*'\"|"
      
   
The all forbidden chars will replaced '_' by default.
   public static final char DEFAULT_REPLACE_CHAR              = '_';
     
   
The replace forbidden chars is enable by default.
   public static final boolean DEFAULT_REPLACE_FORBIDDEN_CHARS = true;
   
   
Forbidden chars.
   public String              _forbiddenChars                 = ;
   
   
Replace char.
   public char                _replaceChar                    = ;
   
   
Replace forbidden chars.
   public boolean             _replaceForbiddenChars          = ;

   
Command port.
   private int _commandPort = 21;

   
Data min port.
   private int _dataMinPort = 7000;

   
Data max port.
   private int _dataMaxPort = 7100;

   
System type.
   private String _system = "Windows_NT";

   
Client side encoding.
   private String _clientSideEncoding = "";

   
Default folder node type.
Default file node type.
Default file mimetype.
   private String _defFileMimeType = "application/zip";

   
Cache folder name.
   private String _cacheFolderName = "";

   
Is need slow upload.
   private boolean _needSlowUpLoad = false;

   
Upload speed.
   private int _upLoadSpeed = 0;

   
Is need slow download.
   private boolean _needSlowDownLoad = false;

   
Download speed.
   private int _downLoadSpeed = 0;

   
Is need timeout.
   private boolean _needTimeOut = false;

   
Timeout value.
   private int _timeOutValue = 0;

   
Is enable trace.
   protected boolean ENABLE_TRACE = true;

   
Portal Container.
   protected PortalContainer  _portalContainer;

   
Constructor.

Parameters:
InitParams
   public FtpConfigImpl(ExoContainerContext contextInitParams params)
   {
      ValueParam pCommandPort = params.getValueParam();
      if (pCommandPort != null)
      {
          = new Integer(pCommandPort.getValue());
      }
      ValueParam pDataMinPort = params.getValueParam();
      if (pDataMinPort != null)
      {
          = new Integer(pDataMinPort.getValue());
      }
      ValueParam pDataMaxPort = params.getValueParam();
      if (pDataMaxPort != null)
      {
          = new Integer(pDataMaxPort.getValue());
      }
      ValueParam pSystem = params.getValueParam();
      if (pSystem != null)
      {
          = pSystem.getValue();
      }
      ValueParam pClientSideEncoding = params.getValueParam();
      if (pClientSideEncoding != null)
      {
          = pClientSideEncoding.getValue();
      }
      ValueParam pFolderNodeType = params.getValueParam();
      if (pFolderNodeType != null)
      {
          = pFolderNodeType.getValue();
      }
      ValueParam pFileNodeType = params.getValueParam();
      if (pFileNodeType != null)
      {
          = pFileNodeType.getValue();
      }
      ValueParam pFileMimeType = params.getValueParam();
      if (pFileMimeType != null)
      {
          = pFileMimeType.getValue();
      }
      ValueParam pCacheFolderName = params.getValueParam();
      if (pCacheFolderName != null)
      {
          = pCacheFolderName.getValue();
      }
      ValueParam pSlowUpLoad = params.getValueParam();
      if (pSlowUpLoad != null)
      {
          = true;
          = new Integer(pSlowUpLoad.getValue());
      }
      ValueParam pSlowDownLoad = params.getValueParam();
      if (pSlowDownLoad != null)
      {
          = true;
          = new Integer(pSlowDownLoad.getValue());
      }
      ValueParam pTimeOut = params.getValueParam();
      if (pTimeOut != null)
      {
          = true;
          = new Integer(pTimeOut.getValue());
      }
      
      ValueParam pReplaceForbiddenChars = params.getValueParam();
      if (pReplaceForbiddenChars != null)
      {
          = new Boolean(pReplaceForbiddenChars.getValue());
      }
      ValueParam pForbiddenChars = params.getValueParam();
      if (pForbiddenChars != null)
      {
          = pForbiddenChars.getValue();
      }
      ValueParam pReplaceChar = params.getValueParam();
      if (pReplaceChar != null)
      {
          = pReplaceChar.getValue().charAt(0);
      }
      ExoContainer container = context.getContainer();
      if (container instanceof PortalContainer)
      {
          = ((PortalContainer)container);
      }
      if (.isDebugEnabled())
      {
         .debug( + " = " + );
         .debug( + " = " + );
         .debug( + " = " + );
         .debug( + " = " + );
         .debug( + " = " + );
         .debug( + " = " + );
         .debug( + " = " + );
         .debug( + " = " + );
         if ()
         {
            .debug( + ".value = " + );
         }
         if ()
         {
            .debug( + ".value = " + );
         }
         .info( + " = " + );
         if ()
         {
            .debug( + ".value = " + );
         }
         
         .debug( + " = " + );
         .debug( + " = " + );
      }
   }
   public int getCommandPort()
   {
      return ;
   }
   public int getDataMinPort()
   {
      return ;
   }
   public int getDataMaxPort()
   {
      return ;
   }
   public String getSystemType()
   {
      return ;
   }
   {
      return ;
   }
   {
      return ;
   }
   public String getDefFileNodeType()
   {
      return ;
   }
   public String getDefFileMimeType()
   {
      return ;
   }
   public String getCacheFolderName()
   {
      return ;
   }
   public boolean isNeedSlowUpLoad()
   {
      return ;
   }
   public int getUpLoadSpeed()
   {
      return ;
   }
   public boolean isNeedSlowDownLoad()
   {
      return ;
   }
   public int getDownLoadSpeed()
   {
      return ;
   }
   public boolean isNeedTimeOut()
   {
      return ;
   }
   public int getTimeOut()
   {
      return ;
   }
   {
      return ;
   }
   
   public String getForbiddenChars()
   {
     return ;
   }
    
   public char getReplaceChar()
   {
     return ;
   }
    
   public boolean isReplaceForbiddenChars()
   {
     return ;
   }
New to GrepCode? Check out our FAQ X