Package edu.uiuc.ncsa.qdl.vfs
Interface VFSFileProvider
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractVFSFileProvider
,VFSMemoryFileProvider
,VFSMySQLProvider
,VFSPassThruFileProvider
,VFSZipFileProvider
public interface VFSFileProvider extends Serializable
A QDL virtual file system. This provides files from a mounted VFS. Requests come with a scheme, e.g.qdl-vfs:myscript.qdl
. If the scheme (always ends with a :) matches, then the name is resolved and the script is returned. You add these to theState
load/run commands resolve against any script libraries then fall through to the local file system (unless it is running in server mode).
Why not just use the JavaFileSystem
? Because that allows for access to the underlying native file system and in a scripting environment, we want to severely restrict access to just read-only virtual file systems which can e.g., make libraries available.Created by Jeff Gaynor
on 2/5/20 at 7:43 AM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canRead()
boolean
canWrite()
boolean
checkScheme(String name)
Checks if the name has the scheme for this provider.boolean
contains(String path)
Contains is a type of read.void
delete(String path)
A delete is a type of write.String[]
dir(String path)
boolean
easSupported()
If this store supports extended attributes.VFSEntry
get(String name, int type)
Get the named item.String
getCurrentDir()
edu.uiuc.ncsa.security.core.configuration.XProperties
getFileInfo(String path)
String
getMountPoint()
This is the mount point for the virtual file system.String
getScheme()
The scheme that uniquely identifies this providerString
getType()
mostly this is so when information is being displayed to the user they can see the origin of the provider.boolean
isDirectory(String path)
boolean
isScript(String path)
Checks if the FQ name can be resolved to a script by this provider.long
length(String path)
boolean
mkdir(String path)
Make a set of directories.void
put(VFSEntry entry)
Put this in the store at its current pathvoid
put(String newPath, VFSEntry entry)
Add the using the path.void
rm(String path)
Remove a file from the store.boolean
rmdir(String path)
This will remove a directory.void
setCurrentDir(String path)
void
setMountPoint(String mountPoint)
The mount point does both start and end with the path separator since we always need it.void
setRead(boolean newValue)
void
setScheme(String scheme)
The scheme is does not end with the scheme delimiter and should be normalized here.void
setWrite(boolean newValue)
-
-
-
Method Detail
-
getType
String getType()
mostly this is so when information is being displayed to the user they can see the origin of the provider.- Returns:
-
getScheme
String getScheme()
The scheme that uniquely identifies this provider- Returns:
-
setScheme
void setScheme(String scheme)
The scheme is does not end with the scheme delimiter and should be normalized here.- Parameters:
scheme
-
-
getMountPoint
String getMountPoint()
This is the mount point for the virtual file system.- Returns:
-
setMountPoint
void setMountPoint(String mountPoint)
The mount point does both start and end with the path separator since we always need it. The mount point should be normalized in the setter.- Parameters:
mountPoint
-
-
checkScheme
boolean checkScheme(String name)
Checks if the name has the scheme for this provider.- Parameters:
name
-- Returns:
-
get
VFSEntry get(String name, int type) throws Throwable
Get the named item. Note that all of the names are qualified.- Parameters:
name
-- Returns:
- Throws:
Throwable
-
put
void put(String newPath, VFSEntry entry) throws Throwable
Add the using the path. If and entry exists there it will be over-written.- Parameters:
newPath
-entry
-- Throws:
Throwable
-
put
void put(VFSEntry entry) throws Throwable
Put this in the store at its current path- Parameters:
entry
-- Throws:
Throwable
-
isScript
boolean isScript(String path)
Checks if the FQ name can be resolved to a script by this provider.- Parameters:
path
-- Returns:
-
canRead
boolean canRead()
-
setRead
void setRead(boolean newValue)
-
canWrite
boolean canWrite()
-
setWrite
void setWrite(boolean newValue)
-
delete
void delete(String path) throws Throwable
A delete is a type of write. If the store is not writeable, it cannot delete files.- Parameters:
path
-- Throws:
Throwable
-
contains
boolean contains(String path) throws Throwable
Contains is a type of read. If the store is not readable, it cannot tell if it contains an entry.- Parameters:
path
-- Returns:
- Throws:
Throwable
-
getFileInfo
edu.uiuc.ncsa.security.core.configuration.XProperties getFileInfo(String path) throws Throwable
- Throws:
Throwable
-
getCurrentDir
String getCurrentDir()
-
setCurrentDir
void setCurrentDir(String path)
-
mkdir
boolean mkdir(String path)
Make a set of directories. This will make a given directory and any intermediate directories.- Parameters:
path
-- Returns:
-
rmdir
boolean rmdir(String path) throws Throwable
This will remove a directory. Note that this requires that the directory be empty of all files.- Parameters:
path
-- Returns:
- Throws:
Throwable
-
rm
void rm(String path) throws Throwable
Remove a file from the store.- Parameters:
path
-- Throws:
Throwable
-
easSupported
boolean easSupported()
If this store supports extended attributes.- Returns:
-
isDirectory
boolean isDirectory(String path)
-
-