Class Identity

java.lang.Object
overit.geocall.util.Identity
All Implemented Interfaces:
Serializable, Cloneable, Scoped
Direct Known Subclasses:
BaseIdentity

public class Identity extends Object implements Cloneable, Serializable, Scoped
The class stores the informations about the user currently logged in the application and provide the methods to retrieve and set those informations.
See Also:
  • Field Details

    • COMPANY_AUTH_MAX_INACTIVE_INTERVAL

      public static final String COMPANY_AUTH_MAX_INACTIVE_INTERVAL
      See Also:
    • COMPANY_UI_VIEW_UNALLOWED

      public static final String COMPANY_UI_VIEW_UNALLOWED
      See Also:
    • COMPANY_UI_VIEW_UNALLOWED_EXTENDED_ATTRIBUTES

      public static final String COMPANY_UI_VIEW_UNALLOWED_EXTENDED_ATTRIBUTES
      See Also:
    • COMPANY_LANG

      public static final String COMPANY_LANG
      See Also:
    • company

      protected Company company
    • _userId

      protected Long _userId
    • _userUsername

      protected String _userUsername
    • _userName

      protected String _userName
    • _userSurname

      protected String _userSurname
    • _email

      protected String _email
    • _branch

      protected Long _branch
    • _branchDesc

      protected String _branchDesc
    • _gender

      protected String _gender
    • _face

      protected String _face
    • functions

      protected Set<String> functions
    • resourceAuthorizationPolicy

      protected overit.geocall.rs.auth.ResourceAuthorizationPolicy resourceAuthorizationPolicy
    • _userDesc

      protected String _userDesc
    • rtl

      protected boolean rtl
    • _dbLang

      protected String _dbLang
    • _agentLang

      protected String _agentLang
    • _defaultLang

      protected Lang _defaultLang
    • _langMap

      protected HashMap<String,Lang> _langMap
    • _lang

      protected Lang _lang
    • _langHints

      protected LangHints _langHints
    • _documentLang

      protected String _documentLang
    • _culturalConventions

      protected Conventions _culturalConventions
    • _maxInactiveInterval

      protected int _maxInactiveInterval
    • _messagesNumber

      protected int _messagesNumber
    • _messagesLastSearch

      protected long _messagesLastSearch
    • _normalizationMode

      protected int _normalizationMode
    • _lastPasswordSet

      protected Date _lastPasswordSet
    • _lastAccessDate

      protected Date _lastAccessDate
    • _hgIdentity

      protected HashGetter _hgIdentity
    • _viewUnallowed

      protected boolean _viewUnallowed
    • viewUnallowedExtendedAttributes

      protected boolean viewUnallowedExtendedAttributes
    • _door

      protected String _door
    • _state

      protected State _state
    • _userAgent

      protected overit.geocall.servlet.UserAgent _userAgent
    • _device

      protected String _device
    • _dbf

      protected DBFieldMap _dbf
    • _zones

      protected Zones _zones
    • _type

      protected Long _type
    • _typeDesc

      protected String _typeDesc
    • _typeCode

      protected String _typeCode
    • _extraTypes

      protected Map<Long,String> _extraTypes
    • userProfile

      protected Long userProfile
    • pickedProfile

      protected PickedProfile pickedProfile
    • _ip

      protected String _ip
    • reference

      protected overit.geocall.servlet.Reference reference
    • accesibleMode

      protected boolean accesibleMode
    • accessToken

      protected String accessToken
    • systemUser

      protected boolean systemUser
    • favoritesBoxOpen

      protected boolean favoritesBoxOpen
    • noExpiration

      protected boolean noExpiration
  • Constructor Details

    • Identity

      public Identity(Company company)
      Create a new identity associated to the passed company
      Parameters:
      company - the company this identity belongs to
    • Identity

      public Identity(Long factory)
      For routing purpose only
      Parameters:
      factory - Long containing the factory
    • Identity

      @Deprecated public Identity(Long userid, Long factory)
      Deprecated.
      use Identity(Long) instead
      Parameters:
      userid - The id of the user
      factory - Long containing the factory
    • Identity

      public Identity(String pkg)
      Creates an Identity for the specific package passed as parameter
      Parameters:
      pkg - The string that identifies the package
    • Identity

      public Identity(Identity id)
      Creates an Identity starting from the one passed as parameter
      Parameters:
      id - The Identity which we want to clone
  • Method Details

    • bind

      public static void bind(Identity id)
      Bind the identity to the context identity
      Parameters:
      id - the identity to bind
    • current

      public static Identity current()
      Returns the current context identity
      Returns:
      The current context identity
    • unbind

      public static void unbind()
      Unbind the identity from the context identity
    • isSystemAdmin

      public final boolean isSystemAdmin()
      Return true if the identity is a system admin, false otherwise.
      Returns:
      true if the identity is a system admin, false otherwise.
    • isTenantAdmin

      public final boolean isTenantAdmin()
      Return true if the identity is a tenant admin, false otherwise.
      Returns:
      true if the identity is a tenant admin, false otherwise.
    • getLayerIdentity

      public Identity getLayerIdentity(String layer)
      Extracts a basic layer Identity. This method uses a local thread safe cache to store in-memory singletons of the identity.
      Parameters:
      layer - the application layer for which the identity is looked for.
      Returns:
      a clone of the basic identity cached in-memory
    • setup

      protected final void setup()
    • getCompany

      public Company getCompany()
      Specified by:
      getCompany in interface Scoped
    • getFactory

      @Deprecated public Long getFactory()
      Deprecated.
      use getCompany() company property, instead
      Returns:
      the company id
    • getPackage

      @Deprecated public String getPackage()
      Deprecated.
      use getCompany() package property, instead
      Returns:
      the company application package
    • getFactoryLogin

      @Deprecated public String getFactoryLogin()
      Deprecated.
      use getCompany() companylogin property, instead
      Returns:
      the company description package
    • getBranchDesc

      @Deprecated public String getBranchDesc()
      Deprecated.
      Returns:
      the company description package
    • toString

      public String toString()
      Returns a String representation of the Identity
      Overrides:
      toString in class Object
      Returns:
      A string representation of the Identity
    • getResourceFactory

      public Long getResourceFactory()
      Returns the factory used to access the web resources.
      In some anomalous and infrequent cases we can customize the factory used to access the web resource realizing in that way a sharing of multimedia files between companies
      Returns:
      The long that represents the id of the factory
    • getUser

      public Long getUser()
      Returns the numeric identifier of the user currently logged in the application
      Specified by:
      getUser in interface Scoped
      Returns:
      The long that represent the id of the user
    • getUserDesc

      public String getUserDesc()
      Returns the description of the user currently logged in the application
      Returns:
      The string that contains the surname, the name and the username of the user currently logged in the application
    • getEmail

      public String getEmail()
      Returns the email address of the user currently logged in the application
      Returns:
      The string that represents the email
    • getBranch

      public Long getBranch()
      Returns the branch of the identity
      Specified by:
      getBranch in interface Scoped
      Returns:
      The long that represents the id of the branch
    • getBranchDescription

      public String getBranchDescription()
      Returns the description of the branch of the identity
      Specified by:
      getBranchDescription in interface Scoped
      Returns:
      The string that contains the branch description
    • setBranch

      public void setBranch(Long branch, String branchDesc)
      Sets a specific branch for the identity
      Parameters:
      branch - The long that represents the id of the branch
      branchDesc - The string that contains the branch description
    • setGender

      public void setGender(String g)
      Sets the gender of the user currently logged in the application
      Parameters:
      g - The string that represent the gender. The possible values are null (for not specified), m (for male) and f (for female)
    • getGender

      public String getGender()
      Returns the gender of the user currently logged in the application
      Returns:
      The string that represent the gender. The possible values are null (for not specified), m (for male) and f (for female)
    • setFace

      public void setFace(String face)
      Sets the image associated to the user currently logged in the application
      Parameters:
      face - A string that contains the fullname of the web resource of the image
    • getFace

      public String getFace()
      Returns the image associated to the user currently logged in the application
      Returns:
      The string that contains the full name of the web resource of the image
    • getUserDesc

      public String getUserDesc(String textFormat)
      Returns the description of the user currently logged in the application, formatted with the specific format passed as parameter
      Parameters:
      textFormat - The string that represent the format
      Returns:
      The string that contains the surname, the name and the username of the user currently logged in the application, formatted using the format passed as parameter
    • getUsername

      public String getUsername()
      Returns the username of the user currently logged in the application
      Specified by:
      getUsername in interface Scoped
      Returns:
      The string that represent the username of the user
    • getUserUsername

      @Deprecated public String getUserUsername()
      Deprecated.
      use getUsername() instead
      Returns the username of the user currently logged in the application
      Returns:
      The string that represent the username of the user
    • getUserSurname

      public String getUserSurname()
      Returns the surname of the user currently logged in the application
      Returns:
      The string that represent the surname of the user
    • getUserName

      public String getUserName()
      Returns the name of the user currently logged in the application
      Returns:
      The string that represent the name of the user
    • setUser

      public void setUser(Long value, String name, String surname, String username)
      Sets the attributes of the user currently logged in the application
      Parameters:
      value - The numeric identifier of the user
      name - The name of the user
      surname - The surname of the user
      username - The username of the user
    • setEmail

      public void setEmail(String email)
      Sets the email address of the user currently logged in the application
      Parameters:
      email - The string that contains the email address
    • setLog

      @Deprecated public void setLog(Log log)
      Deprecated.
      Parameters:
      log - A log
    • getLog

      @Deprecated public Log getLog()
      Deprecated.
      Returns:
      The log
    • addFunction

      public void addFunction(String s)
      Adds a function (i/e privileges) to the user currently logged in the application
      Parameters:
      s - The function representing a privilege of the user
    • getFunctions

      public Set<String> getFunctions()
      Returns to set of functions (privileges) of the user currently logged in the application
      Specified by:
      getFunctions in interface Scoped
      Returns:
      The set of string each of which represents a privilege of the user
    • hasAllFunctions

      public boolean hasAllFunctions(List<String> list)
      Checks if the user currently logged has ALL the authorizations in a list
      Parameters:
      list - The list of authorizations
      Returns:
      true if the user has all the authorizations, false otherwise
    • haveFunction

      @Deprecated public boolean haveFunction(String f)
      Deprecated.
      Checks if the user currently logged in the application has or not a specific privilege
      Parameters:
      f - The string that represent the specific privilege
      Returns:
      true if the user has the privilege (or if the parameter is null or an empty string), false otherwise
    • hasFunction

      public boolean hasFunction(String f)
      Checks if the user currently logged in the application has or not a specific privilege
      Parameters:
      f - The string that represent the specific privilege
      Returns:
      true if the user has the privilege (or if the parameter is null or an empty string), false otherwise
    • getLogos

      public List<String> getLogos()
      Returns the list of logos associated with the user currently logged in the application.
      Each logo appear in the upper left corner of the screen, inside the taskbar.
      Returns:
      The arraylist of logos. Each entry is a string that represent the path of the image, as it has been defined in the company configuration
    • getMinMaxInactiveInterval

      public int getMinMaxInactiveInterval()
      Returns the minimum possible value referred to the maximum period of inactivity of the user currently logged in the application
      Returns:
      The minimum possible value referred to the maximum period of inactivity for the user, expressed in seconds
    • getMaxMaxInactiveInterval

      public int getMaxMaxInactiveInterval()
      Returns the maximum possible value referred to the maximum period of inactivity of the user currently logged in the application
      Returns:
      The maximum possible value referred to the maximum period of inactivity for the user, expressed in seconds
    • getMaxInactiveInterval

      public int getMaxInactiveInterval()
      Returns the value of the maximum period of inactivity of the user currently logged in the application.
      After this time the session expires
      Returns:
      The value of the maximum period of inactivity for the user, expressed in seconds
    • getWASessionDuration

      public int getWASessionDuration()
      Returns the value of the maximum period of inactivity of the user currently logged in the web application.
      After this time the session expires
      Returns:
      The value of the maximum period of inactivity for the user, expressed in seconds
    • setMaxInactiveInterval

      public void setMaxInactiveInterval(int mii)
      Sets the value of the maximum period of inactivity of the user currently logged in the application.
      After this time the session expires
      Parameters:
      mii - The value of the maximum period of inactivity for the user, expressed in seconds.
      If the value is higher than the one stored as maximum possible, then the maximum possible is used
      If the value is lower than the one stored as minimum possible, then the minimum possible is used
    • getMaxWebViews

      public int getMaxWebViews()
      Returns the maximum number of views that the user currently logged in the application can concurrently open
      Returns:
      The maximum number of views for the user. If the user don't have the privilege of open views (foundation.ux.multiview) the method returns 1. If the user is one with server.administration function, there is no limit for the user and the method will return Integer.Max_VALUE
    • getWebViewsMode

      public String getWebViewsMode()
      Returns the way the new web views should be opened. The values can be returned could be:
      • default: the user can open a new view both in the current browser tab or ina a new one
      • newtab: the user can open a new view only in a new browser tab
      Returns:
      The string that represents the email
    • getAuthenticationTokenDuration

      public int getAuthenticationTokenDuration()
      Returns the duration of the authentication token for the user currently logged in the application
      Returns:
      The duration of the authentication token, expressed in seconds
    • getWASessionLatency

      public int getWASessionLatency()
      Returns the duration of the access token for the user in the application
      Returns:
      The duration of the access token, expressed in seconds
    • getMessagesLastSearch

      public long getMessagesLastSearch()
      Returns the value associated with the time of the last search for new messages for the user currently logged in the application
      Returns:
      The long value that corresponds to the last search for new messages, expressed by the difference measured in milliseconds, between the current time and midnight, January 1, 1970 UTC
    • getMessagesNumber

      public int getMessagesNumber()
      Returns the number of messages received by the user currently logged in the application
      Returns:
      The number of messages received by the user
    • setMessagesNumber

      public void setMessagesNumber(int n)
      Sets the number of messages received by the user currently logged in the application. It sets even the _messageLastSearch value
      Parameters:
      n - The number of messages. If it's a negative number, 0 will be set
    • setDBLang

      public void setDBLang(String lang)
      Sets the language that correspond to the one saved in the database for the user currently logged in the application
      Parameters:
      lang - The string that correspond to the language
    • getDBLang

      public String getDBLang()
      Returns the language that correspond to the one saved in the database for the user currently logged in the application
      Returns:
      The string that correspond to the language
    • setAgentLang

      public void setAgentLang(String agentLang)
      Sets the lang that correspond to the browser language
      Parameters:
      agentLang - The string that correspond to the language
    • getLangMap

      public HashMap<String,Lang> getLangMap()
      Returns the language map defined in the IdentitySetup for the user currently logged in the application
      Returns:
      The language map
    • getLang

      public Lang getLang()
      Returns the language for the user currently logged in the application
      Returns:
      The Lang inferred from the settings of the database lang, agent lang, default lang
    • getLang

      public Lang getLang(String name)
      Return the language specified by the passed param if it has been configured into di identity setup
      Parameters:
      name - the name of the language to retrieve
      Returns:
      the instance of Lang whose name matches with the input name, or null if it can not be found
    • getDefaultLang

      protected Lang getDefaultLang()
      The Lang that will be used if there's no other configured language for this identity
      Returns:
      the default Lang
    • getDocumentLang

      public String getDocumentLang()
      Returns the document language, that is the language of the html document, to be used for example for the hypenation. If it is undefined it will search it in the dictionary, looking for the variable DOCUMENT_LANG
      Returns:
      The string that correspond to the language
    • getCulturalConventions

      public Conventions getCulturalConventions()
      Returns the cultural conventions associated to the user currently logged in the application
      Returns:
      The Conventions associated to the user
    • getLangHints

      public LangHints getLangHints()
      Returns the language hints provided from the user currently logged in the application
      Returns:
      The LangHints from the user
    • setUserAgent

      public void setUserAgent(overit.geocall.servlet.UserAgent ua)
      Sets the user agent for the user currently logged in the application
      Parameters:
      ua - The UserAgent
    • getUserAgent

      public overit.geocall.servlet.UserAgent getUserAgent()
      Returns the user agent for the user currently logged in the application
      Returns:
      The UserAgent
    • setDevice

      public void setDevice(String device)
      Sets the device for the user currently logged in the application
      Parameters:
      device - The string that represent the device
    • getDevice

      public String getDevice()
      Returns the string that represents the device for the user currently logged in the application
      Returns:
      The string that represent the device
    • getDBFieldMap

      public DBFieldMap getDBFieldMap()
      Returns the DBFieldMap associated to the identity
      Specified by:
      getDBFieldMap in interface Scoped
      Returns:
      The DBFieldMap associated to the identity
    • setDBFieldMap

      public void setDBFieldMap(DBFieldMap dbf)
      Sets the DBFieldMap associated to the identity
      Parameters:
      dbf - The DBFieldMap to be set to the identity
    • setLastPasswordSet

      public void setLastPasswordSet(Date lastPasswordSet)
      Sets the date of the last setting of the password for the user currently logged in the application
      Parameters:
      lastPasswordSet - The Date of the last setting of the user password
    • getLastPasswordSet

      public Date getLastPasswordSet()
      Returns the date of the last setting of the password for the user currently logged in the application
      Returns:
      The Date of the last setting of the user password
    • setLastAccessDate

      public void setLastAccessDate(Date lastAccessDate)
      Sets the date of the last log in for the user currently logged in the application
      Parameters:
      lastAccessDate - The Date of the last log in of the current user
    • getLastAccessDate

      public Date getLastAccessDate()
      Returns date of the last log in for the user currently logged in the application
      Returns:
      The Date of the last log in of the current user
    • getIdentity

      public HashGetter getIdentity()
      Return the attributes of the identity
      Returns:
      An HashGetter containing the attributes of the identity
    • setAttributes

      public void setAttributes(HashGetter hg)
      Sets the attributes of the identity
      Parameters:
      hg - An HashGetter containing the attributes of the identity
    • getMaxInactivePeriod

      public int getMaxInactivePeriod()
      Returns the maximum possible period of inactivity for the user. With inactivity we mean the period during which the user did not even have access to the application
      Returns:
      The maximum possible period of inactivity, expressed in days
    • getMaxAccessFailures

      public int getMaxAccessFailures()
      Returns the maximum possible number of access attempts failed for the user. If the user makes a number of consecutive failed accesses greater than the value then the user is blocked
      Returns:
      The maximum possible number of access attempts failed
    • getDefaultTheme

      public String getDefaultTheme()
      Returns the default theme for the user currently logged in the application
      Returns:
      The string that represent the name of the default theme
    • getTheme

      public String getTheme()
      Returns the theme used for the user currently logged in the application
      Returns:
      The string that represent the name of the theme
    • getHideMenu

      @Deprecated public boolean getHideMenu()
      Deprecated.
      Checks if the unallowed options are hidden for the user currently logged in the application
      Returns:
      true if the menu is hidden, false otherwise
    • viewUnallowed

      public boolean viewUnallowed()
      Checks if the unallowed options (tabs, menu voices, ...) are visible for the user currently logged in the application
      Returns:
      true if the unallowed options are visible, false otherwise
    • viewUnallowedExtendedAttributes

      public boolean viewUnallowedExtendedAttributes()
      Checks if the EDM fields that the user can't view are visible for the user currently logged in the application
      Returns:
      true if the EDM fields that the user can't view are visible, false otherwise
    • setTheme

      public void setTheme(String theme)
      Sets the theme for the user currently logged in the application
      Parameters:
      theme - The string that represent the name of the theme
    • setHideMenu

      @Deprecated public void setHideMenu(boolean hide)
      Deprecated.
      Sets the visibility state of the unallowed options for the user currently logged in the application
      Parameters:
      hide - true if the menu must be hidden, false otherwise
    • setViewUnallowed

      public void setViewUnallowed(boolean view)
      Sets the visibility state of the unallowed options (tabs, menu voices, ...) for the user currently logged in the application
      Parameters:
      view - true if the unallowed options must be visible, false otherwise
    • setViewUnallowedExtendedAttributes

      public void setViewUnallowedExtendedAttributes(boolean view)
      Sets the visibility state of the EDM fields that the user can't view for the user currently logged in the application
      Parameters:
      view - true if the EDM fields that the user can't view must be visible, false otherwise
    • getBarType

      public String getBarType()
      Returns the type of the task bar for the user currently logged in the application
      Returns:
      The string that represents the bar type. The possible values are: client (default) or floating
    • getBarMode

      public String getBarMode()
      Returns the floating state of the taskbar
      Returns:
      A string that represents the floating state of the taskbar. The possible values are: lock (taskbar not floating), on (floating taskbar visible in the screen), off (floating taskbar but not visible in the screen)
    • getBarLayout

      public String getBarLayout()
      Returns the scroll modality of the task bar
      Returns:
      A string that represents the scroll modality of the taskbar (only for the client bar, see getBarType()). The possible values are: fullScroll (the scrollbar allows the scrolling of the entire taskbar), fixedIdentity (this is the default value, the scrollbar allows the scrolling of the menu voices instead the logos and user information remain fixed), fixedLogo (the scrollbar allows the scrolling of the menu voices and of the user information, instead the logos remain fixed) and 'foldableFavorites' that is the same as fixedIdentity with the feature for hide/shows the favorites box in addition.'
    • getState

      public State getState()
      Returns the State object that contains some configuration settings for the user currently logged in the application
      Returns:
      The configuration state of the user
    • setState

      public void setState(State state)
      Sets the State object that contains some configuration settings for the user currently logged in the application
      Parameters:
      state - The configuration state of the user
    • setDoor

      public void setDoor(String door)
      Sets a specific door
      Parameters:
      door - The string that represents the door
    • getDoor

      public String getDoor()
      Returns the specific door
      Returns:
      The string that represents the door
    • getFirstWindow

      public String getFirstWindow()
      Method that must be extended if you want to customize the window on which the user will land when accessing the application
      Returns:
      By default, the method returns null
    • getMenu

      public String getMenu()
      Method that must be extended if you want to customize the menu for the user
      Returns:
      By default, the method returns null
    • getInPage

      public String getInPage()
      Method that must be extended if you want to customize the entrance servlet for the user
      Returns:
      By default, the method returns null
    • getOutPage

      public String getOutPage()
      Method that must be extended if you want to customize the exit servlet for the user
      Returns:
      By default, the method returns null
    • getTimezone

      public TimeZone getTimezone()
      Method that must be extended if you want to customize the timezone assigned to the user
      Returns:
      By default, returns the JVM timezone
    • clone

      public Object clone() throws CloneNotSupportedException
      Clones the identity
      Overrides:
      clone in class Object
      Returns:
      The identity
      Throws:
      CloneNotSupportedException - If the object's class does not support the Cloneable interface.
    • getZones

      public Zones getZones()
      Returns the different time zones as they has been defined in the IdentitySetup
      Returns:
      The Zones for the identity
    • setType

      public void setType(Long type, String desc, String code)
      Sets the user type
      Parameters:
      type - The long that represents the user type
      desc - The description of the user type
      code - The code of the user type
    • getType

      public Long getType()
      Returns the user type
      Returns:
      The long that represents the user type
    • getTypeDesc

      public String getTypeDesc()
      Returns the user type description
      Returns:
      The string that contains the user type description
    • getTypeCode

      public String getTypeCode()
      Returns the user type code
      Returns:
      The string that contains the user type code
    • setExtraTypes

      public void setExtraTypes(Map<Long,String> extraTypes)
      Sets the user extra types. Each user can have multiple types
      Parameters:
      extraTypes - a Map<Long, String> in which every entry is a couple id, description that defines an extra type for the user
    • setUserProfile

      public void setUserProfile(Long userProfile)
      Sets the id of the user profile, related to the user's type, that will be used to retrieve the right profile configuration for the current user.
      Parameters:
      userProfile - the id of the user profile to use.
    • getUserProfile

      public Long getUserProfile()
      Gets the id of the user profile, related to the user's type, that will be used to retrieve the right profile configuration for the current user.
      Returns:
      the id of the user profile.
    • setPickedProfile

      public void setPickedProfile(PickedProfile pickedProfile)
      Sets the infos related to the picked profile.
      The relevant infos are the picked profile id or description and which configuration were picked up.
      Parameters:
      pickedProfile - infos related to the picked profile.
    • getPickedProfile

      public PickedProfile getPickedProfile()
      Gets the infos related to the picked profile.
      The relevant infos are the picked profile id or description and which configuration were picked up.
      Returns:
      the infos related to the picked profile.
    • getExtraTypes

      public Collection<Long> getExtraTypes()
      Returns the user extra types. Each user can have multiple types
      Returns:
      A Collection of Longs each of them representing an id of an extra type of the user
    • getExtraTypeDesc

      public Collection<String> getExtraTypeDesc()
      Returns the user extra types descriptions. Each user can have multiple types
      Returns:
      A Collection of Strings each of them containing a description of an extra type of the user
    • getDBClientIdentifier

      public String getDBClientIdentifier()
      Returns the DB client identifier
      Specified by:
      getDBClientIdentifier in interface Scoped
      Returns:
      The string that contains the user type code
    • setIp

      public void setIp(String ip)
      Set the ip address related to the browser from which the session has been created.
      Parameters:
      ip - ip address
    • getIp

      public String getIp()
      Returns:
      the ip address related to the browser from which the session has been created.
    • setReference

      public void setReference(overit.geocall.servlet.Reference ref)
      Set the Reference related to the browser's request.
      Parameters:
      ref - the Reference related to the browser's request.
    • getReference

      public overit.geocall.servlet.Reference getReference()
      Set the Reference related to the browser's request.
      Returns:
      The Reference related to the browser's request.
    • isPasswordExpired

      public boolean isPasswordExpired()
      Check if the user password has been expired, or if it must be changed
      Returns:
      true if the password must be changed; false otherwise
    • setRtl

      public void setRtl(boolean b)
      BETA VERSION Sets right-to-left capability
      Parameters:
      b - if true is enabled, false otherwise
    • getRtl

      public boolean getRtl()
      BETA VERSION Returns right-to-left capability
      Returns:
      true if right-to-left is enabled, false otherwise
    • setResourceAuthorizationPolicy

      public void setResourceAuthorizationPolicy(overit.geocall.rs.auth.ResourceAuthorizationPolicy resourceAuthorizationPolicy)
      Set the jax-rs authorization rules for the user currently logged in the application
      Parameters:
      resourceAuthorizationPolicy - instance containing the authorization policies defining which services can be accessed by the current user
    • canAccessToResource

      public boolean canAccessToResource(String uri, String method)
      Check if the current user can access to the REST resource
      Parameters:
      uri - the resource's uri path
      method - the http method
      Returns:
      true if the user can access to the specific resource, false otherwise.
    • setUserAccessibility

      public void setUserAccessibility(boolean b)
      Sets if the user has some disabilities and must use the Geocall's accessible mode, or not.
      Parameters:
      b - true if the user has some disabilities and must use the Geocall's accessible mode, false otherwise.
    • isAccessibleMode

      public boolean isAccessibleMode()
      Gets if the user has some disabilities and must use the Geocall's accessible mode, or not.
      Returns:
      true if the user has some disabilities and must use the Geocall's accessible mode, false otherwise.
    • getAccessibleTheme

      public final String getAccessibleTheme()
      Gets the theme to use when the Geocall's accessible mode is active.
      Returns:
      The theme to use when the Geocall's accessible mode is active.
    • getAccessToken

      public String getAccessToken()
      Return the Jwt access token used to enter the application. It is evaluated only when the user authenticate in the application server side via OAuth 2.0 SSO flow.
      Returns:
      The access token value if it is evaluated, null otherwise.
    • setAccessToken

      public void setAccessToken(String accessToken)
      Associate the access token used to enter the application. It could be used to integrate other service federated with same Identity Provider.
      Parameters:
      accessToken - The Jwt access token value
    • setNoExpiration

      public void setNoExpiration(boolean noExpiration)
      Set this user as a user without password expiration. The users with this configuration are the managed users (SSO users or system users)
      Parameters:
      noExpiration - if this user doesn't have the password expiration the value must be true, otherwise false. Default value is false
    • isNoExpiration

      public boolean isNoExpiration()
      Return if the user have the password expiration.
      Returns:
      if the user doesn't have the password expiration return true, otherwise return false
    • isSystemUser

      public boolean isSystemUser()
      Return if the user is a system user.
      Returns:
      true if the user is a system user, otherwise return false.
    • setSystemUser

      public void setSystemUser(boolean systemUser)
      Set this user as a system user.
      Parameters:
      systemUser - boolean indicating if the user should be a system user or not.
    • isFavoritesBoxOpen

      public boolean isFavoritesBoxOpen()
      Return if the user's favorite box must be open or not.
      Returns:
      true if the user's favorite box must be open, otherwise return false.
    • setFavoritesBoxOpen

      public void setFavoritesBoxOpen(boolean b)
      Set if the user's favorite box must be open or not.
      Parameters:
      b - boolean indicating if the user's favorite box must be open or not.