public final class FilesCore extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static FileDetails |
createFile(java.io.InputStream file) |
static java.lang.String |
generateTemporaryUrl(java.lang.String guid)
Note: this does NOT validate the GUID, it is assumed to exist (using the generated url to access non-existent resource will result in an error)
|
static FileDetails |
getFileDetails(java.lang.String guid) |
static FileDetails |
getFileDetailsForToken(java.lang.String token) |
static void |
removeFile(java.lang.String guid) |
static boolean |
updateFile(FileDetails details)
This can be used to change the ownership (backend id) of the file, but not to change the url.
|
public static FileDetails createFile(java.io.InputStream file) throws java.lang.IllegalArgumentException
file
- java.lang.IllegalArgumentException
- on bad input datapublic static boolean updateFile(FileDetails details) throws java.lang.IllegalArgumentException
details
- java.lang.IllegalArgumentException
- on invalid detailspublic static FileDetails getFileDetails(java.lang.String guid)
guid
- public static void removeFile(java.lang.String guid)
guid
- public static FileDetails getFileDetailsForToken(java.lang.String token)
token
- public static java.lang.String generateTemporaryUrl(java.lang.String guid)
guid
- Copyright © 2015-2018 Tampere University of Technology, Pori Department.