Class SessioServiceBase

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

    public abstract class SessioServiceBase
    extends Object
    implements es.caib.seycon.ng.servei.SessioService

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

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

      • SessioServiceBase

        public SessioServiceBase()
    • Method Detail

      • setSessionService

        public void setSessionService​(com.soffid.iam.service.SessionService sessionService)
        Sets reference to sessionService.
      • getSessionService

        public com.soffid.iam.service.SessionService getSessionService()
        Gets reference to sessionService.
      • getSessioByHost

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.Sessio getSessioByHost​(long id,
                                                             String hostIp)
                                                      throws es.caib.seycon.ng.exception.InternalErrorException,
                                                             es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getSessioByHost in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetSessioByHost

        protected abstract es.caib.seycon.ng.comu.Sessio handleGetSessioByHost​(long id,
                                                                               String hostIp)
                                                                        throws Exception
        Throws:
        Exception
      • getSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.Sessio getSession​(long id,
                                                        String key)
                                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                                        es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getSession in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetSession

        protected abstract es.caib.seycon.ng.comu.Sessio handleGetSession​(long id,
                                                                          String key)
                                                                   throws Exception
        Throws:
        Exception
      • registerSessio

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.Sessio registerSessio​(String codiUsuari,
                                                            String nomMaquina,
                                                            String nomAquinaClient,
                                                            int port,
                                                            String key,
                                                            String authenticationMethod)
                                                     throws es.caib.seycon.ng.exception.InternalErrorException,
                                                            es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        registerSessio in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRegisterSessio

        protected abstract es.caib.seycon.ng.comu.Sessio handleRegisterSessio​(String codiUsuari,
                                                                              String nomMaquina,
                                                                              String nomAquinaClient,
                                                                              int port,
                                                                              String key,
                                                                              String authenticationMethod)
                                                                       throws Exception
        Throws:
        Exception
      • registraSessioWeb

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.Sessio registraSessioWeb​(String codiUsuari,
                                                               String nomMaquina,
                                                               String nomMaquinaClient,
                                                               String url,
                                                               String authenticationMethod)
                                                        throws es.caib.seycon.ng.exception.InternalErrorException,
                                                               es.caib.seycon.ng.exception.InternalErrorException,
                                                               es.caib.seycon.ng.exception.UnknownUserException
        Specified by:
        registraSessioWeb in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.seycon.ng.exception.UnknownUserException
      • handleRegistraSessioWeb

        protected abstract es.caib.seycon.ng.comu.Sessio handleRegistraSessioWeb​(String codiUsuari,
                                                                                 String nomMaquina,
                                                                                 String nomMaquinaClient,
                                                                                 String url,
                                                                                 String authenticationMethod)
                                                                          throws Exception
        Throws:
        Exception
      • updateTransientKey

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String updateTransientKey​(long id,
                                         String key)
                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        updateTransientKey in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findActiveSessions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<es.caib.seycon.ng.comu.Sessio> findActiveSessions()
                                                                     throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                            es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findActiveSessions in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindActiveSessions

        protected abstract Collection<es.caib.seycon.ng.comu.Sessio> handleFindActiveSessions()
                                                                                       throws Exception
        Throws:
        Exception
      • getActiveSessions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<es.caib.seycon.ng.comu.Sessio> getActiveSessions()
                                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getActiveSessions in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetActiveSessions

        protected abstract Collection<es.caib.seycon.ng.comu.Sessio> handleGetActiveSessions()
                                                                                      throws Exception
        Throws:
        Exception
      • getActiveSessions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<es.caib.seycon.ng.comu.Sessio> getActiveSessions​(long idUsuari)
                                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getActiveSessions in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetActiveSessions

        protected abstract Collection<es.caib.seycon.ng.comu.Sessio> handleGetActiveSessions​(long idUsuari)
                                                                                      throws Exception
        Throws:
        Exception
      • cleanTransientKey

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void cleanTransientKey​(long id,
                                      String key)
                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                      es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        cleanTransientKey in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCleanTransientKey

        protected abstract void handleCleanTransientKey​(long id,
                                                        String key)
                                                 throws Exception
        Throws:
        Exception
      • destroySessio

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void destroySessio​(es.caib.seycon.ng.comu.Sessio sessio)
                           throws es.caib.seycon.ng.exception.InternalErrorException,
                                  es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        destroySessio in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDestroySessio

        protected abstract void handleDestroySessio​(es.caib.seycon.ng.comu.Sessio sessio)
                                             throws Exception
        Throws:
        Exception
      • sessioKeepAlive

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void sessioKeepAlive​(es.caib.seycon.ng.comu.Sessio session)
                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        sessioKeepAlive in interface es.caib.seycon.ng.servei.SessioService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleSessioKeepAlive

        protected abstract void handleSessioKeepAlive​(es.caib.seycon.ng.comu.Sessio session)
                                               throws Exception
        Throws:
        Exception
      • getPrincipal

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