Package ai.tock.bot.engine.user
Class UserState
-
- All Implemented Interfaces:
public final class UserStateThe user state.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanprofileLoadedprivate BooleanbotDisabledprivate final InstantcreationDateprivate final Map<String, TimeBoxedFlag>flags
-
Constructor Summary
Constructors Constructor Description UserState(Instant creationDate, Map<String, TimeBoxedFlag> flags)
-
Method Summary
Modifier and Type Method Description final BooleangetProfileLoaded()final UnitsetProfileLoaded(Boolean profileLoaded)final BooleangetBotDisabled()final UnitsetBotDisabled(Boolean botDisabled)final InstantgetCreationDate()The user creation date. final Map<String, TimeBoxedFlag>getFlags()The flag for this user - useful to store basic information about this user. final Unitcleanup()Cleanup the state. final StringgetFlag(String flag)final BooleanhasFlag(String flag)final UnitsetFlag(String flag, Long timeoutInMinutes, String value)final UnitsetFlag(String flag, Duration timeoutDuration, String value)final UnitremoveFlag(String flag)final UnitsetUnlimitedFlag(String flag, String value)-
-
Constructor Detail
-
UserState
UserState(Instant creationDate, Map<String, TimeBoxedFlag> flags)
-
-
Method Detail
-
getProfileLoaded
final Boolean getProfileLoaded()
-
setProfileLoaded
final Unit setProfileLoaded(Boolean profileLoaded)
-
getBotDisabled
final Boolean getBotDisabled()
-
setBotDisabled
final Unit setBotDisabled(Boolean botDisabled)
-
getCreationDate
final Instant getCreationDate()
The user creation date.
-
getFlags
final Map<String, TimeBoxedFlag> getFlags()
The flag for this user - useful to store basic information about this user.
-
removeFlag
final Unit removeFlag(String flag)
-
setUnlimitedFlag
final Unit setUnlimitedFlag(String flag, String value)
-
-
-
-