Package ome.services

Class JobBean

    • Constructor Detail

      • JobBean

        public JobBean()
        default constructor
    • Method Detail

      • passivate

        @Transactional
        public void passivate()
        Does nothing. The only non-shared state that this instance holds on to is the jobId and resetId -- two longs -- making passivation for the moment unimportant. This method should do what errorIfInvalidState does and reattach the process if we've been passivated. That will wait for larger changes later. At which time, proper locking will be necessary!
        Specified by:
        passivate in interface ome.api.StatefulServiceInterface
      • activate

        @Transactional
        public void activate()
        Does almost nothing. Since nothing is passivated, nothing needs to be activated. However, since we are still using errorIfInvalidState, if the jobId is non-null, then this instance will need to handle re-loading on first access. (Previously it could not be done here, because the security system was not configured for transactions during JavaEE callbacks. This is no longer true.)
        Specified by:
        activate in interface ome.api.StatefulServiceInterface
      • setTypesService

        public void setTypesService​(ome.api.ITypes typesService)
        Types service Bean injector.
        Parameters:
        typesService - an ITypes.
      • setProcessManager

        public void setProcessManager​(IProcessManager procMgr)
        Process Manager Bean injector.
        Parameters:
        procMgr - a ProcessManager.
      • errorIfInvalidState

        protected void errorIfInvalidState()
      • checkAndRegister

        protected void checkAndRegister()
      • jobFinished

        public java.sql.Timestamp jobFinished()
        Specified by:
        jobFinished in interface ome.api.JobHandle
      • jobMessage

        public java.lang.String jobMessage()
        Specified by:
        jobMessage in interface ome.api.JobHandle
      • jobRunning

        public boolean jobRunning()
        Specified by:
        jobRunning in interface ome.api.JobHandle
      • jobError

        public boolean jobError()
        Specified by:
        jobError in interface ome.api.JobHandle
      • cancelJob

        @Transactional(readOnly=false)
        public void cancelJob()
        Specified by:
        cancelJob in interface ome.api.JobHandle
      • setStatus

        @Transactional(readOnly=false)
        public java.lang.String setStatus​(java.lang.String status)
        Specified by:
        setStatus in interface ome.api.JobHandle
      • setMessage

        @Transactional(readOnly=false)
        public java.lang.String setMessage​(java.lang.String message)
        Specified by:
        setMessage in interface ome.api.JobHandle
      • setStatusAndMessage

        @Transactional(readOnly=false)
        public java.lang.String setStatusAndMessage​(java.lang.String status,
                                                    java.lang.String message)
        Specified by:
        setStatusAndMessage in interface ome.api.JobHandle