Package com.nomagic.magicdraw.job
Interface Job
-
@OpenApiAll public interface Job
An interface for performing some work in the application.- See Also:
IdleJobService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute(ProgressStatus progressStatus)
Executes the work.void
finished()
Cleanup should be done here after the job is finished.java.lang.String
getName()
Human-readable name of the job to display to the user in GUI.boolean
needsExecute()
Indicates if the job needs to be executed.
-
-
-
Method Detail
-
needsExecute
boolean needsExecute()
Indicates if the job needs to be executed. Environment or project/model conditions could be checked here.- Returns:
- true if job needs to be executed, false otherwise.
-
execute
void execute(ProgressStatus progressStatus) throws java.lang.Exception
Executes the work.- Parameters:
progressStatus
- progress status to indicate work pace.- Throws:
java.lang.Exception
- if any error occurs
-
finished
void finished()
Cleanup should be done here after the job is finished.
-
getName
java.lang.String getName()
Human-readable name of the job to display to the user in GUI.- Returns:
- name of the job.
-
-