@Manager public class DefaultPreviewManager extends Object implements PreviewManager
PreviewManager.ErrorMessage
Constructor and Description |
---|
DefaultPreviewManager(WorkObjectService workObjectService,
org.springframework.context.MessageSource messageSource,
UserManager userManager,
PreviewDocumentContentConverterService documentConverterService,
TimeProvider timeProvider,
ContentManager contentManager,
ContentManagerHelper contentManagerHelper,
PdfDocumentContentConverterService downloadAsPdfContentConverter,
AmbiguousIdHelper ambiguousIdHelper,
StatisticsAwareCache statisticsAwareCache) |
Modifier and Type | Method and Description |
---|---|
void |
evictCachedFile(String ambiguousId)
Evicts cached file for the given work object ID.
|
String |
getJsonErrorMessage(String messageKey,
String cause)
Utility method to get error message and cause in a json string.
|
void |
getPreviewContent(String ambiguousId,
boolean forceDownload,
String acceptHeader,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Get preview content of a work object.
|
void |
getPreviewInfo(String ambiguousId,
String acceptHeader,
javax.servlet.http.HttpServletResponse response)
Get preview information of a work object.
|
public DefaultPreviewManager(WorkObjectService workObjectService, org.springframework.context.MessageSource messageSource, UserManager userManager, PreviewDocumentContentConverterService documentConverterService, TimeProvider timeProvider, ContentManager contentManager, ContentManagerHelper contentManagerHelper, PdfDocumentContentConverterService downloadAsPdfContentConverter, AmbiguousIdHelper ambiguousIdHelper, StatisticsAwareCache statisticsAwareCache)
public void getPreviewInfo(String ambiguousId, String acceptHeader, javax.servlet.http.HttpServletResponse response) throws IOException
PreviewManager
Get preview information of a work object.
getPreviewInfo
in interface PreviewManager
ambiguousId
- the ID of the work object (either work object ID value or global ID value)acceptHeader
- accept headerresponse
- HttpServletResponseIOException
- in case of error while retrieving preview infopublic void getPreviewContent(String ambiguousId, boolean forceDownload, String acceptHeader, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
PreviewManager
Get preview content of a work object.
getPreviewContent
in interface PreviewManager
ambiguousId
- the ID of the work object (either work object ID value or global ID value)forceDownload
- force download flagacceptHeader
- accept headerrequest
- HttpServletRequestresponse
- HttpServletResponseIOException
- in case of error while retrieving preview contentpublic void evictCachedFile(String ambiguousId)
PreviewManager
Evicts cached file for the given work object ID.
evictCachedFile
in interface PreviewManager
ambiguousId
- the ID of the work object (either work object ID value or global ID value)public String getJsonErrorMessage(String messageKey, String cause)
PreviewManager
Utility method to get error message and cause in a json string.
getJsonErrorMessage
in interface PreviewManager
messageKey
- error message keycause
- cause for the errorCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.