Class EssFileImpl

java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssFileImpl
All Implemented Interfaces:
EssFile, EssObject
Direct Known Subclasses:
EssFolderImpl

public class EssFileImpl extends AbstractEssObject implements EssFile
A file or folder in the Essbase server file hierarchy. If a folder, the isFolder() method will return true and the instance can be cast to an EssFolderImpl.
  • Field Details

    • fullPath

      protected final String fullPath
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: EssFile
      Returns the filename portion of the file.
      Specified by:
      getName in interface EssFile
      Specified by:
      getName in interface EssObject
      Returns:
      the filename
    • getType

      public EssObject.Type getType()
      Description copied from interface: EssObject
      Gets the type of this object.
      Specified by:
      getType in interface EssFile
      Specified by:
      getType in interface EssObject
      Returns:
      the object type
    • getFullPath

      public String getFullPath()
      Description copied from interface: EssFile
      Returns the full path of the file, i.e. the combination of its path and filename.
      Specified by:
      getFullPath in interface EssFile
      Returns:
      the full path of the file
    • getPath

      public String getPath()
      Description copied from interface: EssFile
      Convenience method to return the path to the file.
      Specified by:
      getPath in interface EssFile
      Returns:
      the path of this file
    • isFolder

      public boolean isFolder()
      Description copied from interface: EssFile
      Checks if this file object represents a file or a folder. If this method returns true, then this class may be cast to EssFolderImpl, which is a subclass of this one.
      Specified by:
      isFolder in interface EssFile
      Returns:
      true if this object represents a folder, false otherwise
    • isFile

      public boolean isFile()
      Description copied from interface: EssFile
      Returns true if this is a file, not a folder.
      Specified by:
      isFile in interface EssFile
      Returns:
      true if this object is a file
    • getServer

      public EssServer getServer()
      Description copied from interface: EssFile
      Returns the owning Essbase server instance for this file.
      Specified by:
      getServer in interface EssFile
      Returns:
      the Essbase server parent object
    • download

      public File download()
      Description copied from interface: EssFile
      Downloads this file to the current directory
      Specified by:
      download in interface EssFile
      Returns:
      a local file system reference to the downloaded file
    • downloadToFolder

      public File downloadToFolder(File folder)
      Description copied from interface: EssFile
      Downloads the file to a particular folder). TODO: check if folder and download there, if not, download as specific file
      Specified by:
      downloadToFolder in interface EssFile
      Parameters:
      folder - the folder
      Returns:
      a local filesystem reference to the created file
    • delete

      public void delete()
      Description copied from interface: EssFile
      Delete this file.
      Specified by:
      delete in interface EssFile
    • lcmImport

      @Deprecated public void lcmImport()
      Deprecated.
      Specified by:
      lcmImport in interface EssFile
    • copy

      public void copy(EssFilePathDetail body, Boolean overwrite)
      Description copied from interface: EssFile
      Copy a file from source to destination.
      Specified by:
      copy in interface EssFile
      Parameters:
      body - File path details.(required)
      overwrite - Overwrite existing file. (optional, default to false)
    • move

      public void move(EssFilePathDetail body, Boolean overwrite)
      Description copied from interface: EssFile
      Moves a file from source to destination. Moving a folder is not supported
      Specified by:
      move in interface EssFile
      Parameters:
      body - File path details.(required)
      overwrite - Overwrite existing file. Only applicable for moving a file. (optional, default to false)
    • rename

      public void rename(EssFilePathDetail body, Boolean overwrite)
      Description copied from interface: EssFile
      Renames a file or folder. Renaming a folder is supported only if the folder is not in the applications directory
      Specified by:
      rename in interface EssFile
      Parameters:
      body - File path details.(required)
      overwrite - Overwrite existing file. Only applicable for renaming a file. (optional, default to false)
    • extract

      public void extract(EssZipFileDetails body, Boolean overwrite)
      Description copied from interface: EssFile
      Extract a zip file on same location. Supported for applications, users, and shared folders.
      Specified by:
      extract in interface EssFile
      Parameters:
      body - File path details.(required)
      overwrite - Overwrite existing file. Not applicable for folder. (optional, default to false)