Class InboxListXHTMLTransform

  • All Implemented Interfaces:
    AppTransform, LayoutTransform, Transform

    public class InboxListXHTMLTransform
    extends AbstractAppTransform
    implements LayoutTransform

    Title: InboxListXHTMLTransform. The InboxListXHTMLTransform generates a list content of the user's Inbox. From this list, users can execute the corresponding inbox message, view its details or remove the message from the inbox.
    The output of this Transform generates well-formed XHTML, and it's designed to use external css files for all formatting.

    Since:
    MicroStrategy Web 8.0.0
    • Field Detail

      • LEVEL_ICON

        public static final int LEVEL_ICON
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's icon.
        Value = 1
        See Also:
        Constant Field Values
      • LEVEL_NAME

        public static final int LEVEL_NAME
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's name.
        Value = 2
        See Also:
        Constant Field Values
      • LEVEL_STATUS

        public static final int LEVEL_STATUS
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's status.
        Value = 4
        See Also:
        Constant Field Values
      • LEVEL_START_TIME

        public static final int LEVEL_START_TIME
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's time information.
        Value = 8
        See Also:
        Constant Field Values
      • LEVEL_DETAILS

        public static final int LEVEL_DETAILS
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's link to details.
        Value = 16
        See Also:
        Constant Field Values
      • LEVEL_REMOVE

        public static final int LEVEL_REMOVE
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's option to be removed.
        Value = 32
        See Also:
        Constant Field Values
      • LEVEL_SORT_ICONS

        public static final int LEVEL_SORT_ICONS
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display sort buttons.
        Value = 64
        See Also:
        Constant Field Values
      • LEVEL_HEADER

        public static final int LEVEL_HEADER
        Allowed value for the levelFlag formal parameter. Specifies that it is requested the folder transform to display the header.
        Value = 128
        See Also:
        Constant Field Values
      • LEVEL_FOOTER

        public static final int LEVEL_FOOTER
        Allowed value for the levelFlag formal parameter. Specifies that it is requested the folder transform to display the footer.
        Value = 256
        See Also:
        Constant Field Values
      • LEVEL_UNREAD_LINK

        public static final int LEVEL_UNREAD_LINK
        Allowed value for the levelFlag formal parameter. Specifies that it is requested the folder transform to display the link to mark message as unread.
        Value = 512
        See Also:
        Constant Field Values
      • LEVEL_EXPORT_EXCEL

        public static final int LEVEL_EXPORT_EXCEL
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's option to be exported to excel.
        Value = 1024
        See Also:
        Constant Field Values
      • LEVEL_EXPORT_PDF

        public static final int LEVEL_EXPORT_PDF
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display object's option to be exported to excel.
        Value = 2048
        See Also:
        Constant Field Values
      • LEVEL_CREATION_TIME

        public static final int LEVEL_CREATION_TIME
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display the message's creation time.
        Value = 4096
        See Also:
        Constant Field Values
      • LEVEL_MODIFICATION_TIME

        public static final int LEVEL_MODIFICATION_TIME
        Allowed value for the levelFlag formal parameter. Specifies that the folder transform will display the message's modification time.
        Value = 8192
        See Also:
        Constant Field Values
      • LEVEL_ALL

        public static final int LEVEL_ALL
        Allowed value for the levelFlag formal parameter. Convenience flag to indicate all enabled LEVEL values.
        Value = 65535
        See Also:
        Constant Field Values
      • allowReportExecutionOnDetails

        public FormalParameter allowReportExecutionOnDetails
        Specifies whether the user will be able to execute reports from the report details page.
        Allowed values:
        • true
        • false

        Usage:
        For example, if you allow to execute reports from the details page, then you would specify (true).
      • allowDocumentExecutionOnDetails

        public FormalParameter allowDocumentExecutionOnDetails
        Specifies whether the user will be able to execute documents from the document details page.
        Allowed values:
        • true
        • false

        Usage:
        For example, if you allow to execute documents from the details page, then you would specify (true).
      • maxItemCount

        public FormalParameter maxItemCount
        Specifies the maximum number of objects to be displayed in the history list.
        The default value is -1, which indicates that all the objects will be rendered.
        Usage:
        For example, if you want to show only 5 objects in the history list, you would need to set (5) in this formal parameter.
      • execTarget

        public FormalParameter execTarget
        Determines how the user want's to execute the Report/Document object. If set to "_blank" it will open a new window, if empty the link will be executed in the same window.
      • CSS_MESSAGE_CUBE_SCHEDULED

        public static final java.lang.String CSS_MESSAGE_CUBE_SCHEDULED
        Deprecated.
        Please review the getCssName(com.microstrategy.web.objects.WebMessage) method output for the CSS classes generated by this transform
        Constant used as the CSS class for cube messages originated from a web-schedule
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • CSS_MESSAGE_CUBE_EXECUTING

        public static final java.lang.String CSS_MESSAGE_CUBE_EXECUTING
        Deprecated.
        Please review the getCssName(com.microstrategy.web.objects.WebMessage) method output for the CSS classes generated by this transform
        Constant used as the CSS class for datamart messages that are still executing
        Since:
        MicroStrategy Web 9.0.0
        See Also:
        Constant Field Values
      • CSS_MESSAGE_DOCUMENT_SCHEDULED

        public static final java.lang.String CSS_MESSAGE_DOCUMENT_SCHEDULED
        Deprecated.
        Please review the getCssName(com.microstrategy.web.objects.WebMessage) method output for the CSS classes generated by this transform
        Constant used as the CSS class for html-document messages that were originated from a web-schedule
        See Also:
        Constant Field Values
      • EXEC_TARGET

        public static final java.lang.String EXEC_TARGET
        Constant used as the name for the formal parameter that determines how the user want's to execute the Report/Document object. If set to "_blank" it will open a new window, if empty the link will be executed in the same window.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InboxListXHTMLTransform

        public InboxListXHTMLTransform()
        Default constructor. Initialize all formal parameters
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Returns the descriptor to use in the Style Catalog.
        Specified by:
        getDescription in interface Transform
        Returns:
        "This implements the transform for an Inbox Bean"
      • generateTable

        protected TableTag generateTable()
        Generates a TABLE HTML tag where all the contents of the inbox will be added as rows of this table. Basic HTML attributes are defined to it, such as class.
        Returns:
        a TableTag instance defined, by default no rows or other information are added to it. Methods like generateHeadersRow and generateItems should be called for obtaining the information that shall be added to it.
      • generateColumnGroup

        protected Tag generateColumnGroup()
        Generates a COLGROUP HTML tag with COL tags defined for each one of the columns to be rendered on this transform. For example, the content might look like this:
           <colgroup>
             <col class=typ />
             <col class=nam />
             <col class=sta />
             <col class=mct />
           </colgroup>
         
        Returns:
        Tag instance corresponding to the COLGROUP HTML tag.
      • canExport

        public boolean canExport​(WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • canPDF

        public boolean canPDF​(WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • canShowDetails

        public boolean canShowDetails​(WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • renderSort

        public void renderSort​(MarkupOutput out,
                               int field)
        Deprecated.
        the sort can be rendered using renderSortingTitle(MarkupOutput, int, int)
        Utility method for rendering a sort button linked to the event that triggers it.
        Parameters:
        out - MarkupOutput instance where the contents of this transform will be saved.
        field - integer value that defines the type of sort to be executed if requested
      • renderSortingTitle

        public void renderSortingTitle​(MarkupOutput out,
                                       int name,
                                       int field)
        function for rendering the title with sorting
        Parameters:
        out - MarkupOutput instance where the contents of this transform will be saved.
        name - Integer value that defines the name of title to be executed
        field - Integer value that defines the type of sort to be executed if requested
      • getContextMenuAttributes

        public java.util.Map getContextMenuAttributes​(WebMessage mesg)
        Returns the context-menu specific attributes to assign to the context-menu container
        Parameters:
        mesg -
        Returns:
        Map
        Since:
        MicroStrategy Web 9.0.0
      • getContextMenu

        protected ContextMenu getContextMenu​(WebMessage mesg)
        Return the ContextMenu associated with the object
        Parameters:
        mesg - WebMessage
        Returns:
        ContextMenu ContextMenu
        Since:
        MicroStrategy Web 9.0.0
      • newContext

        protected TransformContext newContext()
        Description copied from class: AbstractAppTransform
        Creates a new instance of a TransformContext. It's used by the getContext method the first time is invoked. Transforms who require to include extra information in the context should create their own TransformContext implementation (possibly a subclass of AppTransformContext) and returns a new instance in this method.
        Overrides:
        newContext in class AbstractAppTransform
        Since:
        MicroStrategy Web 9.0.0
      • generateHeadersRow

        protected RowTag generateHeadersRow()
        Generates a TR HTML tag with TD tags defined for each one of the column headers to be rendered on this transform according to privileges and value assigned to the level formal parameter. For example, the content might look like this:
           <tr>
             <td> </td>
             <td>Name</td>
             <td>Status</td>
             <td>Last Execution Time</td>
           </tr>
         
        Returns:
        RowTag instance corresponding to the TR HTML tag where the headers were defined.
      • getSortEvent

        protected WebEvent getSortEvent()
        Generate the event to be used for commanding the sort of the information present on the inbox.
        Returns:
        WebEvent intialized instance, if the event is supported by the application. By default, returns the EnumInboxBeanEvents.INBOX_EVENT_SORT_MESSAGES event.
      • getRemoveEvent

        protected WebEvent getRemoveEvent()
        Generate the event to be used for commanding the removal of an element listed on the inbox contents.
        Returns:
        WebEvent intialized instance, if the event is supported by the application. By default, returns the EnumInboxBeanEvents.INBOX_EVENT_REMOVE_MESSAGES event.
      • generateItems

        protected RowTag[] generateItems()
        Analyzes all the items available on the inbox to display and generates an array of RowTag instances (corresponding to TR HTML tags) with the information.
        Returns:
        RowTag[] an array of RowTag instances, each one with the information of one message on the inbox being transformed. If no message is found to render, returns a simple row indicating so.
      • renderEmptyList

        public void renderEmptyList​(MarkupOutput out)
      • generateItem

        protected RowTag generateItem​(WebMessage message,
                                      boolean isParent)
        Generates the RowTag instance corresponding to the information of the WebMessage sent in as parameter.
        Parameters:
        message - WebMessage message to render.
        Returns:
        a RowTag (TR HTML tag) with the information about the WebMessage instance requested contained on CellTag child instances. For example, icon image, name, status, etc.
      • renderFormStart

        public void renderFormStart​(MarkupOutput out)
        Renders the FORM tag start information
        Parameters:
        out - MarkupOutput instance where the transform's output will be saved.
      • renderFormEnd

        public void renderFormEnd​(MarkupOutput out)
        Renders the FORM tag end information.
        Parameters:
        out - MarkupOutput instance where the transform's output will be saved.
      • renderEmptySpaceIcon

        public void renderEmptySpaceIcon​(MarkupOutput out)
      • renderExpandMessageIcon

        public void renderExpandMessageIcon​(MarkupOutput out,
                                            WebMessage message)
        Renders the image information required for documents to render a list with their children information.
        Parameters:
        out - MarkupOutput instance where the transform's output will be saved.
        message - WebMessage instance being rendered
      • getFieldCount

        protected int getFieldCount()
        Returns:
        the number fields this transform is displaying, this will depend on the fields that are enabled through the levelFlags formal parameter
      • renderLayeredIconInfo

        public void renderLayeredIconInfo​(MarkupOutput out,
                                          WebMessage message)
        Similar to renderIconInfo(com.microstrategy.web.beans.MarkupOutput, com.microstrategy.web.objects.WebMessage), but instead of generating an IMG tag, having a transparent image as its source and a background image assigned via the CSS style, it will now generate a SPAN tag which will have the same css class defined (where the background image is indicated) and an inner SPAN for the layering effect, in case an additional image has to be included, on top of the original (for example, a shortcut arrow, a red error sign, etc).
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
        Since:
        MicroStrategy Web 9.0.0
      • renderIconInfo

        public void renderIconInfo​(MarkupOutput out,
                                   WebMessage message)
        Write out the image information for a single message. The css class of the image (which defines the GIF to use) is determined by the message type. The image will be rendered as a link if the event according to the object type, provided by the getExecuteEvent() method, is available and gives access to it.
        The image is provided in a CSS file and set on the ImageTag tag so it gets rendered.
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderNameInfo

        public void renderNameInfo​(MarkupOutput out,
                                   WebMessage message)
        Write out the name information for a single message. The name will be rendered as a link if the event according to the object type, provided by the getExecuteEvent() method, is available and gives access to it.
        The link is built using the generateAnchor() method, using the event obtained from the getExecuteEvent() method as an attribute. Once this is done, the title for the message is simply appended to the contents of the tag.
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderRenameWidgets

        public void renderRenameWidgets​(MarkupOutput out,
                                        WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • getEventForMessage

        protected WebEvent getEventForMessage​(WebMessage message)
        Since:
        MicroStrategy Web 8.0.1
      • renderStatusInfo

        public void renderStatusInfo​(MarkupOutput out,
                                     WebMessage message)
        Render the status of the message. If status is "Read" then it also renders a link to mark as unread.
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • canMarkUnread

        public boolean canMarkUnread​(WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • renderStartTimeInfo

        public void renderStartTimeInfo​(MarkupOutput out,
                                        WebMessage message)
        Renders the start request time, ie the time when the job started executing. This is the column used by Microstrategy Web out of the box with title "Message Creation Time".
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderCreateTimeInfo

        public void renderCreateTimeInfo​(MarkupOutput out,
                                         WebMessage message)
        Renders the creation time, ie the time that this Inbox Message was created within the Intelligence Server. An inbox message may be created by starting a new report instance or by duplicating an existing Inbox Message.
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderModificationTimeInfo

        public void renderModificationTimeInfo​(MarkupOutput out,
                                               WebMessage message)
        Renders the message's modification time
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderExportInfo

        public void renderExportInfo​(MarkupOutput out,
                                     WebMessage message)
        Render an icon for exporting the message
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderPDFExportInfo

        public void renderPDFExportInfo​(MarkupOutput out,
                                        WebMessage message)
        Render an icon for exporting to PDF the message
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • renderDetailsInfo

        public void renderDetailsInfo​(MarkupOutput out,
                                      WebMessage message)
        Render an icon with a link for job details
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • generateAnchor

        protected AnchorTag generateAnchor​(WebEvent event)
        Overwrites the parent method by setting special attributes if the event is not provided
        Overrides:
        generateAnchor in class AbstractAppTransform
        Parameters:
        event - WebEvent
        Returns:
        AnchorTag
      • getEditRenameEvent

        public WebEvent getEditRenameEvent​(WebMessage msg)
        Since:
        MicroStrategy Web 9.0.0
      • getRenameEvent

        public WebEvent getRenameEvent()
        Since:
        MicroStrategy Web 9.0.0
      • getEditRenameEvent

        protected WebEvent getEditRenameEvent()
        Since:
        MicroStrategy Web 9.0.0
      • getCancelRenameEvent

        protected WebEvent getCancelRenameEvent()
        Since:
        MicroStrategy Web 9.0.0
      • canRemove

        public boolean canRemove​(WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • renderRemoveInfo

        public void renderRemoveInfo​(MarkupOutput out,
                                     WebMessage message)
        Renders a checkbox so the user can remove the message
        Parameters:
        out - MarkupOutput instance where to save the contents to display
        message - WebMessage instance being rendered
      • getRemoveEvent

        public WebEvent getRemoveEvent​(WebMessage message)
        Since:
        MicroStrategy Web 9.0.0
      • renderFooter

        public void renderFooter​(MarkupOutput out)
        Renders a status bar message for the history list table
        Parameters:
        out - MarkupOutput instance where to save the contents to display
      • getMessageRowCssName

        protected java.lang.String getMessageRowCssName​(WebMessage message)
        Obtain the css to be associated to the message on the table row (TR tag) to generate for it.
        Parameters:
        message - WebMessage instance being analyzed
        Returns:
        String value with the css name to use on the TR tag where this message is being displayed. May return an empty string if no special css is needed for the it.
      • getCssName

        protected java.lang.String getCssName​(WebMessage message)
        Generate the css name to be associated with the message icon, depending on its request type and its current state.
        Parameters:
        message - WebMessage instance being analyzed
        Returns:
        String value with the css name to use for the image of the message being rendered.
      • getDerivedCssName

        protected java.lang.String getDerivedCssName​(WebMessage message)
        Generated a css name to be associated with the message, for cases when a report message is child of a document, or when a document has a children list to be collapsed or expanded.
        Parameters:
        message - WebMessage instance being analyzed
        Returns:
        String value with the css to be used for a secondary image associated with the message being analyzed. It may return an empty string if none is needed.
      • getSupportedBeanType

        public java.lang.Class getSupportedBeanType()
        Get the class of objects this transform is able to handle.
        Specified by:
        getSupportedBeanType in interface Transform
        Overrides:
        getSupportedBeanType in class AbstractAppTransform
        Returns:
        a Class instance with the information about the beans this transform is able to manipulate.
      • getMainTableAttributes

        public java.util.Map getMainTableAttributes()
        Return the Summary Attribute to be used in the table for the transform.
        Returns:
        java.util.Map with the attribute name (as key) and the value.
        Since:
        MicroStrategy Web 8.0.1
      • getMessageAttributes

        public java.util.Map getMessageAttributes​(WebMessage webMessage)
        Return the Summary Attribute to be used in the table for the transform.
        Returns:
        java.util.Map with the attribute name (as key) and the value.
        Since:
        MicroStrategy Web 8.0.1
      • renderRemoveButton

        public void renderRemoveButton​(MarkupOutput out)
        Render the remove button in the inbox page
        Parameters:
        out - - the MarkupOutput instace to append the information
        Since:
        MicroStrategy Web 8.0.1
      • getMessages

        public java.util.ArrayList getMessages()
        Return the list of Inbox Messages
        Returns:
        an ArrayList containing the top level inbox messages.
        Since:
        MicroStrategy Web 8.0.1
      • getChildMessages

        public java.util.ArrayList getChildMessages​(WebMessage message)
        Return the child messages for a Inbox message
        Parameters:
        message - - message you are interested in
        Returns:
        ArrayList of the childMessages
        Since:
        MicroStrategy Web 8.0.1
      • isInboxEmpty

        public boolean isInboxEmpty()
        Returns true if there are no messages in Inbox.
        Returns:
        true if Inbox is empty
        Since:
        MicroStrategy Web 8.0.1
      • canRename

        public boolean canRename​(WebMessage mesg)
        Since:
        MicroStrategy Web 9.0.0
      • renderRenameIcon

        public void renderRenameIcon​(MarkupOutput out,
                                     WebMessage message)
        Since:
        MicroStrategy Web 9.0.0