|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.infront.navigation.UserState
public class 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:
Constructor Summary | |
---|---|
UserState()
|
Method Summary | |
---|---|
void |
addUserSegments(String userSegments)
Convenience method to add a user segments to the currently active set of user segments. |
Date |
getDate()
|
String |
getDateAsString()
|
String |
getUserAgent()
|
Set<String> |
getUserSegments()
|
void |
setDate(Date date)
Sets the date; this is useful for previewing what a site looks like on a particular date. |
void |
setDateAsString(String date)
Convenience method to set the date from a String of the format "yyyy-MM-dd'T'HH:mm" . |
void |
setUserAgent(String userAgent)
Sets the user-agent; this is useful for previewing what a site looks like with a particular user-agent. |
void |
setUserSegments(Set<String> userSegments)
Sets the set of user segments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserState()
Method Detail |
---|
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 setDate(Date date)
date
- the new datesetDateAsString(String)
public void setDateAsString(String date) throws ParseException
"yyyy-MM-dd'T'HH:mm"
.
date
- the new date
ParseException
- 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |