Class RecordingJob<EventAtom>
- java.lang.Object
-
- org.eclipse.viatra.transformation.evm.api.Job<EventAtom>
-
- org.eclipse.viatra.transformation.evm.api.CompositeJob<EventAtom>
-
- org.eclipse.viatra.transformation.evm.transactions.specific.job.RecordingJob<EventAtom>
-
public class RecordingJob<EventAtom> extends CompositeJob<EventAtom>
A stateless job implementation that executes its action inside aRecordingCommand
if there is aTransactionalEditingDomain
available. It is possible to access all created commands by adding a session recorder implementation to the build.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RecordingJob.ICommandRecorder<EventAtom>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RECORDING_JOB
static java.lang.String
RECORDING_JOB_SESSION_DATA_KEY
static java.lang.String
TRANSACTIONAL_EDITING_DOMAIN
-
Constructor Summary
Constructors Constructor Description RecordingJob(Job<EventAtom> recordedJob)
Creates a new recording job associated with the given state and processor.RecordingJob(Job<EventAtom> recordedJob, EventAtomEditingDomainProvider<EventAtom> provider)
RecordingJob(Job<EventAtom> recordedJob, EventAtomEditingDomainProvider<EventAtom> provider, RecordingJob.ICommandRecorder<EventAtom> commandRecorder)
RecordingJob(Job<EventAtom> recordedJob, RecordingJob.ICommandRecorder<EventAtom> commandRecorder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
execute(Activation<? extends EventAtom> activation, Context context)
Executes the action on the activation using the supplied context.protected java.lang.Object
findDomainTarget(Activation<? extends EventAtom> activation, Context context)
This method is used to find a target that can be used for getting theTransactionalEditingDomain
.-
Methods inherited from class org.eclipse.viatra.transformation.evm.api.CompositeJob
handleError
-
Methods inherited from class org.eclipse.viatra.transformation.evm.api.Job
getActivationState
-
-
-
-
Field Detail
-
TRANSACTIONAL_EDITING_DOMAIN
public static final java.lang.String TRANSACTIONAL_EDITING_DOMAIN
- See Also:
- Constant Field Values
-
RECORDING_JOB
public static final java.lang.String RECORDING_JOB
- See Also:
- Constant Field Values
-
RECORDING_JOB_SESSION_DATA_KEY
public static final java.lang.String RECORDING_JOB_SESSION_DATA_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RecordingJob
public RecordingJob(Job<EventAtom> recordedJob)
Creates a new recording job associated with the given state and processor.- Parameters:
recordedJob
-
-
RecordingJob
public RecordingJob(Job<EventAtom> recordedJob, EventAtomEditingDomainProvider<EventAtom> provider)
-
RecordingJob
public RecordingJob(Job<EventAtom> recordedJob, RecordingJob.ICommandRecorder<EventAtom> commandRecorder)
- Since:
- 2.0
-
RecordingJob
public RecordingJob(Job<EventAtom> recordedJob, EventAtomEditingDomainProvider<EventAtom> provider, RecordingJob.ICommandRecorder<EventAtom> commandRecorder)
- Since:
- 2.0
-
-
Method Detail
-
execute
protected void execute(Activation<? extends EventAtom> activation, Context context)
Description copied from class:Job
Executes the action on the activation using the supplied context.- Overrides:
execute
in classCompositeJob<EventAtom>
-
findDomainTarget
protected java.lang.Object findDomainTarget(Activation<? extends EventAtom> activation, Context context)
This method is used to find a target that can be used for getting theTransactionalEditingDomain
. It tries to retrieve the domain from the context, otherwise it tries to find an EObject parameter in the event atom of the activation.- Parameters:
activation
-context
-- Returns:
- the object to be used for finding the domain
-
-