Package overit.geocall.util
Class Identity
java.lang.Object
overit.geocall.util.Identity
- All Implemented Interfaces:
Serializable,Cloneable,Scoped
- Direct Known Subclasses:
BaseIdentity
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 Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Longprotected Stringprotected Conventionsprotected DBFieldMapprotected Stringprotected Langprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected HashGetterprotected Stringprotected Langprotected LangHintsprotected Dateprotected Dateprotected intprotected longprotected intprotected intprotected Stateprotected Longprotected Stringprotected Stringprotected overit.geocall.servlet.UserAgentprotected Stringprotected Longprotected Stringprotected Stringprotected Stringprotected booleanprotected Zonesprotected booleanprotected Stringprotected Companystatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected booleanprotected PickedProfileprotected overit.geocall.servlet.Referenceprotected overit.geocall.rs.auth.ResourceAuthorizationPolicyprotected booleanprotected booleanprotected Longprotected booleanFields inherited from interface overit.geocall.platform.Scoped
contextScope -
Constructor Summary
ConstructorsConstructorDescriptionFor routing purpose onlyDeprecated.Creates an Identity for the specific package passed as parameterCreate a new identity associated to the passed companyCreates an Identity starting from the one passed as parameter -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a function (i/e privileges) to the user currently logged in the applicationstatic voidBind the identity to the context identitybooleancanAccessToResource(String uri, String method) Check if the current user can access to the REST resourceclone()Clones the identitystatic Identitycurrent()Returns the current context identityfinal StringGets the theme to use when the Geocall's accessible mode is active.Return the Jwt access token used to enter the application.intReturns the duration of the authentication token for the user currently logged in the applicationReturns the scroll modality of the task barReturns the floating state of the taskbarReturns the type of the task bar for the user currently logged in the applicationReturns the branch of the identityDeprecated.usegetBranchDescription()insteadReturns the description of the branch of the identityReturns the cultural conventions associated to the user currently logged in the applicationReturns the DB client identifierReturns the DBFieldMap associated to the identityReturns the language that correspond to the one saved in the database for the user currently logged in the applicationprotected LangTheLangthat will be used if there's no other configured language for this identityReturns the default theme for the user currently logged in the applicationReturns the string that represents the device for the user currently logged in the applicationReturns the document language, that is the language of the html document, to be used for example for the hypenation.getDoor()Returns the specific doorgetEmail()Returns the email address of the user currently logged in the applicationReturns the user extra types descriptions.Returns the user extra types.getFace()Returns the image associated to the user currently logged in the applicationDeprecated.usegetCompany()company property, insteadDeprecated.usegetCompany()companylogin property, insteadMethod that must be extended if you want to customize the window on which the user will land when accessing the applicationReturns to set of functions (privileges) of the user currently logged in the applicationReturns the gender of the user currently logged in the applicationbooleanDeprecated.useviewUnallowed()Return the attributes of the identityMethod that must be extended if you want to customize the entrance servlet for the usergetIp()getLang()Returns the language for the user currently logged in the applicationReturn the language specified by the passed param if it has been configured into di identity setupReturns the language hints provided from the user currently logged in the applicationReturns the language map defined in the IdentitySetup for the user currently logged in the applicationReturns date of the last log in for the user currently logged in the applicationReturns the date of the last setting of the password for the user currently logged in the applicationgetLayerIdentity(String layer) Extracts a basic layer Identity.getLog()Deprecated.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.intReturns the maximum possible number of access attempts failed for the user.intReturns the value of the maximum period of inactivity of the user currently logged in the application.intReturns the maximum possible period of inactivity for the user.intReturns the maximum possible value referred to the maximum period of inactivity of the user currently logged in the applicationintReturns the maximum number of views that the user currently logged in the application can concurrently opengetMenu()Method that must be extended if you want to customize the menu for the userlongReturns the value associated with the time of the last search for new messages for the user currently logged in the applicationintReturns the number of messages received by the user currently logged in the applicationintReturns the minimum possible value referred to the maximum period of inactivity of the user currently logged in the applicationMethod that must be extended if you want to customize the exit servlet for the userDeprecated.usegetCompany()package property, insteadGets the infos related to the picked profile.
The relevant infos are the picked profile id or description and which configuration were picked up.overit.geocall.servlet.ReferenceSet theReferencerelated to the browser's request.Returns the factory used to access the web resources.booleangetRtl()BETA VERSION Returns right-to-left capabilitygetState()Returns theStateobject that contains some configuration settings for the user currently logged in the applicationgetTheme()Returns the theme used for the user currently logged in the applicationMethod that must be extended if you want to customize the timezone assigned to the usergetType()Returns the user typeReturns the user type codeReturns the user type descriptiongetUser()Returns the numeric identifier of the user currently logged in the applicationoverit.geocall.servlet.UserAgentReturns the user agent for the user currently logged in the applicationReturns the description of the user currently logged in the applicationgetUserDesc(String textFormat) Returns the description of the user currently logged in the application, formatted with the specific format passed as parameterReturns the username of the user currently logged in the applicationReturns the name of the user currently logged in the applicationGets 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 surname of the user currently logged in the applicationDeprecated.usegetUsername()insteadintReturns the value of the maximum period of inactivity of the user currently logged in the web application.intReturns the duration of the access token for the user in the applicationReturns the way the new web views should be opened.getZones()Returns the different time zones as they has been defined in the IdentitySetupbooleanhasAllFunctions(List<String> list) Checks if the user currently logged has ALL the authorizations in a listbooleanChecks if the user currently logged in the application has or not a specific privilegebooleanDeprecated.usehasFunction(String)insteadbooleanGets if the user has some disabilities and must use the Geocall's accessible mode, or not.booleanReturn if the user's favorite box must be open or not.booleanReturn if the user have the password expiration.booleanCheck if the user password has been expired, or if it must be changedfinal booleanReturntrueif the identity is a system admin,falseotherwise.booleanReturn if the user is a system user.final booleanReturntrueif the identity is a tenant admin,falseotherwise.voidsetAccessToken(String accessToken) Associate the access token used to enter the application.voidsetAgentLang(String agentLang) Sets the lang that correspond to the browser languagevoidSets the attributes of the identityvoidSets a specific branch for the identityvoidsetDBFieldMap(DBFieldMap dbf) Sets the DBFieldMap associated to the identityvoidSets the language that correspond to the one saved in the database for the user currently logged in the applicationvoidSets the device for the user currently logged in the applicationvoidSets a specific doorvoidSets the email address of the user currently logged in the applicationvoidsetExtraTypes(Map<Long, String> extraTypes) Sets the user extra types.voidSets the image associated to the user currently logged in the applicationvoidsetFavoritesBoxOpen(boolean b) Set if the user's favorite box must be open or not.voidSets the gender of the user currently logged in the applicationvoidsetHideMenu(boolean hide) Deprecated.voidSet the ip address related to the browser from which the session has been created.voidsetLastAccessDate(Date lastAccessDate) Sets the date of the last log in for the user currently logged in the applicationvoidsetLastPasswordSet(Date lastPasswordSet) Sets the date of the last setting of the password for the user currently logged in the applicationvoidDeprecated.voidsetMaxInactiveInterval(int mii) Sets the value of the maximum period of inactivity of the user currently logged in the application.voidsetMessagesNumber(int n) Sets the number of messages received by the user currently logged in the application.voidsetNoExpiration(boolean noExpiration) Set this user as a user without password expiration.voidsetPickedProfile(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.voidsetReference(overit.geocall.servlet.Reference ref) Set theReferencerelated to the browser's request.voidsetResourceAuthorizationPolicy(overit.geocall.rs.auth.ResourceAuthorizationPolicy resourceAuthorizationPolicy) Set the jax-rs authorization rules for the user currently logged in the applicationvoidsetRtl(boolean b) BETA VERSION Sets right-to-left capabilityvoidSets theStateobject that contains some configuration settings for the user currently logged in the applicationvoidsetSystemUser(boolean systemUser) Set this user as a system user.voidSets the theme for the user currently logged in the applicationvoidSets the user typeprotected final voidsetup()voidSets the attributes of the user currently logged in the applicationvoidsetUserAccessibility(boolean b) Sets if the user has some disabilities and must use the Geocall's accessible mode, or not.voidsetUserAgent(overit.geocall.servlet.UserAgent ua) Sets the user agent for the user currently logged in the applicationvoidsetUserProfile(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.voidsetViewUnallowed(boolean view) Sets the visibility state of the unallowed options (tabs, menu voices, ...) for the user currently logged in the applicationvoidsetViewUnallowedExtendedAttributes(boolean view) Sets the visibility state of the EDM fields that the user can't view for the user currently logged in the applicationtoString()Returns a String representation of the Identitystatic voidunbind()Unbind the identity from the context identitybooleanChecks if the unallowed options (tabs, menu voices, ...) are visible for the user currently logged in the applicationbooleanChecks if the EDM fields that the user can't view are visible for the user currently logged in the application
-
Field Details
-
COMPANY_AUTH_MAX_INACTIVE_INTERVAL
- See Also:
-
COMPANY_UI_VIEW_UNALLOWED
- See Also:
-
COMPANY_UI_VIEW_UNALLOWED_EXTENDED_ATTRIBUTES
- See Also:
-
COMPANY_LANG
- See Also:
-
company
-
_userId
-
_userUsername
-
_userName
-
_userSurname
-
_email
-
_branch
-
_branchDesc
-
_gender
-
_face
-
functions
-
resourceAuthorizationPolicy
protected overit.geocall.rs.auth.ResourceAuthorizationPolicy resourceAuthorizationPolicy -
_userDesc
-
rtl
protected boolean rtl -
_dbLang
-
_agentLang
-
_defaultLang
-
_langMap
-
_lang
-
_langHints
-
_documentLang
-
_culturalConventions
-
_maxInactiveInterval
protected int _maxInactiveInterval -
_messagesNumber
protected int _messagesNumber -
_messagesLastSearch
protected long _messagesLastSearch -
_normalizationMode
protected int _normalizationMode -
_lastPasswordSet
-
_lastAccessDate
-
_hgIdentity
-
_viewUnallowed
protected boolean _viewUnallowed -
viewUnallowedExtendedAttributes
protected boolean viewUnallowedExtendedAttributes -
_door
-
_state
-
_userAgent
protected overit.geocall.servlet.UserAgent _userAgent -
_device
-
_dbf
-
_zones
-
_type
-
_typeDesc
-
_typeCode
-
_extraTypes
-
userProfile
-
pickedProfile
-
_ip
-
reference
protected overit.geocall.servlet.Reference reference -
accesibleMode
protected boolean accesibleMode -
accessToken
-
systemUser
protected boolean systemUser -
favoritesBoxOpen
protected boolean favoritesBoxOpen -
noExpiration
protected boolean noExpiration
-
-
Constructor Details
-
Identity
Create a new identity associated to the passed company- Parameters:
company- the company this identity belongs to
-
Identity
For routing purpose only- Parameters:
factory- Long containing the factory
-
Identity
Deprecated.useIdentity(Long)instead- Parameters:
userid- The id of the userfactory- Long containing the factory
-
Identity
Creates an Identity for the specific package passed as parameter- Parameters:
pkg- The string that identifies the package
-
Identity
Creates an Identity starting from the one passed as parameter- Parameters:
id- The Identity which we want to clone
-
-
Method Details
-
bind
Bind the identity to the context identity- Parameters:
id- the identity to bind
-
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()Returntrueif the identity is a system admin,falseotherwise.- Returns:
trueif the identity is a system admin,falseotherwise.
-
isTenantAdmin
public final boolean isTenantAdmin()Returntrueif the identity is a tenant admin,falseotherwise.- Returns:
trueif the identity is a tenant admin,falseotherwise.
-
getLayerIdentity
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
- Specified by:
getCompanyin interfaceScoped
-
getFactory
Deprecated.usegetCompany()company property, instead- Returns:
- the company id
-
getPackage
Deprecated.usegetCompany()package property, instead- Returns:
- the company application package
-
getFactoryLogin
Deprecated.usegetCompany()companylogin property, instead- Returns:
- the company description package
-
getBranchDesc
Deprecated.usegetBranchDescription()instead- Returns:
- the company description package
-
toString
Returns a String representation of the Identity -
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
Returns the numeric identifier of the user currently logged in the application -
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
Returns the email address of the user currently logged in the application- Returns:
- The string that represents the email
-
getBranch
Returns the branch of the identity -
getBranchDescription
Returns the description of the branch of the identity- Specified by:
getBranchDescriptionin interfaceScoped- Returns:
- The string that contains the branch description
-
setBranch
Sets a specific branch for the identity- Parameters:
branch- The long that represents the id of the branchbranchDesc- The string that contains the branch description
-
setGender
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
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
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
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
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
Returns the username of the user currently logged in the application- Specified by:
getUsernamein interfaceScoped- Returns:
- The string that represent the username of the user
-
getUserUsername
Deprecated.usegetUsername()insteadReturns the username of the user currently logged in the application- Returns:
- The string that represent the username of the user
-
getUserSurname
Returns the surname of the user currently logged in the application- Returns:
- The string that represent the surname of the user
-
getUserName
Returns the name of the user currently logged in the application- Returns:
- The string that represent the name of the user
-
setUser
Sets the attributes of the user currently logged in the application- Parameters:
value- The numeric identifier of the username- The name of the usersurname- The surname of the userusername- The username of the user
-
setEmail
Sets the email address of the user currently logged in the application- Parameters:
email- The string that contains the email address
-
setLog
Deprecated.- Parameters:
log- A log
-
getLog
Deprecated.- Returns:
- The log
-
addFunction
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
Returns to set of functions (privileges) of the user currently logged in the application- Specified by:
getFunctionsin interfaceScoped- Returns:
- The set of string each of which represents a privilege of the user
-
hasAllFunctions
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.usehasFunction(String)insteadChecks 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
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
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
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
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
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
Sets the lang that correspond to the browser language- Parameters:
agentLang- The string that correspond to the language
-
getLangMap
Returns the language map defined in the IdentitySetup for the user currently logged in the application- Returns:
- The language map
-
getLang
Returns the language for the user currently logged in the application- Returns:
- The
Langinferred from the settings of the database lang, agent lang, default lang
-
getLang
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
Langwhose name matches with the input name, ornullif it can not be found
-
getDefaultLang
TheLangthat will be used if there's no other configured language for this identity- Returns:
- the default
Lang
-
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
Returns the cultural conventions associated to the user currently logged in the application- Returns:
- The
Conventionsassociated to the user
-
getLangHints
Returns the language hints provided from the user currently logged in the application- Returns:
- The
LangHintsfrom 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- TheUserAgent
-
getUserAgent
public overit.geocall.servlet.UserAgent getUserAgent()Returns the user agent for the user currently logged in the application- Returns:
- The
UserAgent
-
setDevice
Sets the device for the user currently logged in the application- Parameters:
device- The string that represent the device
-
getDevice
Returns the string that represents the device for the user currently logged in the application- Returns:
- The string that represent the device
-
getDBFieldMap
Returns the DBFieldMap associated to the identity- Specified by:
getDBFieldMapin interfaceScoped- Returns:
- The
DBFieldMapassociated to the identity
-
setDBFieldMap
Sets the DBFieldMap associated to the identity- Parameters:
dbf- TheDBFieldMapto be set to the identity
-
setLastPasswordSet
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
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
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
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
Return the attributes of the identity- Returns:
- An
HashGettercontaining the attributes of the identity
-
setAttributes
Sets the attributes of the identity- Parameters:
hg- AnHashGettercontaining 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
Returns the default theme for the user currently logged in the application- Returns:
- The string that represent the name of the default theme
-
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.useviewUnallowed()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:
trueif the unallowed options are visible,falseotherwise
-
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:
trueif the EDM fields that the user can't view are visible,falseotherwise
-
setTheme
Sets the theme for the user currently logged in the application- Parameters:
theme- The string that represent the name of the theme
-
setHideMenu
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-trueif the unallowed options must be visible,falseotherwise
-
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-trueif the EDM fields that the user can't view must be visible,falseotherwise
-
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
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
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
Returns theStateobject that contains some configuration settings for the user currently logged in the application- Returns:
- The configuration state of the user
-
setState
Sets theStateobject that contains some configuration settings for the user currently logged in the application- Parameters:
state- The configuration state of the user
-
setDoor
Sets a specific door- Parameters:
door- The string that represents the door
-
getDoor
Returns the specific door- Returns:
- The string that represents the door
-
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
Method that must be extended if you want to customize the menu for the user- Returns:
- By default, the method returns null
-
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
Method that must be extended if you want to customize the exit servlet for the user- Returns:
- By default, the method returns null
-
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
Clones the identity- Overrides:
clonein classObject- Returns:
- The identity
- Throws:
CloneNotSupportedException- If the object's class does not support the Cloneable interface.
-
getZones
Returns the different time zones as they has been defined in the IdentitySetup- Returns:
- The
Zonesfor the identity
-
setType
Sets the user type- Parameters:
type- The long that represents the user typedesc- The description of the user typecode- The code of the user type
-
getType
Returns the user type- Returns:
- The long that represents the user type
-
getTypeDesc
Returns the user type description- Returns:
- The string that contains the user type description
-
getTypeCode
Returns the user type code- Returns:
- The string that contains the user type code
-
setExtraTypes
Sets the user extra types. Each user can have multiple types- Parameters:
extraTypes- aMap<Long, String>in which every entry is a couple id, description that defines an extra type for the user
-
setUserProfile
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
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
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
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
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
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
Returns the DB client identifier- Specified by:
getDBClientIdentifierin interfaceScoped- Returns:
- The string that contains the user type code
-
setIp
Set the ip address related to the browser from which the session has been created.- Parameters:
ip- ip address
-
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 theReferencerelated to the browser's request.- Parameters:
ref- theReferencerelated to the browser's request.
-
getReference
public overit.geocall.servlet.Reference getReference()Set theReferencerelated to the browser's request.- Returns:
- The
Referencerelated to the browser's request.
-
isPasswordExpired
public boolean isPasswordExpired()Check if the user password has been expired, or if it must be changed- Returns:
trueif the password must be changed;falseotherwise
-
setRtl
public void setRtl(boolean b) BETA VERSION Sets right-to-left capability- Parameters:
b- iftrueis enabled,falseotherwise
-
getRtl
public boolean getRtl()BETA VERSION Returns right-to-left capability- Returns:
trueif right-to-left is enabled,falseotherwise
-
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
Check if the current user can access to the REST resource- Parameters:
uri- the resource's uri pathmethod- the http method- Returns:
trueif the user can access to the specific resource,falseotherwise.
-
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-trueif the user has some disabilities and must use the Geocall's accessible mode,falseotherwise.
-
isAccessibleMode
public boolean isAccessibleMode()Gets if the user has some disabilities and must use the Geocall's accessible mode, or not.- Returns:
trueif the user has some disabilities and must use the Geocall's accessible mode,falseotherwise.
-
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
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,
nullotherwise.
-
setAccessToken
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 betrue, otherwisefalse. Default value isfalse
-
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 returnfalse
-
isSystemUser
public boolean isSystemUser()Return if the user is a system user.- Returns:
trueif the user is a system user, otherwise returnfalse.
-
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:
trueif the user's favorite box must be open, otherwise returnfalse.
-
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.
-
Identity(Long)instead