Class RWExportTransform

  • All Implemented Interfaces:
    AppTransform, Transform

    public class RWExportTransform
    extends AbstractExportTransform
    The RWExportTransform retrieves the binary data from the RWInstance and appends it to the markup output. Assumes that the execution mode has been set on the RWBean It also sets the content type (i.e. "application/pdf") accordingly, depending on the value of the contentType formal parameter or it obtains it from the ExportFormat that matches the view mode and bean type.
    Since:
    MicroStrategy Web 8.0.0
    • Field Detail

      • _contentType

        protected FormalParameter _contentType
        Defines the content type of the MarkupOutput.
        This should be a valid browser content type for the PDF Content.
        Default value: application/pdf
    • Constructor Detail

      • RWExportTransform

        public RWExportTransform()
        Default no arguments constructor. Initialize Formal Parameters.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Transform
        Returns a textual description of the transform.
        Returns:
        The textual description of the transform.
      • initializeTransform

        public void initializeTransform​(Transformable data)
        Description copied from class: AbstractAppTransform

        This method initialize the private and protected fields of the transform, such as width and height. It also invokes the initializeWebComponent, initializeImages and initializeCss methods.

        This method is automatically called from the transform method. Transforms which would like to invoke other methods in this instance directly (for example, to invoke some render methods), need first to call this method to guarantee that the Transform is ready to generate output.
        Specified by:
        initializeTransform in interface AppTransform
        Overrides:
        initializeTransform in class AbstractAppTransform
        Parameters:
        data - the bean to transform.
      • renderShell

        public void renderShell​(MarkupOutput out)
        Description copied from class: AbstractAppTransform

        Generates the shell for this Transform.

        The shell is a <div> tag that automatically surrounds the content generated by the Transform. It's used among other things by the javascript to identify the HTML associated with a bone, and by the iFrame update technology to identify a component in the page.

        The attributes to append to this <div> are obtained from the getAttributesShellDiv method; the style from the getStyleShellDiv method.
        This method calls renderCssLink and checkStatus to generate the Transform's content.
        Overrides:
        renderShell in class AbstractAppTransform
        Parameters:
        out - output by this transform
      • getSupportedBeanType

        public java.lang.Class getSupportedBeanType()
        Description copied from class: AbstractAppTransform
        Returns the supported bean type. This abstract Transform supports all WebComponents so every sub-class should override this method to return the class of the Bean the Transform is expecting, for example:
         public class CustomReportClass extends AbstractAppTransform {
        
            public Class getSupportedBeanType() {
                //This Transform is expected to work only with a ReportBean,
                //therefore this method needs to return this class:
                return ReportBean.class;
            }
        
         }
         
        Specified by:
        getSupportedBeanType in interface Transform
        Overrides:
        getSupportedBeanType in class AbstractAppTransform
        Returns:
        a root class/interface supported by this transform.