org.eclipse.viatra.transformation.evm.transactions.specific.job

## 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 a `RecordingCommand` if there is a `TransactionalEditingDomain` available.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RecordingJob.RecordingJobContextData` Data transfer class for storing the commands created by recording jobs.

  - ### Field Summary

    Fields
    Modifier and Type | Field and 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 and Description
    `RecordingJob(Job<EventAtom> recordedJob)` Creates a new recording job associated with the given state and processor.
    `RecordingJob(Job<EventAtom> recordedJob, EventAtomEditingDomainProvider<EventAtom> provider)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 the `TransactionalEditingDomain`.

    - ### Methods inherited from class org.eclipse.viatra.transformation.evm.api.CompositeJob

      `handleError`

    - ### Methods inherited from class org.eclipse.viatra.transformation.evm.api.Job

      `getActivationState`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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)

  - ### 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 class `CompositeJob<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 the `TransactionalEditingDomain`. 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