Class QSession
java.lang.Object
com.kingsrook.qqq.backend.core.model.session.QSession
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
QSystemUserSession
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the map of security key values in the session.clone()Getter for backendVariantsGetter for clientChannel - the full channel, e.g. assistant/turn-123 (null when the request named no client).The channel name: the client channel up to its first '/', lower-cased (e.g. assistant for assistant/turn-123); null when there is none.Getter for credentialScope - the scope of the credential (e.g. access token) the session came from; null when unrestricted.Getter for idReferenceGetter for permissionsGetter for securityKeyValuesgetSecurityKeyValues(String keyName) Getter for securityKeyValues - the list under a given key - never null.getSecurityKeyValues(String keyName, QFieldType type) Getter for securityKeyValues - the list under a given key - as the expected tye - never null.getUser()Getter for usergetUuid()Getter for uuidGetter for valuesForFrontendbooleanhasPermission(String permissionName) booleanhasSecurityKeyValue(String keyName, Serializable value) Test if this session has a given value for a given keybooleanhasSecurityKeyValue(String keyName, Serializable value, QFieldType fieldType) voidremoveValue(String key) voidsetBackendVariants(Map<String, Serializable> backendVariants) Setter for backendVariantsvoidsetClientChannel(String clientChannel) Setter for clientChannelvoidsetCredentialScope(QCredentialScope credentialScope) Setter for credentialScopevoidsetIdReference(String idReference) Setter for idReferencevoidsetPermissions(Set<String> permissions) Setter for permissionsvoidsetSecurityKeyValues(Map<String, List<Serializable>> securityKeyValues) Setter for securityKeyValuesvoidSetter for uservoidSetter for uuidvoidvoidvoidsetValuesForFrontend(Map<String, Serializable> valuesForFrontend) Setter for valuesForFrontendwithBackendVariants(Map<String, Serializable> backendVariants) Fluent setter for backendVariantswithClientChannel(String clientChannel) Fluent setter for clientChannelwithCredentialScope(QCredentialScope credentialScope) Fluent setter for credentialScope - set by the authentication module's customizer for scoped credentials; it can only narrow access.withPermission(String permission) withPermissions(String... permissionNames) withPermissions(Collection<String> permissionNames) withSecurityKeyValue(String keyName, Serializable value) Fluent setter for securityKeyValues - add 1 value for 1 key.withSecurityKeyValues(Map<String, List<Serializable>> securityKeyValues) Fluent setter for securityKeyValues - replaces the map.Fluent setter for userwithValueForFrontend(String key, Serializable value) Fluent setter for a single valuesForFrontendwithValuesForFrontend(Map<String, Serializable> valuesForFrontend) Fluent setter for valuesForFrontend
-
Field Details
-
VALUE_KEY_USER_TIMEZONE
- See Also:
-
VALUE_KEY_USER_TIMEZONE_OFFSET_MINUTES
- See Also:
-
-
Constructor Details
-
QSession
public QSession()Default constructor, puts a uuid in the session
-
-
Method Details
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
getIdReference
Getter for idReference -
setIdReference
Setter for idReference -
getUser
Getter for user -
setUser
Setter for user -
getValue
-
setValue
-
removeValue
-
withValue
-
getValues
-
setValues
-
getClientChannel
Getter for clientChannel - the full channel, e.g. assistant/turn-123 (null when the request named no client). -
getClientChannelName
The channel name: the client channel up to its first '/', lower-cased (e.g. assistant for assistant/turn-123); null when there is none. -
getCredentialScope
Getter for credentialScope - the scope of the credential (e.g. access token) the session came from; null when unrestricted. -
setCredentialScope
Setter for credentialScope -
withCredentialScope
Fluent setter for credentialScope - set by the authentication module's customizer for scoped credentials; it can only narrow access. -
setClientChannel
Setter for clientChannel -
withClientChannel
-
getUuid
Getter for uuid -
setUuid
Setter for uuid -
getSecurityKeyValues
Getter for securityKeyValues -
getSecurityKeyValues
Getter for securityKeyValues - the list under a given key - never null. -
getSecurityKeyValues
Getter for securityKeyValues - the list under a given key - as the expected tye - never null. -
hasSecurityKeyValue
Test if this session has a given value for a given key -
hasSecurityKeyValue
-
setSecurityKeyValues
Setter for securityKeyValues -
withSecurityKeyValues
Fluent setter for securityKeyValues - replaces the map. -
withSecurityKeyValue
Fluent setter for securityKeyValues - add 1 value for 1 key. -
clearSecurityKeyValues
public void clearSecurityKeyValues()Clear the map of security key values in the session. -
setPermissions
-
withPermission
-
withPermissions
-
withPermissions
-
hasPermission
-
getPermissions
-
withUser
-
getBackendVariants
Getter for backendVariants -
setBackendVariants
Setter for backendVariants -
withBackendVariants
Fluent setter for backendVariants -
getValuesForFrontend
Getter for valuesForFrontend -
setValuesForFrontend
Setter for valuesForFrontend -
withValuesForFrontend
Fluent setter for valuesForFrontend -
withValueForFrontend
Fluent setter for a single valuesForFrontend
-