psdi.security

Class UserInfo

  • java.lang.Object
    • psdi.security.UserInfo
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class UserInfo
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object clone()
      Clone the userinfo and assign a new connection key
      java.lang.Object clone(boolean keepKey)
      Clone the userinfo and assign a new connection key
      java.lang.String getBaseCaltype()
      Get the Base calendar type of MXServer.
      java.lang.String getBaseCurrency()
      Returns the base currency for the organization.
      java.lang.String getCaltype()
      Get the calendar type of this user login.
      java.lang.String getClientAddr()
      Returns the user's client address (getRemoteAddr).
      java.lang.String getClientHost()
      Returns the user's client host (getRemoteHost).
      ConnectionKey getConnectionKey()
      Returns a ConnectionKey which can be used to get a database connection.
      java.lang.Object getCredential()
      Get the certificate if passed in to UserInfo
      java.lang.String getDefaultLang() 
      java.lang.String getDefaultLocaleStr() 
      java.lang.String getDefaultTZStr() 
      java.lang.String getDefaultUserNotfType() 
      java.lang.String getDisplayName()
      Return the display name
      java.lang.String getEmail()
      Return users's primary email address.
      java.lang.String getIBMID() 
      java.lang.String getIBMPass() 
      com.ibm.icu.util.ULocale getICULocale()
      Returns the ICU locale of this user.
      boolean getInactiveSites()
      Get the "inactive sites" flag (derived from maxuser.inactivesites).
      java.lang.String getInsertSite()
      Get the insert site of the user.
      java.lang.String getLangCode()
      Get the language code of this user login.
      int getLeftNav() 
      java.util.Locale getLocale()
      Returns the locale of this user.
      java.lang.String getLoginID()
      returns the loginID.
      java.lang.String getLoginUserName()
      Return the login user name (userid).
      long getMaxSessionID()
      Return user's maxsessionid (part of index to maxsession table).
      java.lang.String getPersonId()
      Return the personId
      java.lang.String getPhone()
      Return users's primary phone number.
      java.lang.String getSchemaOwner()
      Returns the schema owner.
      boolean getScreenReader()
      Returns True if this user uses a screen reader.
      java.lang.String getSeatid() 
      java.util.UUID getServerGuid() 
      java.lang.String getStartApp() 
      long getSubscriberid() 
      long getSubscriptionId() 
      java.lang.String getSubscriptionPartNumber() 
      int getTenantID()
      Reterns the id of the tenant the user represented by this UserInfo belongs to.
      java.util.TimeZone getTimeZone()
      Returns the time zone for this user.
      java.lang.String getTitle()
      Return the person title
      psdi.security.UserLoginDetails getUserLoginDetails()
      Get the user login details for this userinfo
      java.lang.String getUserName()
      Return the user name
      boolean isClonedFrom(UserInfo ui)
      Returns true if the UserInfo objects are identical except the connection key
      boolean isInteractive()
      Get the interactive flag value.
      boolean isLandlord()
      Check whether a UserInfo is for the landlord tenant.
      boolean isLocalSession() 
      boolean isPreview()
      Check whether it is preview mode.
      boolean isRestUser() 
      void refreshLoginDetails(psdi.security.UserLoginDetails newLoginDetails)
      Refresh UserLoginDetails (loginDetails).
      void setCalType(java.lang.String Cal)
      Set the Calendar Type
      void setCredential(java.lang.Object cert)
      Set the X509 certificate.
      void setEmail(java.lang.String email)
      Cache user's primary email address.
      void setInsertSite(java.lang.String siteID)
      Get the insert site of the user.
      void setInteractive(boolean interactiveValue)
      Set the mode to interactive.
      void setLangCode(java.lang.String langCode)
      Set the language code
      void setLangCode(java.lang.String langCode, MXServerRemote server)
      Set the language code, the language code will be validated based on the valid language code list provided by the server reference.
      void setLeftNav(int leftNav) 
      void setLocale(java.util.Locale locale)
      Sets the Locale.
      void setLocale(java.lang.String localeStr) 
      void setLocalSession(boolean isLocalSession)
      If a user session authenticated through this UserInfo object does not require remote rmi access, that is the program runs in the same JVM as the server, this method should be called to set to true.
      void setMaxSessionID(long maxsessionid)
      Cache user's maxsessionid (part of key to maxsession table).
      void setMXServer(MXServerRemote server) 
      void setPhone(java.lang.String phone)
      Cache user's primary phone number.
      boolean setPreview(boolean flag)
      Set whether the connection for this user info is preview mode onlly.
      void setRestUser(boolean restUser) 
      void setStartApp(java.lang.String startApp) 
      void setTimeZone(java.lang.String tzStr) 
      void setTimeZone(java.util.TimeZone timeZone)
      Sets the time zone.
      void setUserName(java.lang.String s)
      Change the user name (userid).
      void toJSON(com.ibm.json.java.JSONObject jsonObject, boolean lean) 
      • Methods inherited from class java.lang.Object

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

      • setRestUser

        public void setRestUser(boolean restUser)
      • isRestUser

        public boolean isRestUser()
      • getUserLoginDetails

        public psdi.security.UserLoginDetails getUserLoginDetails()
        Get the user login details for this userinfo
        Returns:
        UserLoginDetails
      • getConnectionKey

        public ConnectionKey getConnectionKey()
        Returns a ConnectionKey which can be used to get a database connection.
      • getUserName

        public java.lang.String getUserName()
        Return the user name
      • getIBMID

        public java.lang.String getIBMID()
      • getDefaultUserNotfType

        public java.lang.String getDefaultUserNotfType()
      • getIBMPass

        public java.lang.String getIBMPass()
      • getPersonId

        public java.lang.String getPersonId()
        Return the personId
        Returns:
        personid
      • getDisplayName

        public java.lang.String getDisplayName()
        Return the display name
        Returns:
        Display name
        See Also:
        UserLoginDetails.getDisplayName()
      • getTitle

        public java.lang.String getTitle()
        Return the person title
        Returns:
        title
        See Also:
        UserLoginDetails.getTitle()
      • getLoginUserName

        public java.lang.String getLoginUserName()
        Return the login user name (userid).
      • getLoginID

        public java.lang.String getLoginID()
        returns the loginID. (LoginID is NOT the same as UserID!)
        Returns:
        loginID
      • setEmail

        public void setEmail(java.lang.String email)
        Cache user's primary email address.
        Parameters:
        email - Primary email address
      • getEmail

        public java.lang.String getEmail()
        Return users's primary email address.
        Returns:
        Primary email address
      • setPhone

        public void setPhone(java.lang.String phone)
        Cache user's primary phone number.
        Parameters:
        email - Primary phone number.
      • getPhone

        public java.lang.String getPhone()
        Return users's primary phone number.
        Returns:
        Primary phone number.
      • setMaxSessionID

        public void setMaxSessionID(long maxsessionid)
        Cache user's maxsessionid (part of key to maxsession table).
        Parameters:
        maxsessionid -
      • getMaxSessionID

        public long getMaxSessionID()
        Return user's maxsessionid (part of index to maxsession table).
        Returns:
        maxsessionid
      • setUserName

        public void setUserName(java.lang.String s)
        Change the user name (userid).
      • getSchemaOwner

        public java.lang.String getSchemaOwner()
        Returns the schema owner.
      • getLocale

        public java.util.Locale getLocale()
        Returns the locale of this user.
        Returns:
        Locale, as java.util.Locale.
        See Also:
        Locale
      • getICULocale

        public com.ibm.icu.util.ULocale getICULocale()
        Returns the ICU locale of this user.
        Returns:
        ULocale, as com.ibm.icu.util.ULocale.
        See Also:
        ULocale
      • setLocale

        public void setLocale(java.util.Locale locale)
        Sets the Locale.
      • setLocale

        public void setLocale(java.lang.String localeStr)
        Parameters:
        localeStr -
      • getTimeZone

        public java.util.TimeZone getTimeZone()
        Returns the time zone for this user.
        Returns:
        The TimeZone, as java.util.TimeZone.
        See Also:
        TimeZone
      • setTimeZone

        public void setTimeZone(java.util.TimeZone timeZone)
        Sets the time zone.
      • setTimeZone

        public void setTimeZone(java.lang.String tzStr)
                         throws MXException,
                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • getBaseCurrency

        public java.lang.String getBaseCurrency()
        Returns the base currency for the organization.
      • getServerGuid

        public java.util.UUID getServerGuid()
      • getCaltype

        public java.lang.String getCaltype()
        Get the calendar type of this user login.
        Returns:
      • setCalType

        public void setCalType(java.lang.String Cal)
        Set the Calendar Type
      • getBaseCaltype

        public java.lang.String getBaseCaltype()
        Get the Base calendar type of MXServer.
        Returns:
      • getLangCode

        public java.lang.String getLangCode()
        Get the language code of this user login.
        Returns:
      • setLangCode

        public void setLangCode(java.lang.String langCode)
        Set the language code
        Parameters:
        the - language code in iso 639-2 code.
      • setLangCode

        public void setLangCode(java.lang.String langCode,
                                MXServerRemote server)
                         throws MXException,
                                java.rmi.RemoteException
        Set the language code, the language code will be validated based on the valid language code list provided by the server reference.
        Parameters:
        langCode -
        server -
        Throws:
        MXException
        java.rmi.RemoteException
      • setInteractive

        public void setInteractive(boolean interactiveValue)
        Set the mode to interactive.
        Parameters:
        interactive - Where the object take input from client.
      • isInteractive

        public boolean isInteractive()
        Get the interactive flag value.
      • getDefaultLang

        public java.lang.String getDefaultLang()
      • getDefaultLocaleStr

        public java.lang.String getDefaultLocaleStr()
      • getDefaultTZStr

        public java.lang.String getDefaultTZStr()
      • refreshLoginDetails

        public void refreshLoginDetails(psdi.security.UserLoginDetails newLoginDetails)
        Refresh UserLoginDetails (loginDetails).
        Parameters:
        newLoginDetails - New UserLoginDetails.
      • getInsertSite

        public java.lang.String getInsertSite()
        Get the insert site of the user. It is null if not set explicitly.
        Returns:
      • setInsertSite

        public void setInsertSite(java.lang.String siteID)
                           throws java.rmi.RemoteException,
                                  MXSystemException
        Get the insert site of the user. It is null if not set explicitly.
        Throws:
        MXSystemException
        java.rmi.RemoteException
      • getScreenReader

        public boolean getScreenReader()
        Returns True if this user uses a screen reader.
      • getInactiveSites

        public boolean getInactiveSites()
        Get the "inactive sites" flag (derived from maxuser.inactivesites). True means the user can access inactive sites and orgs. False means they must be active.
        Returns:
        True if inactive sites/orgs are allowed.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Clone the userinfo and assign a new connection key
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException
      • clone

        public java.lang.Object clone(boolean keepKey)
                               throws java.lang.CloneNotSupportedException
        Clone the userinfo and assign a new connection key
        Throws:
        java.lang.CloneNotSupportedException
      • getCredential

        public java.lang.Object getCredential()
        Get the certificate if passed in to UserInfo
        Returns:
      • setCredential

        public void setCredential(java.lang.Object cert)
        Set the X509 certificate. This certificate will be the identify of the user represented by this UserInfo object.
        Parameters:
        cert -
      • isClonedFrom

        public boolean isClonedFrom(UserInfo ui)
        Returns true if the UserInfo objects are identical except the connection key
        Returns:
      • getClientHost

        public java.lang.String getClientHost()
        Returns the user's client host (getRemoteHost). If user has multiple sessions on multiple hosts, then the returned clientHost is arbitrary.
        Returns:
        Client host (IP address) of user session
      • getClientAddr

        public java.lang.String getClientAddr()
        Returns the user's client address (getRemoteAddr). If user has multiple sessions on multiple hosts, then the returned client address is arbitrary.
        Returns:
        Client address of user session
      • setPreview

        public boolean setPreview(boolean flag)
        Set whether the connection for this user info is preview mode onlly. The return value is the old value of the forPreview flag before this call is set.
        Parameters:
        flag - true is it is for perview mode
        Returns:
        The old value of preview flag before the value is set.
      • isPreview

        public boolean isPreview()
        Check whether it is preview mode.
        Returns:
      • setLocalSession

        public void setLocalSession(boolean isLocalSession)
        If a user session authenticated through this UserInfo object does not require remote rmi access, that is the program runs in the same JVM as the server, this method should be called to set to true.
        Parameters:
        isLocalSession -
      • isLocalSession

        public boolean isLocalSession()
      • getStartApp

        public java.lang.String getStartApp()
      • setStartApp

        public void setStartApp(java.lang.String startApp)
      • getLeftNav

        public int getLeftNav()
      • setLeftNav

        public void setLeftNav(int leftNav)
      • getTenantID

        public int getTenantID()
        Reterns the id of the tenant the user represented by this UserInfo belongs to.
        Returns:
        tenant id, -1 is not set.
      • isLandlord

        public boolean isLandlord()
        Check whether a UserInfo is for the landlord tenant. This should only need to be called in security package.
        Returns:
      • getSubscriptionId

        public long getSubscriptionId()
      • getSubscriptionPartNumber

        public java.lang.String getSubscriptionPartNumber()
      • getSubscriberid

        public long getSubscriberid()
      • getSeatid

        public java.lang.String getSeatid()
      • toJSON

        public void toJSON(com.ibm.json.java.JSONObject jsonObject,
                           boolean lean)
                    throws java.rmi.RemoteException,
                           MXException
        Throws:
        java.rmi.RemoteException
        MXException