Class SessionServiceBase

  • All Implemented Interfaces:
    com.soffid.iam.service.SessionService
    Direct Known Subclasses:
    SessionServiceImpl

    public abstract class SessionServiceBase
    extends Object
    implements com.soffid.iam.service.SessionService

    Spring Service base class for com.soffid.iam.service.SessionService, provides access to all services and entities referenced by this service.

    see com.soffid.iam.service.SessionService
    • Constructor Detail

      • SessionServiceBase

        public SessionServiceBase()
    • Method Detail

      • setAccountEntityDao

        public void setAccountEntityDao​(AccountEntityDao accountEntityDao)
        Sets reference to accountEntityDao.
      • getAccountEntityDao

        public AccountEntityDao getAccountEntityDao()
        Gets reference to accountEntityDao.
      • setHostEntityDao

        public void setHostEntityDao​(HostEntityDao maquinaEntityDao)
        Sets reference to maquinaEntityDao.
      • getHostEntityDao

        public HostEntityDao getHostEntityDao()
        Gets reference to maquinaEntityDao.
      • setAccessLogEntityDao

        public void setAccessLogEntityDao​(AccessLogEntityDao registreAccesEntityDao)
        Sets reference to registreAccesEntityDao.
      • getAccessLogEntityDao

        public AccessLogEntityDao getAccessLogEntityDao()
        Gets reference to registreAccesEntityDao.
      • setServiceEntityDao

        public void setServiceEntityDao​(ServiceEntityDao serveiEntityDao)
        Sets reference to serveiEntityDao.
      • getServiceEntityDao

        public ServiceEntityDao getServiceEntityDao()
        Gets reference to serveiEntityDao.
      • setSessionEntityDao

        public void setSessionEntityDao​(SessionEntityDao sessioEntityDao)
        Sets reference to sessioEntityDao.
      • getSessionEntityDao

        public SessionEntityDao getSessionEntityDao()
        Gets reference to sessioEntityDao.
      • setUserEntityDao

        public void setUserEntityDao​(UserEntityDao usuariEntityDao)
        Sets reference to usuariEntityDao.
      • getUserEntityDao

        public UserEntityDao getUserEntityDao()
        Gets reference to usuariEntityDao.
      • getSessionByHost

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Session getSessionByHost​(long id,
                                                           String hostIp)
                                                    throws es.caib.seycon.ng.exception.InternalErrorException,
                                                           es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getSessionByHost in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetSessionByHost

        protected abstract com.soffid.iam.api.Session handleGetSessionByHost​(long id,
                                                                             String hostIp)
                                                                      throws Exception
        Throws:
        Exception
      • getSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Session getSession​(long id,
                                                     String key)
                                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                                     es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getSession in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetSession

        protected abstract com.soffid.iam.api.Session handleGetSession​(long id,
                                                                       String key)
                                                                throws Exception
        Throws:
        Exception
      • registerSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Session registerSession​(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:
        registerSession in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRegisterSession

        protected abstract com.soffid.iam.api.Session handleRegisterSession​(String codiUsuari,
                                                                            String nomMaquina,
                                                                            String nomAquinaClient,
                                                                            int port,
                                                                            String key,
                                                                            String authenticationMethod)
                                                                     throws Exception
        Throws:
        Exception
      • registerWebSession

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public com.soffid.iam.api.Session registerWebSession​(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:
        registerWebSession in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
        es.caib.seycon.ng.exception.UnknownUserException
      • handleRegisterWebSession

        protected abstract com.soffid.iam.api.Session handleRegisterWebSession​(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 com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findActiveSessions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.Session> findActiveSessions()
                                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findActiveSessions in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindActiveSessions

        protected abstract Collection<com.soffid.iam.api.Session> handleFindActiveSessions()
                                                                                    throws Exception
        Throws:
        Exception
      • getActiveSessions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.Session> getActiveSessions()
                                                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                        es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getActiveSessions in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetActiveSessions

        protected abstract Collection<com.soffid.iam.api.Session> handleGetActiveSessions()
                                                                                   throws Exception
        Throws:
        Exception
      • getActiveSessions

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.api.Session> getActiveSessions​(long idUsuari)
                                                                 throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                        es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getActiveSessions in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetActiveSessions

        protected abstract Collection<com.soffid.iam.api.Session> 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 com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCleanTransientKey

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

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void destroySession​(com.soffid.iam.api.Session sessio)
                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        destroySession in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleDestroySession

        protected abstract void handleDestroySession​(com.soffid.iam.api.Session sessio)
                                              throws Exception
        Throws:
        Exception
      • sessionKeepAlive

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void sessionKeepAlive​(com.soffid.iam.api.Session session)
                              throws es.caib.seycon.ng.exception.InternalErrorException,
                                     es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        sessionKeepAlive in interface com.soffid.iam.service.SessionService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleSessionKeepAlive

        protected abstract void handleSessionKeepAlive​(com.soffid.iam.api.Session 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