public class FileService extends Object
ContentStore
implementation.
Please consult the swagger documentation for further details about the methods exposed via REST.
Constructor and Description |
---|
FileService() |
Modifier and Type | Method and Description |
---|---|
protected StreamDescriptor |
buildStreamDescriptor(org.apache.cxf.jaxrs.ext.multipart.Attachment att)
Build a
StreamDescriptor that contains the filename, MIME type and description based on
the Attachment 's header fields. |
void |
deleteFile(String fileId,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Delete a file from the REST service.
|
ContentStore |
getContentStore() |
InputStream |
retrieveFile(String fileId,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Download a file from the REST service
|
void |
setContentStore(ContentStore contentStore)
Set the backing
ContentStore implementation |
String |
storeFile(org.apache.cxf.jaxrs.ext.multipart.Attachment file,
javax.servlet.http.HttpServletResponse response)
Upload a file to the REST service.
|
public String storeFile(org.apache.cxf.jaxrs.ext.multipart.Attachment file, @Context javax.servlet.http.HttpServletResponse response) throws Exception
Exception
protected StreamDescriptor buildStreamDescriptor(org.apache.cxf.jaxrs.ext.multipart.Attachment att)
StreamDescriptor
that contains the filename, MIME type and description based on
the Attachment
's header fields.att
- the Attachment to handleStreamDescriptor
that contains the relevant informationpublic InputStream retrieveFile(String fileId, @Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response) throws IOException
IOException
public void deleteFile(String fileId, @Context javax.servlet.http.HttpServletRequest request, @Context javax.servlet.http.HttpServletResponse response) throws IOException
IOException
public ContentStore getContentStore()
ContentStore
implementationpublic void setContentStore(ContentStore contentStore)
ContentStore
implementationCopyright © 2018 levigo holding gmbh. All rights reserved.