Package org.qdl_lang.vfs
Class VFSDatabase
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.sql.SQLDatabase
-
- org.qdl_lang.vfs.VFSDatabase
-
public class VFSDatabase extends edu.uiuc.ncsa.security.storage.sql.SQLDatabase
Note that all of the arguments to this database for keys are assumed to be normalized, resolved, etc., etc. so that no such logic is present here. TheVFSFileProvider
implementation that has an instance of this is charged with that.Created by Jeff Gaynor
on 2/28/20 at 5:09 PM
-
-
Constructor Summary
Constructors Constructor Description VFSDatabase(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, String fqTablename)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Completely empty the store of all entries.boolean
containsEntry(String[] key)
FileEntry
get(String[] key)
List<String>
getDistinctPaths()
boolean
mkdir(String[] key)
Make a directory.void
put(String[] key, VFSEntry fileEntry)
FileEntry
remove(String[] key)
List<String>
selectByPath(String path)
This takes a path of the form a/b/c/.../d/ (note normalization with ending slash) and returns the entries (i.e.void
update(String[] key, VFSEntry fileEntry)
-
-
-
Constructor Detail
-
VFSDatabase
public VFSDatabase(edu.uiuc.ncsa.security.storage.sql.ConnectionPool connectionPool, String fqTablename)
-
-
Method Detail
-
selectByPath
public List<String> selectByPath(String path)
This takes a path of the form a/b/c/.../d/ (note normalization with ending slash) and returns the entries (i.e. file names) for it. A single entry denotes this is a directory, effectively. No entries means this is not in the database.- Parameters:
path
-- Returns:
-
containsEntry
public boolean containsEntry(String[] key)
-
mkdir
public boolean mkdir(String[] key)
Make a directory. NOTE you must check elsewhere if this exists before trying to create it.- Parameters:
key
-- Returns:
-
clear
public void clear()
Completely empty the store of all entries.
Use it wisely.
-
-