org.xwiki.office.viewer
Interface OfficeViewerScriptService

All Superinterfaces:
org.xwiki.script.service.ScriptService

@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: 6cb3a89c4b38a482a338c7d17324aceda74d6c5c $

Method Summary
 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 viewed
parameters - view parameters specific to the underlying OfficeViewer 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


Copyright © 2004-2013 XWiki. All Rights Reserved.