com.isomorphic.datasource

## Class DSFileSpec

- java.lang.Object
- - com.isomorphic.datasource.DSFileSpec

-     public class DSFileSpec
      extends java.lang.Object

  Specifies a file stored in a DataSource.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DSFileSpec(java.util.Map record)` Specify a file from a Map specifying one or more of fileName, fileType and fileFormat.
    `DSFileSpec(java.lang.String url)` Construct a DSFileSpec from a URL-like string.
    `DSFileSpec(java.lang.String url, DSRequest request)` Construct a DSFileSpec from a URL-like string.
    `DSFileSpec(java.lang.String dsName, java.util.Map record)` Specify a file from a dsName and a Map specifying one or more of fileName, fileType and fileFormat.
    `DSFileSpec(java.lang.String dsName, java.util.Map record, DSRequest request)` Specify a file from a dsName and a Map specifying one or more of fileName, fileType and fileFormat.
    `DSFileSpec(java.lang.String dsName, java.lang.String dsFileName)` Specify a file with the given DataSource name and filename, without specifying a fileType or fileFormat.
    `DSFileSpec(java.lang.String dsName, java.lang.String dsFileName, java.lang.String dsFileType)` Specify a file with the given DataSource name, filename, and fileType, without specifying a fileFormat.
    `DSFileSpec(java.lang.String dsName, java.lang.String dsFileName, java.lang.String dsFileType, java.lang.String dsFileFormat)` Specify a file with the given DataSource name, filename, fileType, and fileFormat.
    `DSFileSpec(java.lang.String dsName, java.lang.String dsFileName, java.lang.String dsFileType, java.lang.String dsFileFormat, DSRequest request)` Specify a file with the given DataSource name, filename, fileType, fileFormat and requestContext.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getDataSourceName()`
    `java.lang.String` | `getFileFormat()`
    `java.lang.String` | `getFileName()`
    `java.lang.String` | `getFileType()`
    `java.lang.String` | `getOwnerId()`
    `DSRequest` | `getRequestContext()`
    `void` | `setDataSourceName(java.lang.String name)`
    `void` | `setFileFormat(java.lang.String format)`
    `void` | `setFileName(java.lang.String name)`
    `void` | `setFileType(java.lang.String type)`
    `void` | `setOwnerId(java.lang.String ownerId)`
    `void` | `setRequestContext(DSRequest context)`

