Class FileViewerUtil


  • public class FileViewerUtil
    extends Object
    Helper class for handling the "file-viewer" extension point. A JspContext and FileViewerContext is needed. This class will initialize the extension point in the constructor. To invoke extensions, first update the FileViewerContext with the current file and other information and then call render().
    Since:
    3.16
    Author:
    nicklas
    • Method Detail

      • getJspContext

        public JspContext getJspContext()
        Get the JSP context.
      • setPrefixAndSuffix

        public void setPrefixAndSuffix​(String prefix,
                                       String suffix)
        Sets a prefix and suffix string to use before and after the list of actions. The default is "[" and "]".
      • render

        public void render()
                    throws IOException
        Render the extensions with the current file context information and write it to the JSP output.
        Throws:
        IOException
      • renderAsString

        public String renderAsString()
        Render the extensions with the current file context information and return it as a string. Returns an empty string if there are no actions.