Package org.xwiki.office.viewer
Interface OfficeViewerScriptService
-
- All Superinterfaces:
org.xwiki.script.service.ScriptService
- All Known Implementing Classes:
DefaultOfficeViewerScriptService
@Role public interface OfficeViewerScriptService extends org.xwiki.script.service.ScriptService
Exposes utility methods for viewing office attachments in server-side scripts.- Since:
- 2.5M2
- Version:
- $Id: bfecb721fbed02bf1ea2979c27f7028a5cdf951d $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Exception
getCaughtException()
boolean
isMimeTypeSupported(String mimeType)
Checks if a given mime type is supported for viewing.String
view(org.xwiki.model.reference.AttachmentReference attachmentReference)
Builds a XHTML representation of the specified office attachment.String
view(org.xwiki.model.reference.AttachmentReference attachmentReference, Map<String,String> parameters)
Builds a XHTML representation of the specified office attachment.
-
-
-
Method Detail
-
view
String view(org.xwiki.model.reference.AttachmentReference attachmentReference)
Builds a XHTML representation of the specified office attachment.- Parameters:
attachmentReference
- reference to the office attachment to be viewed- Returns:
- a XHTML representation of the specified office attachment or
null
if an error occurs
-
view
String view(org.xwiki.model.reference.AttachmentReference attachmentReference, Map<String,String> parameters)
Builds a XHTML representation of the specified office attachment.- Parameters:
attachmentReference
- reference to the office attachment to be viewedparameters
- view parameters specific to the underlyingOfficeResourceViewer
implementation- Returns:
- a XHTML representation of the specified office attachment or
null
if an error occurs
-
getCaughtException
Exception getCaughtException()
- Returns:
- the exception caught during the last office attachment view on the current execution, or
null
if no exception has been thrown
-
isMimeTypeSupported
boolean isMimeTypeSupported(String mimeType)
Checks if a given mime type is supported for viewing.- Parameters:
mimeType
- a mime type- Returns:
true
if the specified mime type can be viewed,false
otherwise
-
-