public.javadoc.org.spincast.plugins.session.SpincastSessionDefault.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastSessionDefault (org.spincast:spincast-framework 2.1.1 API)
Package org.spincast.plugins.session
Class SpincastSessionDefault
java.lang.Object
org.spincast.plugins.session.SpincastSessionDefault
- All Implemented Interfaces:
SpincastSession
-
Constructor Summary
Constructor
Description
SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
boolean setAsDirty,
boolean isNew,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
boolean setAsDirty,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
SpincastSessionDefault(JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
Constructor for a *new* session.
-
Method Summary
Modifier and Type
Method
Description
Returns a mutable JsonObject
representing the
attributes of the session.
protected String
protected String
The Instant at which the session was created.
getId()
The unique id of this session.
protected JsonManager
The Instant at which the session was modified
for the last time.
protected SpincastSessionManager
void
Sets the session as "not valid anymore".
boolean
isDirty()
Was the session modified since it was loaded?
protected boolean
boolean
Has the session been invalidated?
boolean
isNew()
Returns true
if the session
has been created in the current request.
void
setDirty()
This allows you to flag a session as being
dirty, even if its attributes don't change.
toString()
-
Constructor Details
-
SpincastSessionDefault
public SpincastSessionDefault(JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
Constructor for a *new* session.
-
SpincastSessionDefault
public SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
@Nullable
JsonObject attributes,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
-
SpincastSessionDefault
public SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
@Nullable
JsonObject attributes,
boolean setAsDirty,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
-
SpincastSessionDefault
public SpincastSessionDefault(String sessionId,
Instant creationDate,
Instant modificationDate,
JsonObject attributes,
boolean setAsDirty,
boolean isNew,
JsonManager jsonManager,
SpincastSessionManager spincastSessionManager)
-
Method Details
-
getJsonManager
-
getSpincastSessionManager
-
getAttributesHash
-
getAttributesInitialHash
-
isForcedAsDirty
protected boolean isForcedAsDirty()
-
getId
Description copied from interface: SpincastSession
The unique id of this session.
- Specified by:
getId
in interface SpincastSession
-
isNew
public boolean isNew()
Description copied from interface: SpincastSession
Returns true
if the session
has been created in the current request.
- Specified by:
isNew
in interface SpincastSession
-
getAttributes
Description copied from interface: SpincastSession
Returns a mutable JsonObject
representing the
attributes of the session. You can use this object
to get/retrieve/delete attributes.
- Specified by:
getAttributes
in interface SpincastSession
-
getCreationDate
Description copied from interface: SpincastSession
The Instant at which the session was created.
- Specified by:
getCreationDate
in interface SpincastSession
-
getModificationDate
Description copied from interface: SpincastSession
The Instant at which the session was modified
for the last time.
- Specified by:
getModificationDate
in interface SpincastSession
-
isDirty
public boolean isDirty()
Description copied from interface: SpincastSession
Was the session modified since it was loaded?
- Specified by:
isDirty
in interface SpincastSession
-
setDirty
public void setDirty()
Description copied from interface: SpincastSession
This allows you to flag a session as being
dirty, even if its attributes don't change.
This will force the session to be saved in
the database.
- Specified by:
setDirty
in interface SpincastSession
-
invalidate
public void invalidate()
Description copied from interface: SpincastSession
Sets the session as "not valid anymore".
- Specified by:
invalidate
in interface SpincastSession
-
isInvalidated
public boolean isInvalidated()
Description copied from interface: SpincastSession
Has the session been invalidated?
- Specified by:
isInvalidated
in interface SpincastSession
-
toString