Class AsyncRunnerServiceBase

  • All Implemented Interfaces:
    com.soffid.iam.service.AsyncRunnerService
    Direct Known Subclasses:
    AsyncRunnerServiceImpl

    public abstract class AsyncRunnerServiceBase
    extends Object
    implements com.soffid.iam.service.AsyncRunnerService

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

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

      • AsyncRunnerServiceBase

        public AsyncRunnerServiceBase()
    • Method Detail

      • setAsyncRunnerService

        public void setAsyncRunnerService​(com.soffid.iam.service.AsyncRunnerService asyncRunnerService)
        Sets reference to asyncRunnerService.
      • getAsyncRunnerService

        public com.soffid.iam.service.AsyncRunnerService getAsyncRunnerService()
        Gets reference to asyncRunnerService.
      • runNewTransaction

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRES_NEW,
                       rollbackFor=java.lang.Exception.class)
        public Object runNewTransaction​(com.soffid.iam.common.TransactionalTask runnable)
                                 throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        runNewTransaction in interface com.soffid.iam.service.AsyncRunnerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRunNewTransaction

        protected abstract Object handleRunNewTransaction​(com.soffid.iam.common.TransactionalTask runnable)
                                                   throws Exception
        Throws:
        Exception
      • runTransaction

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       rollbackFor=java.lang.Exception.class)
        public Object runTransaction​(com.soffid.iam.common.TransactionalTask runnable)
                              throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        runTransaction in interface com.soffid.iam.service.AsyncRunnerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRunTransaction

        protected abstract Object handleRunTransaction​(com.soffid.iam.common.TransactionalTask runnable)
                                                throws Exception
        Throws:
        Exception
      • run

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public void run​(Runnable runnable,
                        com.soffid.iam.api.AsyncList result)
                 throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        run in interface com.soffid.iam.service.AsyncRunnerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRun

        protected abstract void handleRun​(Runnable runnable,
                                          com.soffid.iam.api.AsyncList result)
                                   throws Exception
        Throws:
        Exception
      • runInternal

        @Transactional(isolation=DEFAULT,
                       propagation=REQUIRED,
                       noRollbackFor=java.lang.Exception.class,
                       readOnly=true)
        public void runInternal​(Runnable runnable,
                                com.soffid.iam.api.AsyncList result)
                         throws es.caib.seycon.ng.exception.InternalErrorException
        Specified by:
        runInternal in interface com.soffid.iam.service.AsyncRunnerService
        Throws:
        es.caib.seycon.ng.exception.InternalErrorException
      • handleRunInternal

        protected abstract void handleRunInternal​(Runnable runnable,
                                                  com.soffid.iam.api.AsyncList result)
                                           throws Exception
        Throws:
        Exception
      • getPrincipal

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