Class LoginTransform

  • All Implemented Interfaces:
    AppTransform, Transform
    Direct Known Subclasses:
    LoginXHTMLTransform

    public class LoginTransform
    extends AbstractAppTransform
    This transform renders the login dialog to the user, displaying the different options according to what the Administrator has marked as enabled for users given the IServer and Project selected.
    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Field Detail

      • _fpImgUpLeft

        public FormalParameter _fpImgUpLeft
        Indicates the image to be displayed at the top left corner of the login box. The value to indicate should be a valid image file name, with any necessary path information not included already on the resourcesFolderImage application configuration parameter. Users might want to customize the default value of this formal parameter if the background colors on the login dialog are changed since the default image represents a gray curved corner.
      • _fpImgUpRight

        public FormalParameter _fpImgUpRight
        Indicates the image to be displayed at the top right corner of the login box. The value to indicate should be a valid image file name, with any necessary path information not included already on the resourcesFolderImage application configuration parameter. Users might want to customize the default value of this formal parameter if the background colors on the login dialog are changed since the default image represents a gray curved corner.
      • _fpImgLowLeft

        public FormalParameter _fpImgLowLeft
        Indicates the image to be displayed at the bottom left corner of the login box. The value to indicate should be a valid image file name, with any necessary path information not included already on the resourcesFolderImage application configuration parameter. Users might want to customize the default value of this formal parameter if the background colors on the login dialog are changed since the default image represents a gray curved corner.
      • _fpImgLowRight

        public FormalParameter _fpImgLowRight
        Indicates the image to be displayed at the bottom right corner of the login box. The value to indicate should be a valid image file name, with any necessary path information not included already on the resourcesFolderImage application configuration parameter. Users might want to customize the default value of this formal parameter if the background colors on the login dialog are changed since the default image represents a gray curved corner.
      • FP_IMAGE_UP_LEFT_CORNER

        public static final java.lang.String FP_IMAGE_UP_LEFT_CORNER
        Name of the formal parameter that represents the image to be displayed at the top left corner of the login box. Value is imgUpLeft.
        See Also:
        Constant Field Values
      • FP_IMAGE_UP_RIGHT_CORNER

        public static final java.lang.String FP_IMAGE_UP_RIGHT_CORNER
        Name of the formal parameter that represents the image to be displayed at the top right corner of the login box. Value is imgUpRight.
        See Also:
        Constant Field Values
      • FP_IMAGE_LOW_LEFT_CORNER

        public static final java.lang.String FP_IMAGE_LOW_LEFT_CORNER
        Name of the formal parameter that represents the image to be displayed at the bottom left corner of the login box. Value is imgLowLeft.
        See Also:
        Constant Field Values
      • FP_IMAGE_LOW_RIGHT_CORNER

        public static final java.lang.String FP_IMAGE_LOW_RIGHT_CORNER
        Name of the formal parameter that represents the image to be displayed at the bottom right corner of the login box. Value is imgLowRight.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LoginTransform

        public LoginTransform()
        Default constructor. Initializes formal parameters.
    • Method Detail

      • renderProjectSection

        public void renderProjectSection​(MarkupOutput out)
        Render the project information available.
        Parameters:
        out - a MarkupOutput instance where to save the HTML to render
        Since:
        MicroStrategy Web 8.0.0
      • renderServerSection

        public void renderServerSection​(MarkupOutput out)
        Render the server information available
        Parameters:
        out - a MarkupOutput instance where to save the HTML to render
        Since:
        MicroStrategy Web 8.0.0
      • isAutoCompleteEnabled

        public boolean isAutoCompleteEnabled()
        Utility method to verify if autocomplete is enabled on login for security reasons
        Returns:
        boolean value indicating if autocomplete is enabled according to the security settings.
        Since:
        MicroStrategy Web 7.5.3
      • renderGuestAuthenticationLink

        public void renderGuestAuthenticationLink​(MarkupOutput out,
                                                  WebEvent event)
        Render the link for guest authentication to show to users for log into a project
        Parameters:
        out - a MarkupOutput instance where to save the HTML to render
        event - a WebEvent instance with the details to be used when creating the link for this authentication mode
      • renderSSPAuthenticationLink

        public void renderSSPAuthenticationLink​(MarkupOutput out,
                                                WebEvent event)
        Since:
        MicroStrategy Web 9.0.0
      • renderWindowsAuthenticationLink

        public void renderWindowsAuthenticationLink​(MarkupOutput out,
                                                    WebEvent event)
        Render the link for Windows (NT) authentication to show to users for log into a project
        Parameters:
        out - a MarkupOutput instance where to save the HTML to render
        event - a WebEvent instance with the details to be used when creating the link for this authentication mode
      • renderNTGuestLoginSection

        public void renderNTGuestLoginSection​(MarkupOutput out,
                                              LoginBean bean,
                                              WebEvent loginEvent,
                                              WebEvent cancelEvent)
        Deprecated.
        use renderNTGuestLoginSection(MarkupOutput out) instead. The bean and event information will be calculated internally.
        Generates the HTML to present the user with the options for logging into a project with NT and/or Guest authentication modes, according to what the Administrator enabled.
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        bean - LoginBean instance being transformed
        loginEvent - WebEvent to be used for logging the user in
        cancelEvent - WebEvent to be used if the user cancels the login request.
      • renderNTGuestLoginSection

        public void renderNTGuestLoginSection​(MarkupOutput out)
        Generates the HTML to present the user with the options for logging into a project with NT and/or Guest authentication modes, according to what the Administrator enabled.
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        Since:
        MicroStrategy Web 8.0.0
      • renderLoginDialog

        public void renderLoginDialog​(MarkupOutput out,
                                      LoginBean bean)
        Deprecated.
        use renderLoginDialog(MarkupOutput out) instead. The bean information will be calculated internally.
        Render the actual login dialog. It will present the user the different login options depending on what the Administrator has enabled. The contents are rendered using an HTML TABLE for formatting purposes, controlling its width and number of columns based on the authentication modes enabled.
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        bean - LoginBean instance being transformed
      • renderLoginDialog

        public void renderLoginDialog​(MarkupOutput out)
        Render the actual login dialog. It will present the user the different login options depending on what the Administrator has enabled. The contents are rendered using an HTML TABLE for formatting purposes, controlling its width and number of columns based on the authentication modes enabled.
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        Since:
        MicroStrategy Web 8.0.0
      • renderLoginDialogHeader

        public void renderLoginDialogHeader​(MarkupOutput out,
                                            LoginBean bean)
        Deprecated.
        use renderLoginDialogHeader(MarkupOutput out) instead. The bean information will be calculated internally.
        Render the header in the table of the login dialog as an HTML TR element. The cells to generate will depend on the login modes enabled. The parent TABLE should be opened beforehand (by default, renderLoginDialog takes care of that).
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        bean - LoginBean instance being transformed
      • renderLoginDialogHeader

        public void renderLoginDialogHeader​(MarkupOutput out)
        Render the header in the table of the login dialog as an HTML TR element. The cells to generate will depend on the login modes enabled. The parent TABLE should be opened beforehand (by default, renderLoginDialog takes care of that).
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        Since:
        MicroStrategy Web 8.0.0
      • renderLoginDialogFooter

        public void renderLoginDialogFooter​(MarkupOutput out,
                                            LoginBean bean)
        Deprecated.
        use renderLoginDialogFooter(MarkupOutput out) instead. The bean information will be calculated internally.
        Render the footer in the table of the login dialog as an HTML TR element. The cells to generate will depend on the login modes enabled. The parent TABLE should be opened beforehand (by default, renderLoginDialog takes care of that).
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        bean - LoginBean instance being transformed
      • renderLoginDialogFooter

        public void renderLoginDialogFooter​(MarkupOutput out)
        Render the footer in the table of the login dialog as an HTML TR element. The cells to generate will depend on the login modes enabled. The parent TABLE should be opened beforehand (by default, renderLoginDialog takes care of that).
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        Since:
        MicroStrategy Web 8.0.0
      • renderStandardLoginSection

        public void renderStandardLoginSection​(MarkupOutput out,
                                               LoginBean bean,
                                               WebEvent loginEvent,
                                               WebEvent cancelEvent)
        Deprecated.
        use renderLoginDialogFooter(MarkupOutput out) instead. The bean and event information will be calculated internally.
        Generates the HTML to present the user with the options for logging into a project with the authentication modes that require entering user name and password, according to what the Administrator enabled. Typically, this will render Standard, Pass-Through and LDAP authentication modes.
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        bean - LoginBean instance being transformed
        loginEvent - WebEvent to be used for logging the user in
        cancelEvent - WebEvent to be used if the user cancels the login request.
      • renderStandardLoginSection

        public void renderStandardLoginSection​(MarkupOutput out)
        Generates the HTML to present the user with the options for logging into a project with the authentication modes that require entering user name and password, according to what the Administrator enabled. Typically, this will render Standard, Pass-Through and LDAP authentication modes.
        Parameters:
        out - MarkupOutput instance where to save the contents to render
        Since:
        MicroStrategy Web 8.0.0
      • getLoginBean

        public LoginBean getLoginBean()
        Get the LoginBean instance being transformed
        Returns:
        the current LoginBean instance being transformed
      • getDescription

        public java.lang.String getDescription()
        Returns the textual description of the transform
        Returns:
        the description of the transform
      • getLoginEvent

        protected WebEvent getLoginEvent​(LoginBean bean)
        Generate the WebEvent instance to be used for login.
        Parameters:
        bean - LoginBean instance currently being transformed
        Returns:
        a WebEvent instance initialized with the information required for allowing users to login.
      • getCancelEvent

        protected WebEvent getCancelEvent​(LoginBean bean)
        Generate the WebEvent instance to be used when users cancel the request to login.
        Parameters:
        bean - LoginBean instance currently being transformed
        Returns:
        a WebEvent instance initialized with the information required for allowing users to cancel the login. By default, if the environment is "login first" it will not return an event since going Home (default event returned) will only bring back the login page again.
      • getHelpEvent

        protected WebEvent getHelpEvent​(LoginBean bean)
        Generate the WebEvent instance to be used when users requests for help when login.
        Parameters:
        bean - LoginBean instance currently being transformed
        Returns:
        a WebEvent instance initialized with the information required for allowing users to access help.
        Since:
        MicroStrategy Web 8.0.0
      • getLoginEventFormAction

        protected java.lang.String getLoginEventFormAction​(LoginBean bean,
                                                           WebEvent event,
                                                           int eventEnabled)
        For the event to use for login, if the user has enabled to keep the information of the current session available on the URL, then we need to pass these details on the URL (form ACTION attribute) since otherwise users won't be able to bookmark the resulting page after login. We will enable this only when the event to execute after login is the one indicated by eventEnabled.
        Parameters:
        bean - LoginBean currently being transformed
        event - WebEvent generated for enabling the user to log in
        eventEnabled - int value indicating for which event we will be generating the form ACTION information. Usually EnumServletEvents.WebEventOpenDesktop
        Returns:
        a String with the information to use for the form ACTION attribute. null if none should be used - and the information shall be included as hidden inputs.
      • getArgumentName

        protected java.lang.String getArgumentName​(WebEvent event,
                                                   int argumentId)
        Get the name of the argument assigned to the WebEvent, based on the indicated id. This method can be overwritten with an event-argumentId mapping in case the original event defined on the application is customized.
        Overrides:
        getArgumentName in class AbstractAppTransform
        Parameters:
        event - WebEvent from where the argument name will be retrieved
        argumentId - int with the identifier of the argument to search for on the event
        Returns:
        the corresponding name of the event for the specified id. If it is not found, it will return null.
      • isLoginFirst

        protected boolean isLoginFirst()
        Utility method that determines if the environment currently defined by the administrator is set as login first.
        Returns:
        a boolean value indicating if the user should log in first before showing projects or not.
        Since:
        MicroStrategy Web 7.5.4
      • renderPortletWarning

        public void renderPortletWarning​(MarkupOutput out)