Class FTPUtil

java.lang.Object
org.alfresco.ftp.dsl.FTPUtil

public class FTPUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    FTPUtil(FTPWrapper ftpWrapper)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Verify if a file or folder exists in FTP
    List<org.alfresco.utility.model.ContentModel>
    Get a list of contents (file and folders) from current location
    getContent(String filePath)
    Return the content of <filPath though FTP protocol
    List<org.alfresco.utility.model.FileModel>
    Get a list of files from current location
    int
    Get file size.
    List<org.alfresco.utility.model.FolderModel>
    Get a list of folders from current location
    protected int
     
    protected boolean
    isContentInList(org.alfresco.utility.model.ContentModel contentModel, List<org.alfresco.utility.model.ContentModel> contents)
     
    protected boolean
    isFileInList(org.alfresco.utility.model.FileModel fileModel, List<org.alfresco.utility.model.FileModel> files)
     
    protected boolean
    isFolderInList(org.alfresco.utility.model.FolderModel folderModel, List<org.alfresco.utility.model.FolderModel> folders)
     
    setNewFile(org.alfresco.utility.model.FileModel fileModel)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getContent

      public String getContent(String filePath) throws IOException
      Return the content of <filPath though FTP protocol
      Parameters:
      filePath -
      Returns:
      Throws:
      IOException
    • contentExists

      public boolean contentExists() throws Exception
      Verify if a file or folder exists in FTP
      Returns:
      Throws:
      Exception
    • isFolderInList

      protected boolean isFolderInList(org.alfresco.utility.model.FolderModel folderModel, List<org.alfresco.utility.model.FolderModel> folders)
    • isFileInList

      protected boolean isFileInList(org.alfresco.utility.model.FileModel fileModel, List<org.alfresco.utility.model.FileModel> files)
    • isContentInList

      protected boolean isContentInList(org.alfresco.utility.model.ContentModel contentModel, List<org.alfresco.utility.model.ContentModel> contents)
    • getFolders

      public List<org.alfresco.utility.model.FolderModel> getFolders() throws Exception
      Get a list of folders from current location
      Returns:
      List
      Throws:
      Exception
    • getFiles

      public List<org.alfresco.utility.model.FileModel> getFiles() throws Exception
      Get a list of files from current location
      Returns:
      List
      Throws:
      Exception
    • getChildren

      public List<org.alfresco.utility.model.ContentModel> getChildren() throws Exception
      Get a list of contents (file and folders) from current location
      Returns:
      List
      Throws:
      Exception
    • setNewFile

      public File setNewFile(org.alfresco.utility.model.FileModel fileModel) throws Exception
      Throws:
      Exception
    • getFileSize

      public int getFileSize() throws Exception
      Get file size. Return 0 if resource is a folder
      Returns:
      file size
      Throws:
      Exception
    • getReplyCode

      protected int getReplyCode()