public final class DBFileUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static GlobalKey |
EXPORT_FOLDER_GKEY
the export folder
|
static java.lang.String |
FEATURE_SSL
string to verify if SSL has been enabled
|
static GlobalKey |
LOST_AND_FOUND_FOLDER_GKEY
the lost and found folder
|
static java.lang.String |
PARAMETER_ENCODE |
static GlobalKey |
ROOT_FOLDER_GKEY
the root folder
|
Modifier and Type | Method and Description |
---|---|
static DBFolder |
copyDirectory(MutableDataSource mds,
DBFolder dbFolder,
java.lang.String destPath,
boolean replace)
copy the entire directory
|
static DBFile |
copyFile(MutableDataSource mds,
DBFile dbFileToCopy,
java.lang.String destPath)
Copy file from source location to destination location.
|
static DBFolder |
createDateFolder(MutableDataSource mds,
java.lang.String prefix) |
static DBFolder |
createDateFolder(MutableDataSource mds,
java.lang.String prefix,
java.lang.String suffix) |
static DBFolder |
createDateFolder(MutableDataSource mds,
java.lang.String prefix,
java.lang.String suffix,
java.lang.String dateFormat,
java.util.Date date)
Automatically create folders based on a date.
|
static DBFile |
createFile(DBFolder folder,
java.lang.String name) |
static DBFile |
fetchFile(DataSource ds,
java.lang.String decodedPath)
get the file
|
static DBFolder |
fetchFolder(DataSource ds,
java.lang.String path)
get the folder
|
static DBFileRemote |
fetchRemoteFile(DataSource ds,
java.lang.String path)
get the file
|
static java.lang.String |
getExternalFileURL(DBFile file,
DataSource ds)
Get Full URL
|
static java.lang.String |
getMagicNumberURL(java.lang.String magicNumber,
DataSource ds)
Get Magic Number URL
|
static DBFile |
getVersion(DBFile file,
java.lang.String version)
Gets the file for the specified version.
|
static DBFolder |
makeFolder(MutableDataSource mds,
java.lang.String path)
create a folder
|
static DBFile |
obsoleteCopyFile(MutableDataSource mds,
DBFile dbFileToCopy,
java.lang.String encodedDestPath)
Deprecated.
|
static DBFolder |
obsoleteCreateFolder(MutableDataSource mds,
java.lang.String theEncodedURL)
Deprecated.
|
static DBFile |
obsoleteGetFile(DataSource ds,
java.lang.String theEncodedURL)
Deprecated.
|
static DBFolder |
obsoleteGetFolder(DataSource ds,
java.lang.String theEncodedURL)
Deprecated.
|
public static final java.lang.String PARAMETER_ENCODE
public static final GlobalKey ROOT_FOLDER_GKEY
public static final GlobalKey LOST_AND_FOUND_FOLDER_GKEY
public static final GlobalKey EXPORT_FOLDER_GKEY
public static final java.lang.String FEATURE_SSL
@Deprecated @Nonnull public static DBFile obsoleteCopyFile(MutableDataSource mds, DBFile dbFileToCopy, @Nonnull java.lang.String encodedDestPath) throws java.lang.Exception
mds
- the data source to usedbFileToCopy
- DbFileencodedDestPath
- - destination pathjava.lang.Exception
- a serious problem.@Nonnull public static DBFile copyFile(@Nonnull MutableDataSource mds, @Nonnull DBFile dbFileToCopy, @Nonnull java.lang.String destPath) throws java.lang.Exception
mds
- the data source to usedbFileToCopy
- DbFiledestPath
- - destination pathjava.lang.Exception
- a serious problem.@CheckReturnValue @Nonnull public static DBFile createFile(@Nonnull DBFolder folder, @Nonnull java.lang.String name) throws java.lang.Exception
folder
- the folder to create the file inname
- the file namejava.lang.Exception
- a serious problem.@Nonnull public static DBFolder copyDirectory(@Nonnull MutableDataSource mds, @Nonnull DBFolder dbFolder, @Nonnull java.lang.String destPath, boolean replace) throws java.lang.Exception
mds
- the data source to usedbFolder
- destPath
- replace
- java.lang.Exception
- a exception@Nullable @CheckReturnValue public static DBFile fetchFile(@Nonnull DataSource ds, @Nonnull java.lang.String decodedPath) throws java.lang.Exception
ds
- the data sourcedecodedPath
- file decoded pathjava.lang.Exception
- a serious problem@CheckReturnValue @Nullable public static DBFileRemote fetchRemoteFile(@Nonnull DataSource ds, @Nonnull java.lang.String path) throws java.lang.Exception
ds
- the data sourcepath
- file pathjava.lang.Exception
- a serious problem@Deprecated @CheckReturnValue @Nullable public static DBFile obsoleteGetFile(@Nonnull DataSource ds, @Nonnull java.lang.String theEncodedURL) throws java.lang.Exception
ds
- the data sourcetheEncodedURL
- each level of folder name and file name must be encoded with StringUtilities.encode() method
all '/' will be treated as path separatorjava.lang.Exception
- a serious problem@CheckReturnValue @Nonnull public static java.lang.String getExternalFileURL(@Nonnull DBFile file, @Nonnull DataSource ds) throws java.lang.Exception
file
- fileds
- dsjava.lang.Exception
- a serious problem.@CheckReturnValue @Nullable public static DBFile getVersion(@Nullable DBFile file, @Nullable java.lang.String version) throws java.lang.Exception
file
- The fileversion
- The versionjava.lang.Exception
- A serious problem@CheckReturnValue @Nonnull public static DBFolder createDateFolder(@Nonnull MutableDataSource mds, @Nonnull java.lang.String prefix, @Nullable java.lang.String suffix, @Nonnull java.lang.String dateFormat, @Nonnull java.util.Date date) throws java.lang.Exception
mds
- prefix
- suffix
- dateFormat
- date
- java.lang.Exception
@CheckReturnValue @Nonnull public static DBFolder createDateFolder(@Nonnull MutableDataSource mds, @Nonnull java.lang.String prefix, @Nullable java.lang.String suffix) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public static DBFolder createDateFolder(@Nonnull MutableDataSource mds, @Nonnull java.lang.String prefix) throws java.lang.Exception
java.lang.Exception
@CheckReturnValue @Nonnull public static DBFolder makeFolder(@Nonnull MutableDataSource mds, @Nonnull java.lang.String path) throws java.lang.Exception
mds
- the datasource to clonepath
- folder pathjava.lang.Exception
- a serious problem@Deprecated @CheckReturnValue @Nonnull public static DBFolder obsoleteCreateFolder(@Nonnull MutableDataSource mds, @Nonnull java.lang.String theEncodedURL) throws java.lang.Exception
mds
- the datasource to clonetheEncodedURL
- each level of folder name and file name must be encoded with StringUtilities.encode() method
all '/' will be treated as path separatorjava.lang.Exception
- a serious problem@CheckReturnValue @Nullable public static DBFolder fetchFolder(@Nonnull DataSource ds, @Nonnull java.lang.String path) throws java.lang.Exception
ds
- the datasourcepath
- folder pathjava.lang.Exception
- a serious problem@Deprecated @CheckReturnValue @Nullable public static DBFolder obsoleteGetFolder(@Nonnull DataSource ds, @Nonnull java.lang.String theEncodedURL) throws java.lang.Exception
ds
- the datasourcetheEncodedURL
- each level of folder name must be encoded with StringUtilities.encode() method
all '/' will be treated as path separatorjava.lang.Exception
- a serious problem@CheckReturnValue @Nonnull public static java.lang.String getMagicNumberURL(@Nonnull java.lang.String magicNumber, @Nonnull DataSource ds) throws java.lang.Exception
magicNumber
- magicNumberds
- dsjava.lang.Exception
- ExceptionstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.