UserState
An object that contains user segments and date state information. This state is used
to control the experience that a particular user has when visiting a site.
Examples:
@Deprecated public class UserState extends Object
Constructor and Description |
---|
UserState()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addProfileGroups(String profileGroups)
Deprecated.
Convenience method to add a profile groups to the currently active
set of profile groups.
|
void |
addUserSegments(String userSegments)
Deprecated.
Convenience method to add a user segments to the currently active
set of user segments.
|
Date |
getDate()
Deprecated.
|
String |
getDateAsString()
Deprecated.
|
Set<String> |
getProfileGroups()
Deprecated.
|
String |
getUserAgent()
Deprecated.
|
Set<String> |
getUserSegments()
Deprecated.
|
void |
setDate(Date date)
Deprecated.
Sets the date; this is useful for previewing what a site looks like
on a particular date.
|
void |
setDateAsString(String date)
Deprecated.
Convenience method to set the date from a String of the format
"yyyy-MM-dd'T'HH:mm" . |
void |
setProfileGroups(Set<String> profileGroups)
Deprecated.
Sets the set of profile groups.
|
void |
setUserAgent(String userAgent)
Deprecated.
Sets the user-agent; this is useful for previewing what a site looks
like with a particular user-agent.
|
void |
setUserSegments(Set<String> userSegments)
Deprecated.
Sets the set of user segments.
|
public void setUserSegments(Set<String> userSegments)
Set
.userSegments
- the new user segmentsaddUserSegments(String)
public Set<String> getUserSegments()
public void addUserSegments(String userSegments)
userSegments
- the new user segmentpublic void setProfileGroups(Set<String> profileGroups)
Set
.profileGroups
- the new profile groups#setProfileGroups(Set)
public Set<String> getProfileGroups()
public void addProfileGroups(String profileGroups)
profileGroups
- the new profile groups stringpublic void setDate(Date date)
date
- the new datesetDateAsString(String)
public void setDateAsString(String date) throws ParseException
"yyyy-MM-dd'T'HH:mm"
.date
- the new dateParseException
- if an error occurs while parsing the
input Stringpublic Date getDate()
public String getDateAsString()
"yyyy-MM-dd'T'HH:mm"
.
May also return null to indicate the current date.public void setUserAgent(String userAgent)
userAgent
- the new user-agentpublic String getUserAgent()
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.