Interface VFSConnectionDetails

All Superinterfaces:
ConnectionDetails
All Known Implementing Classes:
BaseVFSConnectionDetails, OtherConnectionDetails

public interface VFSConnectionDetails extends ConnectionDetails
Created by bmorrise on 2/13/19.
  • Method Details

    • getDomain

      default String getDomain()
      Allow for returning of domain for non-bucket vfs connections
    • hasBuckets

      default boolean hasBuckets()
      Indicates if the connection has buckets as the first-level folders.

      The buckets of a connection are obtained via VFSConnectionProvider.getLocations(VFSConnectionDetails). Bucket management is done using provider specific means. For example, it is not possible to create a bucket folder using the KettleVFS API, as a child of the connection's root folder.

      The default interface implementation returns true.

      Returns:
      true if the connection supports buckets; false, otherwise.
    • isRootPathSupported

      default boolean isRootPathSupported()
      Returns true if vfs connection supports root path Defaults to false.
    • isRootPathRequired

      default boolean isRootPathRequired()
      Returns true if vfs connection requires root path Defaults to false.
    • getRootPath

      default String getRootPath()
      Gets the root folder path of this VFS connection.

      The root folder path allows limiting the files exposed through a PVFS URL.

      The default interface implementation exists to ensure backward compatibility and returns null.

      Semantics of the Root Folder Path

      Assume a connection without a configured root folder path, connection-name. The general structure of a PVFS URL that resolves to a file in this connection is pvfs://(connection-name)/(rest-path). If the rest-path component is split in two parts, the root path and the remainder, the following form is achieved: pvfs://(connection-name)/(root-path)/(rest-rest-path).

      Assume a connection configured with the root folder path root-path, all other configurations equal, named connection-with-root-path. The same file would be exposed by a pvfs URL in which the root-path component is omitted: pvfs://(connection-with-root-path)/(rest-rest-path).

      Necessarily, the configured root path must identify a file of type folder.

      Files which are not descendant of a connection's root folder path cannot be identified/accessed using a pvfs URL. Folder segments of a pvfs URL cannot have the special names . or ...

      Syntax of the Root Folder Path

      The syntax of the root folder path is that of one or more folder names separated by a folder separator, /. For example, the following would be syntactically valid: my-vfs-bucket/my-folder. While a leading or a trailing folder separator should be tolerated, a normalized root folder path should have none.

      The value stored in this property is subject to variable substitution and thus may not conform to the syntax of a root folder path. The syntax is validated only after variable substitution is performed.

      Impact of Root Folder Path on Provider URLs

      While omitted from the pvfs URL, the root folder path is incorporated in the provider-specific (a.k.a. internal) URL, as a result of the conversion process from pvfs to provider URL. The root folder path is not a required component of provider URLs, and files which are not descendants of the root folder path are still resolvable. The root folder path is not a security feature, by itself.

      The general structure of a provider URL corresponding to the above pvfs URL is like: (scheme):// [(domain) /] [(root-path) /] [(rest-rest-path)]

      Where the scheme component is given by the ConnectionDetails.getType() property, and the domain component is given by the getDomain() property.

      The provider URL structure for specific providers may vary from this general structure. However, the semantics of the root folder path property should be respected.

      Examples of pvfs and Provider URLs

      Given an S3 connection, with a configured root folder path of my-bucket/my-folder, the pvfs URL, pvfs://my-s3-connection/my-sub-folder/my-file, would convert to the provider URL, s3://my-bucket/my-folder/my-sub-folder/my-file.

      Given an HCP connection, with a configured root folder path of my-folder, and a configured domain of my-domain.com:3000,the pvfs URL, pvfs://my-hcp-connection/my-sub-folder/my-file, would convert to the provider URL, hcp://my-domain.com:3000/my-folder/my-sub-folder/my-file.

      Returns:
      A non-empty root path, if any; null, otherwise.
      See Also:
    • setRootPath

      default void setRootPath(String rootPath)
      Sets the root folder path, given as a string.

      An empty root folder path value should be converted to null. Further syntax validation is performed only after variable substitution.

      The default interface implementation exists to ensure backward compatibility and does nothing.

      Parameters:
      rootPath - The root path.
    • getBaRoles

      default List<String> getBaRoles()
      Gets the list of roles with access to the connection from the Business Analytics product.

      Access control does not distinguish between types of access operations (such as read, write, delete). Access is granted to either all or none of the operations.

      Returns:
      A non-null list of roles.