Class PromptsContainerTransform

    • Field Detail

      • levelFlag

        public FormalParameter levelFlag
        Specifies what prompt region is displayed in report layout.
        In order to allow prompt customization, report layout is broken into 6 displayable prompt regions: Execute buttons, prompt index, prompt summary, prompt question, prompt position and generic error.
        This flag is used as bit-wise value.
        Allowed Values:
          LEVEL_SHOW_EXECUTE_BUTTONS = 0x001
        • LEVEL_SHOW_PROMPT_INDEX = 0x002
        • LEVEL_SHOW_PROMPT_SUMMARY = 0x004
        • LEVEL_SHOW_PROMPT_QUESTIONS = 0x008
        • LEVEL_SHOW_PROMPT_POSITION = 0x010
        • LEVEL_SHOW_GENERIC_ERROR = 0x020
        • LEVEL_SHOW_EXECUTE_BUTTONS_TOP = 0x040
        • LEVEL_SHOW_EXECUTE_BUTTONS_BOTTOM = 0x080
        • LEVEL_SHOW_SAVE_BUTTON = 0x100
        • LEVEL_SHOW_WARNING_HEADER_MSSG = 0x200
        • LEVEL_SHOW_ALL = 0xfff

        Default value is denoted by: EnumPromptLevelFlags.LEVEL_SHOW_ALL & ~ EnumPromptLevelFlags.LEVEL_SHOW_SAVE_BUTTON & ~ EnumPromptLevelFlags.LEVEL_SHOW_WARNING_HEADER_MSSG which indicates to display everything but 'Save' button and 'Warning Header Message' area.
        For complete list, refer to EnumPromptLevelFlags
      • isDhtmlMode

        protected boolean isDhtmlMode
        Returns true if using DHTML. This values is initialized based on the getPromptsBean().getOutputFormat() method.
      • formID

        public FormalParameter formID
        Specifies the name and Id of the HTML form tag in report page.
        All prompts are part of one HTML form, which is submitted as request in order to be processed. This form has a unique name and id for indentifying it when prompt answers are processed. This value is also referenced from the Javascript files
        This flag is used as text value.
      • displayMode

        public FormalParameter displayMode
        Specifies how multiple prompts will be displayed in report layout.
        This only applies when there are multiple prompts defined in given report. Prompts can be shown all or, one by one.
        This flag is used as int value.
        Allowed Values:
          MODE_ALL = 1
        • MODE_ONE_BY_ONE = 2

      • MODE_ALL

        public static final int MODE_ALL
        Indicates that all prompts should be displayed in one page.
        See Also:
        Constant Field Values
      • MODE_ONE_BY_ONE

        public static final int MODE_ONE_BY_ONE
        Indicates that one prompt per page should be displayed.
        See Also:
        Constant Field Values
      • _totalPrompts

        protected int _totalPrompts
        Indicates total of prompts defined in give prompted report.
      • STYLE_NAME_PROPERTY

        protected static final java.lang.String STYLE_NAME_PROPERTY
        Denotes constant for getting prompt's style name.
        See Also:
        Constant Field Values
      • DEFAULT_STYLE

        protected static final java.lang.String DEFAULT_STYLE
        Denotes constant for getting prompt's default style name.
        See Also:
        Constant Field Values
      • blockCount

        public FormalParameter blockCount
        Specifies the number of prompts are displayed per block in report page.
        Only applies when there are multiple prompts defined in given report and when display mode is set to display all prompts in one page. It indicates the number of prompts per block being displayed in page.
        This flag is used as int value.
      • PROMPT_LOADED_ARG

        protected static final java.lang.String PROMPT_LOADED_ARG
        Constant denoting argument for prompt loaded first time.
        See Also:
        Constant Field Values
      • executeButtonLabel

        public FormalParameter executeButtonLabel
        Specifies the ID of the descriptor to use on the button for continue with document processing. The id should be a valid ID in the Resources Bundle.
        The default value is empty, in which case the Transform will use a predetermined value (which might be different between reports and documents). The string value for the formal parameter takes the form mstrWeb.3649
      • _nextPrompt

        protected PromptObject _nextPrompt
        Reference to next prompt in collection of prompts.
      • _previousPrompt

        protected PromptObject _previousPrompt
        Reference to previous prompt in collection of prompts.
      • _firstPrompt

        protected PromptObject _firstPrompt
        Reference to first prompt in collection.
      • _lastPrompt

        protected PromptObject _lastPrompt
        Reference to last prompt in collection.
      • _nextBlockPrompt

        protected PromptObject _nextBlockPrompt
        Reference to next prompt in block.
        Instance used in Incremental fetch when prompts are displayed each one in different page.
      • _previousBlockPrompt

        protected PromptObject _previousBlockPrompt
        Reference to previous prompt in block.
        Instance used in Incremental fetch when prompts are displayed each one in different page.
      • _1ptransImage

        protected java.lang.String _1ptransImage
        Constant indicating source path to a transparent image.
      • renderForm

        public FormalParameter renderForm
        Indicates wheteher the transform will render its own form
      • promptQuestionLevelFlag

        public FormalParameter promptQuestionLevelFlag
        Specifies what sections are displayed in prompt question layout.
        In order to allow prompt customization, prompt question layout is broken into 4 displayable sections: Prompt title, prompt meaning, restriction, prompt content, prompt error and default answer. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as bit-wise value.
        Allowed Values:
          LEVEL_SHOW_TITLE = 0x001
        • LEVEL_SHOW_MEANING = 0x002
        • LEVEL_SHOW_RESTRICTION = 0x004
        • LEVEL_SHOW_CONTENT = 0x008
        • LEVEL_SHOW_ERROR = 0x010
        • LEVEL_SHOW_DEFAULT_ANSWER = 0x020
        • LEVEL_SHOW_TITLE_BACKTOTOP = 0x040

        For complete list, refer to EnumPromptLevelFlags
      • multiplePromptCssFile

        public FormalParameter multiplePromptCssFile
        Specifies the css file to use if it's multiple prompt information that requires to be rendered.
        This css file will be used together with the one indicated on the cssFile formal parameter.
      • incrementalAttrElemBlockCount

        public FormalParameter incrementalAttrElemBlockCount
        Specifies the maximum number of attribute elements to be displayed in available list when incremental fetch is available.
        Only applies in Element prompts. Prompt styles, such as list and radio button, are governed by this flag, even though they don't provide any incremental fetch functionality. This value is ignored by other prompt types and it gets by a Web preference end-user can edit. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as int value.
        For more detailed information, please refer to Web preferences documentation. See Project defaults/General section, at Incremental fetch preference: "Maximum number of report objects per block".
      • incrementalObjectsBlockCount

        public FormalParameter incrementalObjectsBlockCount
        Specifies the maximum number of objects (attributes, attribute forms and metrics) to be displayed in available list when incremental fetch is available.
        Only applies in Object and Expression prompts. Prompt styles, such as list and radio button, are governed by this flag, even though they don't provide any incremental fetch functionality. This value is ignored by other prompt types and it gets set by a Web preference end-user can edit. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as int value.
        For more detailed information, please refer to Web preferences documentation. See Project defaults/General section, at Incremental fetch preference: "Maximum number of attributes per block".
      • showExecuteAtTop

        protected FormalParameter showExecuteAtTop
        Specifies whether or not to show an 'Execute' button at the top of the list of Prompts.
        This flag is used as int value. Possible values are defined in EnumPromptLevelFlags enumeration.
        Allowed Values:
          LEVEL_DISPLAY_ELEMENT_YES = 1
        • LEVEL_DISPLAY_ELEMENT_NO = 2
        • LEVEL_DISPLAY_ELEMENT_USE_DEFAULT = 3

      • showExecuteAtBottom

        protected FormalParameter showExecuteAtBottom
        Specifies whether or not to show an 'Execute' button at the bottom of the list of Prompts.
        This flag is used as int value. Possible values are defined in EnumPromptLevelFlags enumeration.
        Allowed Values:
          LEVEL_DISPLAY_ELEMENT_YES = 1
        • LEVEL_DISPLAY_ELEMENT_NO = 2
        • LEVEL_DISPLAY_ELEMENT_USE_DEFAULT = 3

      • showRequired

        public FormalParameter showRequired
        Specifies whether or not to show required message in prompt question title.
        Per default, all prompts defined as required, display a "Required" message at the end of the prompt title. This flag will overrule this layout requirement by not displaying this message even though prompt is required. This value is propagated to corresponding prompt transform(s), meaning that will affect all prompts in a given report.
        This flag is used as boolean value.
      • _promptStyleBeans

        protected java.util.List _promptStyleBeans
      • _renderProcessEvent

        protected boolean _renderProcessEvent
      • showSaveReportButton

        public FormalParameter showSaveReportButton
        Indicates whether or not to display 'Save' button.
      • canCancelPrompt

        public FormalParameter canCancelPrompt
        Indicates whether the cancel prompt button is displayed
      • _folderContextList

        protected java.util.List _folderContextList
      • _folderContextCurrentPath

        protected java.lang.String _folderContextCurrentPath
    • Constructor Detail

      • PromptsContainerTransform

        public PromptsContainerTransform()
        Default no-args constructor.
        Initialize all Formal Parameters.
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Returns description for this Transform.
        Specified by:
        getDescription in interface Transform
        Returns:
        "This is the Transform that renders Prompts in the Application."
      • processIframeRequest

        protected void processIframeRequest​(MarkupOutput out)
                                     throws java.lang.IllegalStateException,
                                            java.lang.IllegalArgumentException
        Process action from Report where user added a prompted metric to Filter.
        Event is generated within Executed report. Most likely, end-user added a metric associated with a prompt. This required to execute given prompt.
        Parameters:
        out - MarkupOutput where to write output
        Throws:
        java.lang.IllegalStateException - if any
        java.lang.IllegalArgumentException - if any.
      • isAddDatasetInRequest

        protected boolean isAddDatasetInRequest()
        Indicates if in the request is an 'Add dataset' request.
        Likely, this prompt was induced by adding a prompted dataset in a running RW document.
        Returns:
        true if request is an action performed in the hierarchical tree prompt.
      • getIsDatasetAddedArgumentName

        protected java.lang.String getIsDatasetAddedArgumentName()
        Indicates Argument name for specifying whether or not 'Adding Dataset' functionality was executed.
        Returns:
        String argument found in request.
      • isForDefinition

        public boolean isForDefinition()
        Returns whether current transform is for editing a prompt.
        Returns:
        true returned in prompt editing case. false returned in prompt runtime.
      • isForSubscription

        public boolean isForSubscription()
        Returns whether current transform is for answering prompt in an subscription editor.
        Returns:
        true returned if prompt being answered in subscription page; false returned otherwise.
      • getAnswerEvent

        protected WebEvent getAnswerEvent()
        Returns Prompt's answer event.
        Returns:
        WebEvent instance for Answer
      • getPromptsAppContext

        protected AppContext getPromptsAppContext()
        Returns instance of AppContext.
        AppContext instance is derived from existing Prompt's bean context.
        Returns:
        instance of AppContext
      • getDecimalSeparator

        protected java.lang.String getDecimalSeparator()
        Indicates current decimal separator for active Locale.
        Returns:
        String decimal separator.
      • isOneByOneDisplayMode

        public boolean isOneByOneDisplayMode()
        Indicates whether or not prompts should be rendered on the same page.
        Returns:
        boolean true indicating all prompts are to be rendered in same page.
      • getAnchorPinFromRequest

        protected java.lang.String getAnchorPinFromRequest()
        Indicates prompt position based on GUI action.
        There are actions specific to GUI and not to Prompt's events such as switching from 'Qualify' to 'Select' in Hierarchical prompts. For such cases, prompt position remains the last one which couldn't be the prompt being edited.
        This function will get prompt position being edited from request by looking up any of the GUI specific actions.
        Returns:
        String prompt position.
      • getCancelEvent

        protected WebEvent getCancelEvent()
        Returns Prompt's cancel event.
        This event will be determined based on parent Bean type. Cancel event will be obtained from either a DocumentBean or RWBean or ReportBean instance.
        Cancel event will be either one for canceling Re-prompting or regular Prompted execution.
        Overrides:
        getCancelEvent in class AbstractAppTransform
        Returns:
        WebEvent for cancel event.
      • getSaveEvent

        protected WebEvent getSaveEvent()
        Returns an event for saving prompted report or RWD or HTML document.
        Returns:
        WebEvent where to write the output of the method.
      • canSavePrompt

        public boolean canSavePrompt()
        Indicates whether or not end-user is enabled to save given Prompted Report.
        Useful to determine whether or not to displaye 'Save' button in Prompt page.
        Returns:
        true if user has proper permissions.
      • getExecuteButtonLabel

        public java.lang.String getExecuteButtonLabel()
        Specifies label to be displayed in 'Execute' button.
        By default there are two possible labels: 'Run Report' or 'Run Document', based on the PromptsBean parent bean type.
        However, the label to use can be controlled through the executeButtonLabel formal parameter. If a value has been specified, this method will return the corresponding string from the Resources-Bundle.
        Returns:
        String localized message.
      • isPromptSummaryViewable

        public boolean isPromptSummaryViewable()
        Indicates whether or not the Prompt container is Summary mode.
        Prompt summary page is rendered if user has requested it. This transform has a request property which indicates what mode Prompt container should be rendered like, either 'Summary' or 'Questions'.
        Returns:
        true if current prompt page is 'Summary' mode.
      • displayPromptOneByOne

        public boolean displayPromptOneByOne()
        Indicates whether or not to display prompts one by one.
        Returns:
        true when only one prompt is to be displayed in a page.
      • isMultiplePrompt

        public boolean isMultiplePrompt()
        Indicates whether or not given report is consisted of more than one prompt.
        Returns:
        true when collection of prompts exceeds more than one.
      • isReprompted

        public boolean isReprompted()
        Retrieves the value 'isReprompted' from the WebResultSetInstance This allows us to read the reprompt propery from an SDK object rather than passing a property in the request.
        Returns:
        boolean
      • isItemKeptInCartAvailable

        public boolean isItemKeptInCartAvailable()
        Indicates property value for whether or not selected item in cart's 'From' list should be removed.
        Value is read from Preference object.
        Returns:
        boolean, true if item is to be removed.
      • isMatchCaseShown

        public boolean isMatchCaseShown()
        Indicates property value for whether or not match case should be shown.
        Value is read from Preference object.
        Returns:
        boolean, true if match case is to be shown.
      • areRequiredPromptsShownFirst

        protected boolean areRequiredPromptsShownFirst()
        Initializes property indicating whether or not Required prompts are displayed first.
        Value is read from Preference object.
      • initializeTransformForPromptsBean

        public void initializeTransformForPromptsBean​(Transformable data)
      • 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.
      • renderPromptAnchor

        public void renderPromptAnchor​(MarkupOutput out,
                                       PromptAppBean promptStyleBean)
        Renders an anchor for each prompt so it is easily accessible from the Summary Section.
        Parameters:
        out - MarkupOutput where the contents to be rendered.
        promptStyleBean - PromptObject current prompt being rendered.
      • renderPromptNumber

        public void renderPromptNumber​(MarkupOutput out,
                                       PromptAppBean promptStyleBean)
        Renders the prompt number which is displayed along each prompt question.
        Parameters:
        out - MarkupOutput where the contents to render will be rendered.
        promptStyleBean - PromptObject current prompt being rendered.
      • isPromptStyleBeanOpen

        public boolean isPromptStyleBeanOpen​(PromptAppBean promptAppBean)
      • getTotalOpenPrompts

        protected int getTotalOpenPrompts()
      • getPromptPageWidget

        public Block getPromptPageWidget​(PromptAppBean promptStyleBean,
                                         boolean forModel)
        Entry point for widget transform
      • previousButtonVisible

        public boolean previousButtonVisible()
      • nextButtonVisible

        public boolean nextButtonVisible()
      • numOfPromptsPerPage

        public int numOfPromptsPerPage()
      • getCurrentPromptPosition

        public int getCurrentPromptPosition()
        0 based. If no error, the return value should be 0. If there is an error for a prompt, the return the first error prompt position.
      • getPromptsBeanPath

        public java.lang.String getPromptsBeanPath()
      • getContainerBeanType

        public int getContainerBeanType()
      • getRootFolderId

        public java.lang.String getRootFolderId()
      • getNamedFolderId

        public java.lang.String getNamedFolderId​(int id)
        Returns MicroStrategy DSSID for the corresponding named folder.
        Parameters:
        id - An value from EnumDSSXMLFolderNames
        Returns:
        A string represents the DSSID of the named folder. If for any reason, the DSSID can not be figured out, an empty string will be returned.
      • renderLocaleID

        public void renderLocaleID​(MarkupOutput out)
      • renderNumberAndDateFormatDescriptor

        public void renderNumberAndDateFormatDescriptor​(MarkupOutput out,
                                                        int desc)
      • renderDecimalSep

        public void renderDecimalSep​(MarkupOutput out)
      • renderThousandSep

        public void renderThousandSep​(MarkupOutput out)
      • renderDateFormatPattern

        public void renderDateFormatPattern​(MarkupOutput out)
      • renderDateInputFormats

        public void renderDateInputFormats​(MarkupOutput out)
      • renderTimeInputFormats

        public void renderTimeInputFormats​(MarkupOutput out)
      • renderNumberInputFormats

        public void renderNumberInputFormats​(MarkupOutput out)
      • renderIntegerInputFormats

        public void renderIntegerInputFormats​(MarkupOutput out)
      • renderDateOutputFormat

        public void renderDateOutputFormat​(MarkupOutput out)
      • renderTimeOutputFormat

        public void renderTimeOutputFormat​(MarkupOutput out)
      • renderNumberOutputFormat

        public void renderNumberOutputFormat​(MarkupOutput out)
      • renderIntegerOutputFormat

        public void renderIntegerOutputFormat​(MarkupOutput out)
      • renderMetricValidationLevel

        public void renderMetricValidationLevel​(MarkupOutput out)
      • isNull

        public boolean isNull​(java.lang.Object obj)
        Returns whether the input argument is null.
        Parameters:
        obj - The object to check again null
        Returns:
        true if the input is null, otherwise false is returned.
      • renderAQListOperators

        public void renderAQListOperators​(MarkupOutput out)
      • shouldRenderCalendar

        public boolean shouldRenderCalendar()
      • shouldRenderDimtyPopUp

        public boolean shouldRenderDimtyPopUp()
      • shouldDisplayRenameMessage

        public boolean shouldDisplayRenameMessage()
      • renderPreferenceValue

        public void renderPreferenceValue​(MarkupOutput out,
                                          java.lang.String prefName)
      • canDisplayIncrementalFetchButtons

        public boolean canDisplayIncrementalFetchButtons()
      • getPromptFormID

        public java.lang.String getPromptFormID()
      • getFormAttributes

        public java.util.Map getFormAttributes()
      • canCancelPrompt

        public boolean canCancelPrompt()
      • renderAutoExpandOnDrill

        public void renderAutoExpandOnDrill​(MarkupOutput out)
      • getMaxUploadFileSize

        public int getMaxUploadFileSize()
      • getCssName

        public java.lang.String getCssName​(WebObjectInfo object)
      • getAttForms

        public java.util.List getAttForms​(WebAttribute att)
      • includeTimeInfo

        public boolean includeTimeInfo()
      • includeOwnerInfo

        public boolean includeOwnerInfo()
      • isShowObjectTags

        public boolean isShowObjectTags()
      • getFlattenedContextFolderList

        public java.util.List getFlattenedContextFolderList​(int contextId)
      • getFlattenedContextFolderPath

        public java.lang.String getFlattenedContextFolderPath​(int contextId)
      • buildFlattenedContextFolderList

        protected void buildFlattenedContextFolderList​(int contextId)