@Manager public class DefaultFileStorageManager extends Object implements FileStorageManager
Default implementation of the FileSotrageManager interface.
Constructor and Description |
---|
DefaultFileStorageManager(CurrentUserService currentUserService,
ContentManager contentManager,
ContentDetector contentDetector,
ThumbnailService thumbnailService,
TimeProvider timeProvider,
boolean enableVersioning) |
Modifier and Type | Method and Description |
---|---|
void |
readFileIntoHttpResponse(String contentReferenceId,
String previewType,
Integer thumbnailMaxHeight,
javax.servlet.http.HttpServletResponse response)
Reads the file content and stores the result in the given HTTP response instance.
|
com.google.common.collect.ImmutableMap<String,Object> |
saveFile(String fileName,
String originalName,
com.google.common.net.MediaType contentType,
long size,
InputStream contentInputStream)
Saves the given multipart file.
|
public DefaultFileStorageManager(CurrentUserService currentUserService, ContentManager contentManager, ContentDetector contentDetector, ThumbnailService thumbnailService, TimeProvider timeProvider, boolean enableVersioning)
@Transactional public com.google.common.collect.ImmutableMap<String,Object> saveFile(String fileName, String originalName, com.google.common.net.MediaType contentType, long size, InputStream contentInputStream) throws IOException
FileStorageManager
Saves the given multipart file.
saveFile
in interface FileStorageManager
fileName
- file nameoriginalName
- original file namecontentType
- conten typesize
- content sizecontentInputStream
- content input streamIOException
- if the content could not be saved@Transactional(readOnly=true) public void readFileIntoHttpResponse(String contentReferenceId, String previewType, Integer thumbnailMaxHeight, javax.servlet.http.HttpServletResponse response) throws IOException
FileStorageManager
Reads the file content and stores the result in the given HTTP response instance.
readFileIntoHttpResponse
in interface FileStorageManager
contentReferenceId
- the content reference IDpreviewType
- the requested preview typethumbnailMaxHeight
- the requested maximum thumbnail heightresponse
- the response to receive the file contentIOException
- the content could not be retrievedCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.