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.ScriptServiceExposes 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 ExceptiongetCaughtException()booleanisMimeTypeSupported(String mimeType)Checks if a given mime type is supported for viewing.Stringview(org.xwiki.model.reference.AttachmentReference attachmentReference)Builds a XHTML representation of the specified office attachment.Stringview(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
nullif 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 underlyingOfficeResourceViewerimplementation- Returns:
- a XHTML representation of the specified office attachment or
nullif an error occurs
-
getCaughtException
Exception getCaughtException()
- Returns:
- the exception caught during the last office attachment view on the current execution, or
nullif 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:
trueif the specified mime type can be viewed,falseotherwise
-
-