public abstract class WebDavFileHostingService extends java.lang.Object implements IFileHostingService
Modifier and Type | Class and Description |
---|---|
protected static class |
WebDavFileHostingService.ConnectionContext |
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
WebDavFileHostingService() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
createUri(java.lang.String path,
WebDavFileHostingService.ConnectionContext connectionContext) |
void |
delete(SecurityContext context,
java.lang.String path)
Deletes a document
|
boolean |
exists(SecurityContext context,
java.lang.String path)
Checks if a file exists
|
java.util.List<FileHostingItem> |
find(SecurityContext context,
java.lang.String query)
Finds items in the file hosting repository
|
Stream |
get(SecurityContext context,
java.lang.String path)
Retrieves a document from the file hosting repository
|
FileHostingItem |
getComplete(SecurityContext context,
java.lang.String uid)
Retrieves an entity from the file hosting repository
|
protected abstract WebDavFileHostingService.ConnectionContext |
getConnectionContext(SecurityContext context) |
Stream |
getSharedFile(SecurityContext context,
java.lang.String uid)
Retrieves a document from the file hosting repository by its public uid
|
abstract FileHostingInfo |
info(SecurityContext context)
Retrieves informations about the filehosting implementation
|
java.util.List<FileHostingItem> |
list(SecurityContext context,
java.lang.String path)
Lists files and folders.
|
abstract FileHostingPublicLink |
share(SecurityContext context,
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(SecurityContext context,
java.lang.String path,
Stream document)
Update/insert a document
|
boolean |
supports(SecurityContext context)
Checks, if filehosting operations are available using the provided context
|
abstract void |
unShare(SecurityContext context,
java.lang.String url)
Remove a public link
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isDefaultImplementation
protected abstract WebDavFileHostingService.ConnectionContext getConnectionContext(SecurityContext context)
public abstract FileHostingInfo info(SecurityContext context)
IFileHostingService
info
in interface IFileHostingService
public abstract FileHostingPublicLink share(SecurityContext context, java.lang.String path, java.lang.Integer downloadLimit, java.lang.String expirationDate) throws ServerFault
IFileHostingService
share
in interface IFileHostingService
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
public abstract void unShare(SecurityContext context, java.lang.String url) throws ServerFault
IFileHostingService
unShare
in interface IFileHostingService
context
- the securityContexturl
- the share urlServerFault
public boolean supports(SecurityContext context)
IFileHostingService
supports
in interface IFileHostingService
public java.util.List<FileHostingItem> list(SecurityContext context, java.lang.String path) throws ServerFault
IFileHostingService
list
in interface IFileHostingService
path
- the folder pathServerFault
public java.util.List<FileHostingItem> find(SecurityContext context, java.lang.String query) throws ServerFault
IFileHostingService
find
in interface IFileHostingService
query
- the query. The format of the query is repository dependentServerFault
public boolean exists(SecurityContext context, java.lang.String path) throws ServerFault
IFileHostingService
exists
in interface IFileHostingService
path
- the relative path to the documentServerFault
- common error objectpublic Stream get(SecurityContext context, java.lang.String path) throws ServerFault
IFileHostingService
get
in interface IFileHostingService
path
- the relative path to the documentServerFault
public void store(SecurityContext context, java.lang.String path, Stream document) throws ServerFault
IFileHostingService
store
in interface IFileHostingService
path
- the relative path in the file hosting repositorydocument
- the document dataServerFault
public void delete(SecurityContext context, java.lang.String path) throws ServerFault
IFileHostingService
delete
in interface IFileHostingService
path
- the relative path in the file hosting repositoryServerFault
public FileHostingItem getComplete(SecurityContext context, java.lang.String uid) throws ServerFault
IFileHostingService
getComplete
in interface IFileHostingService
uid
- the entity uidServerFault
public Stream getSharedFile(SecurityContext context, java.lang.String uid) throws ServerFault
IFileHostingService
getSharedFile
in interface IFileHostingService
uid
- the document uidServerFault
protected java.lang.String createUri(java.lang.String path, WebDavFileHostingService.ConnectionContext connectionContext)
Copyright © 2021. All Rights Reserved.