Skip to main content
summaryrefslogtreecommitdiffstats
blob: 5b3817a93c087663c5828ca4fcf07c74e81a19a0 (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
37
38
39
40
41
42
43
44
45
/*******************************************************************************
 * Copyright (c) 2004, 2007 Boeing.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Boeing - initial API and implementation
 *******************************************************************************/
package org.eclipse.osee.framework.lifecycle.test.mock;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.osee.framework.lifecycle.AbstractLifecycleVisitor;

/**
 * @author Roberto E. Escobar
 * @author Jeff C. Phillips
 */
public class MockLifecycePoint extends AbstractLifecycleVisitor<MockHandler> {

   public static final Type<MockHandler> TYPE = new Type<MockHandler>();

   private final String a;
   private final String b;

   public MockLifecycePoint(String a, String b) {
      super();
      this.a = a;
      this.b = b;
   }

   @Override
   public Type<MockHandler> getAssociatedType() {
      return TYPE;
   }

   @Override
   protected IStatus dispatch(IProgressMonitor monitor, MockHandler handler, String sourceId) {
      handler.setData(a, b);
      handler.doSomething();
      return handler.getStatus();
   }
}

Back to the top