Class DefaultOfficeViewerScriptService

    • Constructor Detail

      • DefaultOfficeViewerScriptService

        public DefaultOfficeViewerScriptService()
    • Method Detail

      • getCaughtException

        public Exception getCaughtException()
        Specified by:
        getCaughtException in interface OfficeViewerScriptService
        Returns:
        the exception caught during the last office attachment view on the current execution, or null if no exception has been thrown
      • view

        public String view​(org.xwiki.model.reference.AttachmentReference attachmentReference)
        Description copied from interface: OfficeViewerScriptService
        Builds a XHTML representation of the specified office attachment.
        Specified by:
        view in interface OfficeViewerScriptService
        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

        public String view​(org.xwiki.model.reference.AttachmentReference attachmentReference,
                           Map<String,​String> parameters)
        Description copied from interface: OfficeViewerScriptService
        Builds a XHTML representation of the specified office attachment.
        Specified by:
        view in interface OfficeViewerScriptService
        Parameters:
        attachmentReference - reference to the office attachment to be viewed
        parameters - view parameters specific to the underlying OfficeResourceViewer implementation
        Returns:
        a XHTML representation of the specified office attachment or null if an error occurs
      • isMimeTypeSupported

        public boolean isMimeTypeSupported​(String mimeType)
        Description copied from interface: OfficeViewerScriptService
        Checks if a given mime type is supported for viewing.
        Specified by:
        isMimeTypeSupported in interface OfficeViewerScriptService
        Parameters:
        mimeType - a mime type
        Returns:
        true if the specified mime type can be viewed, false otherwise