Skip to main content
summaryrefslogtreecommitdiffstats
blob: 3d0b0ca92a5a08b587ad1cb086d902ec7fde206f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * Created on Mar 30, 2011
 *
 * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
 */
package org.eclipse.osee.framework.skynet.core.artifact;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.database.IOseeDatabaseService;
import org.eclipse.osee.framework.database.core.AbstractDbTxOperation;
import org.eclipse.osee.framework.database.core.OseeConnection;
import org.eclipse.osee.framework.skynet.core.artifact.revert.Revert;
import org.eclipse.osee.framework.skynet.core.internal.Activator;

/**
 * @author Jeff C. Phillips
 */
public class RevertOperation extends AbstractDbTxOperation {

   private final Revert revert;

   public RevertOperation(Revert revert, String operationTitle) {
      this(revert, Activator.getInstance().getOseeDatabaseService(), operationTitle, Activator.PLUGIN_ID);
   }

   public RevertOperation(Revert revert, IOseeDatabaseService databaseService, String operationTitle, String pluginId) {
      super(databaseService, operationTitle, pluginId);
      this.revert = revert;
   }

   @Override
   protected void doTxWork(IProgressMonitor monitor, OseeConnection connection) throws OseeCoreException {
      revert.revert(connection);
   }
}

Back to the top