BBjThinClient::setUserProperties


Description

In BBj 15.0 and higher, this method sets multiple client-side properties within a given property group.

 See below.

Syntax

Return Value

Method

void

setUserProperties(long group, java.util.Map map)

void

setUserProperties(java.util.Map map)

Parameters

Variable

Description

group

  • USER_PROPERTIES_COOKIES (0)

  • USER_PROPERTIES_STORAGE (1)

  • USER_PROPERTIES_SESSION (-1)

map

A Map structure containing key/value pairs to be set in the specified property group.

Return Value

None.

Remarks

In BUI, USER_PROPERTIES_COOKIES maps to browser cookies with a 30-day expiration, USER_PROPERTIES_STORAGE maps to browser local storage, and USER_PROPERTIES_SESSION maps to browser session storage. Any other group value is treated as a cookie with a specified expiration timestamp (e.g. System.currentTimeMillis()+24*60*60*1000*7 is exactly 7 days from now).

In GUI, the three groups map to nodes in a Preferences tree.

If no group is specified, the default value is taken from STBL("!USER_PROPERTIES").

Example

tc! = bbjapi().getThinClient()

props! = new java.util.HashMap()

props!.put("key1","value1")

props!.put("key2","value2")

tc!.setUserProperties(props!)

print tc!.getUserProperties() 

See Also

BBjAPI

BBjThinClient::getUserProperties

BBjThinClient::setUserProperty

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.



______________________________________________________________________________________

Copyright BASIS International Ltd. BBj®, Visual PRO/5®, PRO/5®, and BBx® are registered trademarks.