Class BaseVFSConnectionDetails
- All Implemented Interfaces:
ConnectionDetails
,VFSConnectionDetails
- Direct Known Subclasses:
OtherConnectionDetails
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
fillProperties
(Map<String, String> props) Adds base/default properties to properties of connection instance.Gets the list of roles with access to the connection from the Business Analytics product.Gets props associated with this ConnectionDetails.Gets the root folder path of this VFS connection.boolean
Gets if the VFS connection supports root path or not.void
setRootPath
(String rootPath) Sets the root folder path, given as a string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pentaho.di.connections.ConnectionDetails
cloneDetails, closeDialog, getDescription, getName, getSpace, getType, openDialog, setDescription, setName, setSpace
Methods inherited from interface org.pentaho.di.connections.vfs.VFSConnectionDetails
getDomain, hasBuckets, isRootPathRequired
-
Constructor Details
-
BaseVFSConnectionDetails
public BaseVFSConnectionDetails()
-
-
Method Details
-
getBaRoles
Description copied from interface:VFSConnectionDetails
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.
- Specified by:
getBaRoles
in interfaceVFSConnectionDetails
- Returns:
- A non-null list of roles.
-
getProperties
Description copied from interface:ConnectionDetails
Gets props associated with this ConnectionDetails. Allows implementors to expose connection properties without requiring clients to have the implementation as a dependency.- Specified by:
getProperties
in interfaceConnectionDetails
-
isRootPathSupported
public boolean isRootPathSupported()Gets if the VFS connection supports root path or not.- Specified by:
isRootPathSupported
in interfaceVFSConnectionDetails
-
getRootPath
Description copied from interface:VFSConnectionDetails
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 theVFSConnectionDetails.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
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
.- Specified by:
getRootPath
in interfaceVFSConnectionDetails
- Returns:
- A non-empty root path, if any;
null
, otherwise. - See Also:
-
setRootPath
Description copied from interface:VFSConnectionDetails
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.
- Specified by:
setRootPath
in interfaceVFSConnectionDetails
- Parameters:
rootPath
- The root path.
-
fillProperties
Adds base/default properties to properties of connection instance.- Parameters:
props
- The properties map
-