Class SessionCacheServiceBase

  • All Implemented Interfaces:
    es.caib.seycon.ng.servei.SessionCacheService

    public abstract class SessionCacheServiceBase
    extends Object
    implements es.caib.seycon.ng.servei.SessionCacheService

    Spring Service base class for es.caib.seycon.ng.servei.SessionCacheService, provides access to all services and entities referenced by this service.

    see es.caib.seycon.ng.servei.SessionCacheService
    • Constructor Detail

      • SessionCacheServiceBase

        public SessionCacheServiceBase()
    • Method Detail

      • setSessionCacheService

        public void setSessionCacheService​(com.soffid.iam.service.SessionCacheService sessionCacheService)
        Sets reference to sessionCacheService.
      • getSessionCacheService

        public com.soffid.iam.service.SessionCacheService getSessionCacheService()
        Gets reference to sessionCacheService.
      • getObject

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Object getObject​(String tag)
                         throws es.caib.seycon.ng.exception.InternalErrorException,
                                es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getObject in interface es.caib.seycon.ng.servei.SessionCacheService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • clearSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String clearSession()
                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        clearSession in interface es.caib.seycon.ng.servei.SessionCacheService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • createSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String createSession()
                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        createSession in interface es.caib.seycon.ng.servei.SessionCacheService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getCurrentSessionId

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String getCurrentSessionId()
                                   throws es.caib.seycon.ng.exception.InternalErrorException,
                                          es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getCurrentSessionId in interface es.caib.seycon.ng.servei.SessionCacheService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • setSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String setSession​(String sessionId)
                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                 es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        setSession in interface es.caib.seycon.ng.servei.SessionCacheService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • putObject

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void putObject​(String tag,
                              Object value)
                       throws es.caib.seycon.ng.exception.InternalErrorException,
                              es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        putObject in interface es.caib.seycon.ng.servei.SessionCacheService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getPrincipal

        protected Principal getPrincipal()
        Gets the current principal if one has been set, otherwise returns null.
        Returns:
        the current principal