public class Session extends Item implements TimestampedItem
Profile
) and a unomi-enabled application. A session represents a sequence of operations the user
performed during its duration. In the context of web applications, sessions are usually linked to HTTP sessions.Modifier and Type | Field and Description |
---|---|
static String |
ITEM_TYPE
The Session ITEM_TYPE.
|
itemId, itemType, systemMetadata, version
Constructor and Description |
---|
Session()
Instantiates a new Session.
|
Session(String itemId,
Profile profile,
Date timeStamp,
String scope)
Instantiates a new Session.
|
Modifier and Type | Method and Description |
---|---|
int |
getDuration()
Retrieves the duration.
|
Date |
getLastEventDate()
Retrieves the last event date.
|
Profile |
getProfile()
Retrieves the associated Profile.
|
String |
getProfileId()
Retrieves the identifier of the associated Profile.
|
Map<String,Object> |
getProperties()
Retrieves a Map of all property name - value pairs.
|
Object |
getProperty(String name)
Retrieves the property identified by the specified name.
|
String |
getScope()
Retrieves the Item's scope.
|
int |
getSize()
Retrieves the size.
|
Map<String,Object> |
getSystemProperties()
Retrieves a Map of system property name - value pairs.
|
Date |
getTimeStamp()
Retrieves the session creation timestamp.
|
void |
setLastEventDate(Date lastEventDate)
Sets the last event date.
|
void |
setProfile(Profile profile)
Sets the associated Profile.
|
void |
setProperties(Map<String,Object> properties)
Sets the property name - value pairs.
|
void |
setProperty(String name,
Object value)
Sets the property identified by the specified name to the specified value.
|
void |
setScope(String scope) |
void |
setSize(int size)
Sets the size.
|
void |
setSystemProperties(Map<String,Object> systemProperties)
Specifies the system property name - value pairs.
|
equals, getItemId, getItemType, getItemType, getSystemMetadata, getVersion, hashCode, setItemId, setItemType, setSystemMetadata, setVersion
public static final String ITEM_TYPE
public String getProfileId()
public Profile getProfile()
public void setProfile(Profile profile)
profile
- the associated Profilepublic void setProperty(String name, Object value)
name
- the name of the property to setvalue
- the value of the propertypublic Object getProperty(String name)
name
- the name of the property to retrievenull
if no such property existspublic Map<String,Object> getProperties()
public void setProperties(Map<String,Object> properties)
properties
- a Map containing the property name - value pairspublic Map<String,Object> getSystemProperties()
public void setSystemProperties(Map<String,Object> systemProperties)
systemProperties
- a Map of system property name - value pairspublic Date getTimeStamp()
getTimeStamp
in interface TimestampedItem
public Date getLastEventDate()
public void setLastEventDate(Date lastEventDate)
lastEventDate
- the last event datepublic int getDuration()
public int getSize()
public void setSize(int size)
size
- the sizeCopyright © 2014–2022 Apache Software Foundation. All rights reserved.