Package org.mycore.services.queuedjob
Class MCRJobAction
java.lang.Object
org.mycore.services.queuedjob.MCRJobAction
- Direct Known Subclasses:
MCRPackerJobAction
,MCRPDFThumbnailJobAction
,MCRPIRegisterJobAction
MCRJobAction
must be extended to do some work for given MCRJob
.- Author:
- René Adler
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThe constructor of the job action.MCRJobAction
(MCRJob job) The constructor of the job action with specificMCRJob
. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
execute()
Does the work for givenMCRJob
.abstract boolean
Returns if this action is activated.abstract String
name()
Returns the name of the action.abstract void
rollback()
When errors occurs during executing it can be necessary to rollback performed actions
-
Field Details
-
job
-
-
Constructor Details
-
MCRJobAction
public MCRJobAction()The constructor of the job action. -
MCRJobAction
The constructor of the job action with specificMCRJob
.
-
-
Method Details
-
isActivated
public abstract boolean isActivated()Returns if this action is activated.- Returns:
true
if activated,false
if isn't
-
name
Returns the name of the action.- Returns:
- the name
-
execute
Does the work for givenMCRJob
.- Throws:
ExecutionException
-
rollback
public abstract void rollback()When errors occurs during executing it can be necessary to rollback performed actions
-