Package com.aquima.web.api.converter
Class SessionIdToSessionConverter
java.lang.Object
com.aquima.web.api.converter.SessionIdToSessionConverter
- All Implemented Interfaces:
org.springframework.core.convert.converter.GenericConverter
@Component
public class SessionIdToSessionConverter
extends Object
implements org.springframework.core.convert.converter.GenericConverter
Converts a String session ID parameter to an IAquimaSession by obtaining the session with the given id from the
session manager.
The flush mode used is that declared by the AquimaSessionId
annotation on the parameter. If
FlushMode.AUTO
is used, the effective flush mode is determined based on the current HTTP request method:
FlushMode.ALWAYS
- for POST, PUT, PATCH and DELETE request methodsFlushMode.NEVER
- for all other request methods
- Since:
- 11.0
- Author:
- Petru Galanton
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.core.convert.converter.GenericConverter
org.springframework.core.convert.converter.GenericConverter.ConvertiblePair
-
Constructor Summary
ConstructorsConstructorDescriptionSessionIdToSessionConverter
(com.blueriq.component.api.IAquimaSessionsMap sessionManager) -
Method Summary
-
Constructor Details
-
SessionIdToSessionConverter
@Autowired public SessionIdToSessionConverter(com.blueriq.component.api.IAquimaSessionsMap sessionManager)
-
-
Method Details
-
getConvertibleTypes
public Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()- Specified by:
getConvertibleTypes
in interfaceorg.springframework.core.convert.converter.GenericConverter
-
convert
public Object convert(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType) - Specified by:
convert
in interfaceorg.springframework.core.convert.converter.GenericConverter
-