Class FileSpec

All Implemented Interfaces:
HasHandlers

public class FileSpec extends DataClass
A record which specifies files for use with FileSource Operations.
See Also:
  • Constructor Details

    • FileSpec

      public FileSpec()
    • FileSpec

      public FileSpec(JavaScriptObject jsObj)
    • FileSpec

      public FileSpec(String fileName, String fileType, String fileFormat)
    • FileSpec

      public FileSpec(String path)
      Constructs a FileSpec from a path. For instance, "employees.ds.xml" would be converted to {fileName: "employees", fileType: "ds", fileFormat: "xml"}.
      Parameters:
      path - The path to convert.
  • Method Details

    • getOrCreateRef

      public static FileSpec getOrCreateRef(JavaScriptObject jsObj)
    • setFileFormat

      public FileSpec setFileFormat(String fileFormat)
      The format of the file, e.g. "xml" or "js"
      Parameters:
      fileFormat - New fileFormat value. Default value is null
      Returns:
      FileSpec instance, for chaining setter calls
    • getFileFormat

      public String getFileFormat()
      The format of the file, e.g. "xml" or "js"
      Returns:
      Current fileFormat value. Default value is null
    • setFileName

      public FileSpec setFileName(String fileName)
      The name of the file, without any extension to indicate type or format.
      Parameters:
      fileName - New fileName value. Default value is null
      Returns:
      FileSpec instance, for chaining setter calls
    • getFileName

      public String getFileName()
      The name of the file, without any extension to indicate type or format.
      Returns:
      Current fileName value. Default value is null
    • setFileType

      public FileSpec setFileType(String fileType)
      The type of the file, e.g. "ds" for datasource, or "proj" for project.
      Parameters:
      fileType - New fileType value. Default value is null
      Returns:
      FileSpec instance, for chaining setter calls
    • getFileType

      public String getFileType()
      The type of the file, e.g. "ds" for datasource, or "proj" for project.
      Returns:
      Current fileType value. Default value is null
    • parsePath

      protected static JavaScriptObject parsePath(String path)