Class CmsUserDataRequestInfo


  • public class CmsUserDataRequestInfo
    extends java.lang.Object
    The stored information about a user data request.

    This contains both the user data itself, as well as authentication information, for making sure the information can not just be automatically downloaded by someone intercepting the email sent to the user.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String A_AUTH
      JSON key.
      static java.lang.String A_CONTENT
      JSON key.
      static java.lang.String A_EMAIL
      JSON key.
      static java.lang.String A_EXPIRATION
      JSON key.
      static java.lang.String A_ID
      JSON key.
      static java.lang.String A_TYPE
      JSON key.
      static java.lang.String A_USERIDS
      JSON key.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsUserDataRequestInfo()
      Creates a new user data request object.
      CmsUserDataRequestInfo​(java.lang.String data)
      Creates a new instance from the JSON data in a string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkAuthCode​(java.lang.String auth)
      Checks that the given authorization code matches the one stored in this object.
      java.lang.String getAuthCode()
      Gets the authorization code.
      java.lang.String getEmail()
      Gets the email address.
      long getExpiration()
      Gets the expiration date as a long.
      java.lang.String getId()
      Gets the id of the user data request.
      java.lang.String getInfoHtml()
      Gets the user data HTML text.
      CmsUserDataRequestType getType()
      Gets the user data request type (single user or email).
      java.lang.String getUserName()
      Gets the full user name.
      boolean isExpired()
      Returns true if the user data request has expired.
      void setAuth​(java.lang.String auth)
      Sets the authorization code.
      void setEmail​(java.lang.String email)
      Sets the email address.
      void setExpiration​(long expiration)
      Sets the expiration date.
      void setId​(java.lang.String id)
      Sets the id.
      void setInfoHtml​(java.lang.String infoHtml)
      Sets the user data HTML.
      void setType​(CmsUserDataRequestType type)
      Sets the user data request type.
      void setUser​(java.lang.String user)
      Sets the full user name.
      java.lang.String toJson()
      Formats this object as JSON text.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • checkAuthCode

        public boolean checkAuthCode​(java.lang.String auth)
        Checks that the given authorization code matches the one stored in this object.
        Parameters:
        auth - the authorization code
        Returns:
        true if the code matches
      • getAuthCode

        public java.lang.String getAuthCode()
        Gets the authorization code.
        Returns:
        the authorization code
      • getEmail

        public java.lang.String getEmail()
        Gets the email address.
        Returns:
        the email address
      • getExpiration

        public long getExpiration()
        Gets the expiration date as a long.
        Returns:
        the expiration date
      • getId

        public java.lang.String getId()
        Gets the id of the user data request.
        Returns:
        the id
      • getInfoHtml

        public java.lang.String getInfoHtml()
        Gets the user data HTML text.
        Returns:
        the user data HTML text
      • getUserName

        public java.lang.String getUserName()
        Gets the full user name.

        This is not set in case of email-only user data requests.

        Returns:
        the full user name
      • isExpired

        public boolean isExpired()
        Returns true if the user data request has expired.
        Returns:
        true if the user data request has expired
      • setAuth

        public void setAuth​(java.lang.String auth)
        Sets the authorization code.
        Parameters:
        auth - the authorization code.
      • setEmail

        public void setEmail​(java.lang.String email)
        Sets the email address.
        Parameters:
        email - the email address
      • setExpiration

        public void setExpiration​(long expiration)
        Sets the expiration date.
        Parameters:
        expiration - the expiration date
      • setId

        public void setId​(java.lang.String id)
        Sets the id.
        Parameters:
        id - the id
      • setInfoHtml

        public void setInfoHtml​(java.lang.String infoHtml)
        Sets the user data HTML.
        Parameters:
        infoHtml - the user data HTML
      • setUser

        public void setUser​(java.lang.String user)
        Sets the full user name.
        Parameters:
        user - the full user name
      • toJson

        public java.lang.String toJson()
        Formats this object as JSON text.
        Returns:
        the JSON text
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()