Class UserNameTag

  • All Implemented Interfaces:
    javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag

    public class UserNameTag
    extends javax.servlet.jsp.tagext.SimpleTagSupport
    This tag prints out the full name of a given user. Yet, it prints the user name and uses the Silverpeas userzoom javascript plugin to render its status and to provide a way for interacting with him. If the user is the current one behind the HTTP session, then by default the user zoom isn't activated.
    Author:
    mmoquillon
    • Constructor Detail

      • UserNameTag

        public UserNameTag()
    • Method Detail

      • getUserId

        public String getUserId()
        Gets the unique identifier of the user concerned by this tag.
        Returns:
        the user unique identifier.
      • setUserId

        public void setUserId​(String userId)
        Sets the unique identifier of the user whose the name has to be printed out.
        Parameters:
        userId - the user unique identifier.
      • getUser

        public User getUser()
        Gets the user concerned by this tag.
        Returns:
        the user.
      • setUser

        public void setUser​(User user)
        Sets the user whose the name has to be printed out.
        Parameters:
        user - the user.
      • isZoom

        public boolean isZoom()
        Is the user zoom to be used with this user? By default the user zoom is used. This method is to force the deactivation of the user zoom feature.
        Returns:
        true if the user zoom is activated, false otherwise.
      • setZoom

        public void setZoom​(boolean zoom)
        Sets explicitly the use or not of the user zoom.
        Parameters:
        zoom - true if the user zoom has to be used (default behaviour), false otherwise.
      • doTag

        public void doTag()
        Specified by:
        doTag in interface javax.servlet.jsp.tagext.SimpleTag
        Overrides:
        doTag in class javax.servlet.jsp.tagext.SimpleTagSupport
      • getCurrentUserIdInSession

        protected String getCurrentUserIdInSession()
      • getOut

        protected javax.servlet.jsp.JspWriter getOut()