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 methods
  • FlushMode.NEVER - for all other request methods
If this converter is used outside the context of a Servlet HTTP request, FlushMode.AUTO is handled as FlushMode.ALWAYS.

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

    Constructors
    Constructor
    Description
    SessionIdToSessionConverter(com.blueriq.component.api.IAquimaSessionsMap sessionManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(Object source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
     
    Set<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface org.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 interface org.springframework.core.convert.converter.GenericConverter