public class FileHostingService extends java.lang.Object implements IFileHosting
Modifier and Type | Field and Description |
---|---|
java.util.List<IFileHostingService> |
delegates |
Constructor and Description |
---|
FileHostingService(SecurityContext context,
java.lang.String domainUid) |
Modifier and Type | Method and Description |
---|---|
void |
delete(java.lang.String path)
Deletes a document
|
boolean |
exists(java.lang.String path)
Checks if a file exists
|
java.util.List<FileHostingItem> |
find(java.lang.String query)
Finds items in the file hosting repository
|
Stream |
get(java.lang.String path)
Retrieves a document from the file hosting repository
|
FileHostingItem |
getComplete(java.lang.String uid)
Retrieves an entity from the file hosting repository
|
Configuration |
getConfiguration()
Retrieves the configuration
|
Stream |
getSharedFile(java.lang.String uid)
Retrieves a document from the file hosting repository by its public uid
|
FileHostingInfo |
info()
Retrieves informations about the filehosting implementation
|
java.util.List<FileHostingItem> |
list(java.lang.String path)
Lists files and folders.
|
protected java.util.List<IFileHostingService> |
searchExtensionPoints() |
FileHostingPublicLink |
share(java.lang.String path,
java.lang.Integer downloadLimit,
java.lang.String expirationDate)
Retrieves a public URL to the document in the file hosting repository
|
void |
store(java.lang.String path,
Stream document)
Update/insert a document
|
void |
unShare(java.lang.String url)
Remove a public link
|
public final java.util.List<IFileHostingService> delegates
public FileHostingService(SecurityContext context, java.lang.String domainUid)
protected java.util.List<IFileHostingService> searchExtensionPoints()
public java.util.List<FileHostingItem> list(java.lang.String path) throws ServerFault
IFileHosting
list
in interface IFileHosting
path
- the folder pathServerFault
- common error objectpublic java.util.List<FileHostingItem> find(java.lang.String query) throws ServerFault
IFileHosting
find
in interface IFileHosting
query
- the query. The format of the query is repository dependentServerFault
- common error objectpublic Stream get(java.lang.String path) throws ServerFault
IFileHosting
get
in interface IFileHosting
path
- the relative path to the documentServerFault
- common error objectpublic FileHostingItem getComplete(java.lang.String uid) throws ServerFault
IFileHosting
getComplete
in interface IFileHosting
uid
- the entity uidServerFault
- common error objectpublic Stream getSharedFile(java.lang.String uid) throws ServerFault
IFileHosting
getSharedFile
in interface IFileHosting
uid
- the document uidServerFault
- common error objectpublic FileHostingPublicLink share(java.lang.String path, java.lang.Integer downloadLimit, java.lang.String expirationDate) throws ServerFault
IFileHosting
share
in interface IFileHosting
path
- the relative path to the documentdownloadLimit
- the number of times the file can be downloaded, <= 0 if
unlimitedexpirationDate
- a ISO-8601 compliant date, null otherwiseServerFault
- common error objectpublic void unShare(java.lang.String url) throws ServerFault
IFileHosting
unShare
in interface IFileHosting
url
- the share urlServerFault
- common error objectpublic void store(java.lang.String path, Stream document) throws ServerFault
IFileHosting
store
in interface IFileHosting
path
- the relative path in the file hosting repositorydocument
- the document dataServerFault
- common error objectpublic void delete(java.lang.String path) throws ServerFault
IFileHosting
delete
in interface IFileHosting
path
- the relative path in the file hosting repositoryServerFault
- common error objectpublic boolean exists(java.lang.String path) throws ServerFault
IFileHosting
exists
in interface IFileHosting
path
- the relative path to the documentServerFault
- common error objectpublic FileHostingInfo info() throws ServerFault
IFileHosting
info
in interface IFileHosting
ServerFault
- common error objectpublic Configuration getConfiguration() throws ServerFault
IFileHosting
getConfiguration
in interface IFileHosting
ServerFault
- common error objectCopyright © 2021. All Rights Reserved.