Class SeyconServerServiceBase

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

    public abstract class SeyconServerServiceBase
    extends Object
    implements es.caib.seycon.ng.servei.SeyconServerService

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

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

      • SeyconServerServiceBase

        public SeyconServerServiceBase()
    • Method Detail

      • setSyncServerService

        public void setSyncServerService​(com.soffid.iam.service.SyncServerService syncServerService)
        Sets reference to syncServerService.
      • getSyncServerService

        public com.soffid.iam.service.SyncServerService getSyncServerService()
        Gets reference to syncServerService.
      • getAgentTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.SeyconAgentTaskLog getAgentTask​(String url,
                                                                      String agentName,
                                                                      Long taskId)
                                                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                      es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getAgentTask in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetAgentTask

        protected abstract es.caib.seycon.ng.comu.SeyconAgentTaskLog handleGetAgentTask​(String url,
                                                                                        String agentName,
                                                                                        Long taskId)
                                                                                 throws Exception
        Throws:
        Exception
      • getSyncServerInfo

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public es.caib.seycon.ng.comu.SeyconServerInfo getSyncServerInfo​(String url)
                                                                  throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                         es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getSyncServerInfo in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetSyncServerInfo

        protected abstract es.caib.seycon.ng.comu.SeyconServerInfo handleGetSyncServerInfo​(String url)
                                                                                    throws Exception
        Throws:
        Exception
      • getSeyconServerLog

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public InputStream getSeyconServerLog​(String urlServer)
                                       throws es.caib.seycon.ng.exception.InternalErrorException,
                                              es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getSeyconServerLog in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getServerService

        @Transactional(rollbackFor=java.lang.Exception.class)
        public Object getServerService​(String servicePath)
                                throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getServerService in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • tailServerLog

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public String[] tailServerLog​(String urlServer)
                               throws es.caib.seycon.ng.exception.InternalErrorException,
                                      es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        tailServerLog in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • findUnscheduledTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<com.soffid.iam.ui.SeyconTask> findUnscheduledTasks()
                                                                      throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        findUnscheduledTasks in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleFindUnscheduledTasks

        protected abstract Collection<com.soffid.iam.ui.SeyconTask> handleFindUnscheduledTasks()
                                                                                        throws Exception
        Throws:
        Exception
      • getAgentTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<es.caib.seycon.ng.comu.SeyconAgentTaskLog> getAgentTasks​(String url,
                                                                                   String agentCodi)
                                                                            throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                   es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getAgentTasks in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getPendingTasksInfo

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

        protected abstract Collection<es.caib.seycon.ng.comu.SeyconServerInfo> handleGetPendingTasksInfo()
                                                                                                  throws Exception
        Throws:
        Exception
      • getServerAgentStatus

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

        protected abstract Collection<es.caib.seycon.ng.comu.AgentStatusInfo> handleGetServerAgentStatus()
                                                                                                  throws Exception
        Throws:
        Exception
      • getServerAgentStatus

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<es.caib.seycon.ng.comu.AgentStatusInfo> getServerAgentStatus​(String url)
                                                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                                       es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getServerAgentStatus in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleGetServerAgentStatus

        protected abstract Collection<es.caib.seycon.ng.comu.AgentStatusInfo> handleGetServerAgentStatus​(String url)
                                                                                                  throws Exception
        Throws:
        Exception
      • getServerTasks

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Collection<Object> getServerTasks​(String url)
                                          throws es.caib.seycon.ng.exception.InternalErrorException,
                                                 es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getServerTasks in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getSeyconServersStatus

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

        protected abstract Collection<es.caib.seycon.ng.comu.SeyconServerInfo> handleGetSeyconServersStatus()
                                                                                                     throws Exception
        Throws:
        Exception
      • getSyncServerInstances

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

        protected abstract Collection<es.caib.seycon.ng.comu.Server> handleGetSyncServerInstances()
                                                                                           throws Exception
        Throws:
        Exception
      • getSyncServers

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

        protected abstract Collection<es.caib.seycon.ng.comu.Server> handleGetSyncServers()
                                                                                   throws Exception
        Throws:
        Exception
      • getPendingTasksStats

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Map<String,​Vector<Object[]>> getPendingTasksStats()
                                                                throws es.caib.seycon.ng.exception.InternalErrorException,
                                                                       es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getPendingTasksStats in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • getStats

        @Transactional(rollbackFor=java.lang.Exception.class)
        public Map<String,​int[]> getStats​(String server,
                                                String metric,
                                                int seconds,
                                                int step)
                                         throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        getStats in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • boostTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void boostTask​(long taskId)
                       throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        boostTask in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleBoostTask

        protected abstract void handleBoostTask​(long taskId)
                                         throws Exception
        Throws:
        Exception
      • cancelTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void cancelTask​(long taskId)
                        throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        cancelTask in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleCancelTask

        protected abstract void handleCancelTask​(long taskId)
                                          throws Exception
        Throws:
        Exception
      • cancelUnscheduledTasks

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

        protected abstract void handleCancelUnscheduledTasks()
                                                      throws Exception
        Throws:
        Exception
      • releaseAllTasks

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

        protected abstract void handleReleaseAllTasks()
                                               throws Exception
        Throws:
        Exception
      • releaseTask

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void releaseTask​(long taskId)
                         throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        releaseTask in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleReleaseTask

        protected abstract void handleReleaseTask​(long taskId)
                                           throws Exception
        Throws:
        Exception
      • resetSyncServer

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public void resetSyncServer​(String url,
                                    String server)
                             throws es.caib.seycon.ng.exception.InternalErrorException,
                                    es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        resetSyncServer in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • updateDispatcherConfiguration

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void updateDispatcherConfiguration()
                                           throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        updateDispatcherConfiguration in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleUpdateDispatcherConfiguration

        protected abstract void handleUpdateDispatcherConfiguration()
                                                             throws Exception
        Throws:
        Exception
      • updatePendingTasks

        @Transactional(rollbackFor=java.lang.Exception.class)
        public void updatePendingTasks()
                                throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        updatePendingTasks in interface es.caib.seycon.ng.servei.SeyconServerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleUpdatePendingTasks

        protected abstract void handleUpdatePendingTasks()
                                                  throws Exception
        Throws:
        Exception
      • getPrincipal

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