- - ### Constructor Detail

    - #### DSFileSpec

          public DSFileSpec(java.lang.String dsName,
                            java.lang.String dsFileName)

      Specify a file with the given DataSource name and filename, without specifying a fileType or fileFormat.
      Parameters:
        `dsName` - The name of the DataSource
        `dsFileName` - The name of the file, without any extension for type or format

    - #### DSFileSpec

          public DSFileSpec(java.lang.String dsName,
                            java.lang.String dsFileName,
                            java.lang.String dsFileType)

      Specify a file with the given DataSource name, filename, and fileType, without specifying a fileFormat.
      Parameters:
        `dsName` - The name of the DataSource
        `dsFileName` - The name of the file, without any extension for type or format
        `dsFileType` - The fileType (e.g. "ds" for datasource)

    - #### DSFileSpec

          public DSFileSpec(java.lang.String dsName,
                            java.lang.String dsFileName,
                            java.lang.String dsFileType,
                            java.lang.String dsFileFormat)

      Specify a file with the given DataSource name, filename, fileType, and fileFormat.
      Parameters:
        `dsName` - The name of the DataSource
        `dsFileName` - The name of the file, without any extension for type or format
        `dsFileType` - The fileType (e.g. "ds" for datasource)
        `dsFileFormat` - The fileFormat (e.g. "xml" or "js")

    - #### DSFileSpec

          public DSFileSpec(java.lang.String dsName,
                            java.lang.String dsFileName,
                            java.lang.String dsFileType,
                            java.lang.String dsFileFormat,
                            DSRequest request)

      Specify a file with the given DataSource name, filename, fileType, fileFormat and requestContext.
      Parameters:
        `dsName` - The name of the DataSource
        `dsFileName` - The name of the file, without any extension for type or format
        `dsFileType` - The fileType (e.g. "ds" for datasource)
        `dsFileFormat` - The fileFormat (e.g. "xml" or "js")
        `request` - The DSRequest which provides security context for this DSFileSpec.

    - #### DSFileSpec

          public DSFileSpec(java.util.Map record)

      Specify a file from a Map specifying one or more of fileName, fileType and fileFormat.
      Parameters:
        `record` - A Map specifying one or more of fileName, fileType and fileFormat.

    - #### DSFileSpec

          public DSFileSpec(java.lang.String dsName,
                            java.util.Map record)

      Specify a file from a dsName and a Map specifying one or more of fileName, fileType and fileFormat.
      Parameters:
        `dsName` - The name of the DataSource
        `record` - A Map specifying one or more of fileName, fileType and fileFormat.

    - #### DSFileSpec

          public DSFileSpec(java.lang.String dsName,
                            java.util.Map record,
                            DSRequest request)

      Specify a file from a dsName and a Map specifying one or more of fileName, fileType and fileFormat.
      Parameters:
        `dsName` - The name of the DataSource
        `record` - A Map specifying one or more of fileName, fileType and fileFormat.
        `request` - The DSRequest which provides security context for this DSFileSpec.

    - #### DSFileSpec

          public DSFileSpec(java.lang.String url)

      Construct a DSFileSpec from a URL-like string.
      Parameters:
        `url` - URL-like specification for the file.

        To specify both the dsName and the filename, use a URL that looks like ds://datasourceName/fileName.type.format -- e.g. "ds://projects/bigProject.proj.xml"). Note that the fileType and fileFormat should not have any spaces.

        If you want a DSFileSpec that only parses the filename, then just specify the filename, like this "fileName.type.format".

    - #### DSFileSpec

          public DSFileSpec(java.lang.String url,
                            DSRequest request)

      Construct a DSFileSpec from a URL-like string.
      Parameters:
        `url` - URL-like specification for the file.
        `request` - The DSRequest which provides security context for this DSFileSpec.

        To specify both the dsName and the filename, use a URL that looks like ds://datasourceName/fileName.type.format -- e.g. "ds://projects/bigProject.proj.xml"). Note that the fileType and fileFormat should not have any spaces.

        If you want a DSFileSpec that only parses the filename, then just specify the filename, like this "fileName.type.format".

  - ### Method Detail

    - #### getDataSourceName

          public java.lang.String getDataSourceName()

      Returns:
        The name of the `DataSource` in which to find the file

    - #### setDataSourceName

          public void setDataSourceName(java.lang.String name)

      Parameters:
        `name` - The name of the `DataSource` in which to find the file

    - #### getRequestContext

          public DSRequest getRequestContext()

      Returns:
        The request which should be consulted for security context when using this DSFileSpec.

    - #### setRequestContext

          public void setRequestContext(DSRequest context)

      Parameters:
        `context` - The DSRequest which provides security context for this DSFileSpec.

    - #### getFileName

          public java.lang.String getFileName()

      Returns:
        The fileName, without any extension for type or format.

    - #### setFileName

          public void setFileName(java.lang.String name)

      Parameters:
        `name` - The fileName, without any extension for type or format.

    - #### getFileType

          public java.lang.String getFileType()

      Returns:
        The fileType, e.g. "ds"

    - #### setFileType

          public void setFileType(java.lang.String type)

      Parameters:
        `type` - The fileType, e.g. "ds"

    - #### getFileFormat

          public java.lang.String getFileFormat()

      Returns:
        The fileFormat, e.g. "xml" or "js"

    - #### setFileFormat

          public void setFileFormat(java.lang.String format)

      Parameters:
        `format` - The fileFormat, e.g. "xml" or "js"

    - #### getOwnerId

          public java.lang.String getOwnerId()

      Returns:
        The ownerId

    - #### setOwnerId

          public void setOwnerId(java.lang.String ownerId)

      Parameters:
        `ownerId` - The ownerId