Package com.appliedolap.essbase.impl
Class EssFileImpl
java.lang.Object
com.appliedolap.essbase.AbstractEssObject
com.appliedolap.essbase.impl.EssFileImpl
- Direct Known Subclasses:
EssFolderImpl
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.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.appliedolap.essbase.EssObject
EssObject.Type -
Field Summary
FieldsFields inherited from class com.appliedolap.essbase.AbstractEssObject
api -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy(EssFilePathDetail body, Boolean overwrite) Copy a file from source to destination.voiddelete()Delete this file.download()Downloads this file to the current directorydownloadTo(File file) Downloads this file to exactly the given path, whatever it is called on the server.downloadToFolder(File folder) Downloads the file to a particular folder).voidextract(EssZipFileDetails body, Boolean overwrite) Extract a zip file on same location.Answers with a plain string rather than a list - "Sample.Basic" or several comma separated - so it is split here.Returns the full path of the file, i.e. the combination of its path and filename.getName()Returns the filename portion of the file.getPath()Convenience method to return the path to the file.Returns the owning Essbase server instance for this file.getType()Gets the type of this object.booleanisFile()Returns true if this is a file, not a folder.booleanisFolder()Checks if this file object represents a file or a folder.lcmImport(boolean overwrite) Deprecated.voidmove(EssFilePathDetail body, Boolean overwrite) Moves a file from source to destination.voidrename(EssFilePathDetail body, Boolean overwrite) Renames a file or folder.
-
Field Details
-
fullPath
-
-
Constructor Details
-
EssFileImpl
-
-
Method Details
-
getName
Description copied from interface:EssFileReturns the filename portion of the file. -
getType
Description copied from interface:EssObjectGets the type of this object. -
getFullPath
Description copied from interface:EssFileReturns the full path of the file, i.e. the combination of its path and filename.- Specified by:
getFullPathin interfaceEssFile- Returns:
- the full path of the file
-
getPath
Description copied from interface:EssFileConvenience method to return the path to the file. -
isFolder
public boolean isFolder()Description copied from interface:EssFileChecks if this file object represents a file or a folder. If this method returnstrue, then this class may be cast toEssFolderImpl, which is a subclass of this one. -
isFile
public boolean isFile()Description copied from interface:EssFileReturns true if this is a file, not a folder. -
getServer
Description copied from interface:EssFileReturns the owning Essbase server instance for this file. -
download
Description copied from interface:EssFileDownloads this file to the current directory -
downloadToFolder
Description copied from interface:EssFileDownloads the file to a particular folder). TODO: check if folder and download there, if not, download as specific file- Specified by:
downloadToFolderin interfaceEssFile- Parameters:
folder- the folder- Returns:
- a local filesystem reference to the created file
-
downloadTo
Description copied from interface:EssFileDownloads this file to exactly the given path, whatever it is called on the server.Distinct from
EssFile.downloadToFolder(File), which keeps the server's name. Worth having because the server's name is often not the one a person wants: a cube's exported workbook isBasic.xlsxin every application, so five of them in a downloads folder are five files called Basic.- Specified by:
downloadToin interfaceEssFile- Parameters:
file- where to write, created or overwritten- Returns:
- the file written
-
delete
public void delete()Description copied from interface:EssFileDelete this file. -
lcmImport
Deprecated.Description copied from interface:EssFileRestores this LCM zip, as a job.Replaces a version that submitted the job, threw the returned record away, and caught its own failure with
printStackTrace- so an import that never ran looked exactly like one that worked, and there was nothing to poll either way. The job comes back so a caller canEssJob.waitForCompletion()and ask whether it succeeded. -
getDatabasesInLcmZip
Answers with a plain string rather than a list - "Sample.Basic" or several comma separated - so it is split here. Nothing in the specification says which, onlytype: string.- Specified by:
getDatabasesInLcmZipin interfaceEssFile- Returns:
- the cube names in the zip - bare names such as
Basic, without the application
-
copy
Description copied from interface:EssFileCopy a file from source to destination. -
move
Description copied from interface:EssFileMoves a file from source to destination. Moving a folder is not supported -
rename
Description copied from interface:EssFileRenames a file or folder. Renaming a folder is supported only if the folder is not in the applications directory -
extract
Description copied from interface:EssFileExtract a zip file on same location. Supported for applications, users, and shared folders.
-