Interface VFSConnectionDetails
- All Superinterfaces:
ConnectionDetails
- All Known Implementing Classes:
BaseVFSConnectionDetails
,OtherConnectionDetails
-
Method Summary
Modifier and TypeMethodDescriptionGets the list of roles with access to the connection from the Business Analytics product.default String
Allow for returning of domain for non-bucket vfs connectionsdefault String
Gets the root folder path of this VFS connection.default boolean
Indicates if the connection has buckets as the first-level folders.default boolean
Returns true if vfs connection requires root path Defaults tofalse
.default boolean
Returns true if vfs connection supports root path Defaults tofalse
.default void
setRootPath
(String rootPath) Sets the root folder path, given as a string.Methods inherited from interface org.pentaho.di.connections.ConnectionDetails
cloneDetails, closeDialog, getDescription, getName, getProperties, getSpace, getType, openDialog, setDescription, setName, setSpace
-
Method Details
-
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 theKettleVFS
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 tofalse
. -
isRootPathRequired
default boolean isRootPathRequired()Returns true if vfs connection requires root path Defaults tofalse
. -
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 ispvfs://(connection-name)/(rest-path)
. If therest-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, namedconnection-with-root-path
. The same file would be exposed by apvfs
URL in which theroot-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 apvfs
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 thepvfs
URL, the root folder path is incorporated in the provider-specific (a.k.a. internal) URL, as a result of the conversion process frompvfs
toprovider
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 thegetDomain()
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
Given an S3 connection, with a configured root folder path ofpvfs
and Provider URLsmy-bucket/my-folder
, thepvfs
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 ofmy-domain.com:3000
,thepvfs
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
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
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.
-