Class LoginTag

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class LoginTag
    extends javax.servlet.jsp.tagext.TagSupport
    Author:
    Olivier Jaquemet
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String css  
      protected boolean displayLogin  
      protected boolean displayLogout  
      protected boolean displaySuLogin  
      protected boolean displaySuLogout  
      protected JcmsJspContext jcmsContext  
      protected java.lang.String loginIcon  
      protected boolean loginIconProvided  
      protected java.lang.String logoutIcon  
      protected boolean logoutIconProvided  
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      LoginTag()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clean()  
      int doEndTag()  
      int doStartTag()  
      java.lang.String getCss()  
      java.lang.String getLoginIcon()  
      java.lang.String getLogoutIcon()  
      protected void initIcons()  
      void printLogin​(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember, boolean displayLinkText)
      Prints the login link (icon) to the given string buffer in the given userLang.
      void printLoginSuMenu​(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember)
      Prints the su login context menu links to the given string buffer in the given userLang.
      If the loggedMember has some delegation.
      void printLogout​(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember, boolean displayLinkText)
      Prints the logout link (icon) to the given string buffer in the given userLang.
      void printLogoutSuMenu​(java.lang.StringBuffer sb, javax.servlet.http.HttpServletRequest request, java.lang.String userLang, Member loggedMember)
      Prints the logout context menu links to the given string buffer in the given userLang.
      If the current session has some su history.
      void setCss​(java.lang.String css)  
      void setDisplayLinkText​(boolean b)  
      void setDisplayLogin​(boolean displayLogin)  
      void setDisplayLogout​(boolean displayLogout)  
      void setDisplaySuLogin​(boolean displaySuLogin)  
      void setDisplaySuLogout​(boolean displaySuLogout)  
      void setLoginIcon​(java.lang.String customLoginIcon)  
      void setLogoutIcon​(java.lang.String customLogoutIcon)  
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • loginIcon

        protected java.lang.String loginIcon
      • logoutIcon

        protected java.lang.String logoutIcon
      • loginIconProvided

        protected boolean loginIconProvided
      • logoutIconProvided

        protected boolean logoutIconProvided
      • css

        protected java.lang.String css
      • displayLogin

        protected boolean displayLogin
      • displayLogout

        protected boolean displayLogout
      • displaySuLogin

        protected boolean displaySuLogin
      • displaySuLogout

        protected boolean displaySuLogout
    • Constructor Detail

      • LoginTag

        public LoginTag()
    • Method Detail

      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.TagSupport
        Throws:
        javax.servlet.jsp.JspException
      • doEndTag

        public int doEndTag()
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.TagSupport
      • clean

        public void clean()
      • initIcons

        protected void initIcons()
      • setDisplayLinkText

        public void setDisplayLinkText​(boolean b)
      • printLogin

        public void printLogin​(java.lang.StringBuffer sb,
                               javax.servlet.http.HttpServletRequest request,
                               java.lang.String userLang,
                               Member loggedMember,
                               boolean displayLinkText)
        Prints the login link (icon) to the given string buffer in the given userLang.
        Parameters:
        sb - the StringBuffer in which HTML will be printed
        request - current HttpServletRequest
        userLang - the userLang in which to I18N text
        loggedMember - current loggedMember
        displayLinkText - whether the text normally used for alternative and title text of the icon should also be displayed in the generated link.
      • printLogout

        public void printLogout​(java.lang.StringBuffer sb,
                                javax.servlet.http.HttpServletRequest request,
                                java.lang.String userLang,
                                Member loggedMember,
                                boolean displayLinkText)
        Prints the logout link (icon) to the given string buffer in the given userLang.
        Parameters:
        sb - the StringBuffer in which HTML will be printed
        request - current HttpServletRequest
        userLang - the userLang in which to I18N text
        loggedMember - current loggedMember
        displayLinkText - whether the text normally used for alternative and title text of the icon should also be displayed in the generated link.
      • printLoginSuMenu

        public void printLoginSuMenu​(java.lang.StringBuffer sb,
                                     javax.servlet.http.HttpServletRequest request,
                                     java.lang.String userLang,
                                     Member loggedMember)
        Prints the su login context menu links to the given string buffer in the given userLang.
        If the loggedMember has some delegation.
        Parameters:
        sb - the StringBuffer in which HTML will be printed
        request - current HttpServletRequest
        userLang - the userLang in which to I18N text
        loggedMember - current loggedMember
      • printLogoutSuMenu

        public void printLogoutSuMenu​(java.lang.StringBuffer sb,
                                      javax.servlet.http.HttpServletRequest request,
                                      java.lang.String userLang,
                                      Member loggedMember)
        Prints the logout context menu links to the given string buffer in the given userLang.
        If the current session has some su history.
        Parameters:
        sb - the StringBuffer in which HTML will be printed
        request - current HttpServletRequest
        userLang - the userLang in which to I18N text
        loggedMember - current loggedMember
      • setLoginIcon

        public void setLoginIcon​(java.lang.String customLoginIcon)
      • setLogoutIcon

        public void setLogoutIcon​(java.lang.String customLogoutIcon)
      • getLoginIcon

        public java.lang.String getLoginIcon()
      • getLogoutIcon

        public java.lang.String getLogoutIcon()
      • getCss

        public java.lang.String getCss()
      • setCss

        public void setCss​(java.lang.String css)
      • setDisplayLogin

        public void setDisplayLogin​(boolean displayLogin)
      • setDisplayLogout

        public void setDisplayLogout​(boolean displayLogout)
      • setDisplaySuLogin

        public void setDisplaySuLogin​(boolean displaySuLogin)
      • setDisplaySuLogout

        public void setDisplaySuLogout​(boolean displaySuLogout)