Skip to main content
summaryrefslogtreecommitdiffstats
blob: 509ad9d7fdbf2acfb519fd42d4865019cdf3ddab (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*******************************************************************************
 * Copyright (c) 2010 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.skynet.core.change;

import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.skynet.core.revision.LoadChangeType;

/**
 * @author Megumi Telles
 */
public final class ErrorChange extends Change {
   private static final String ERROR_STRING = "!Error -";

   private final String errorMessage;
   private final String name;

   public ErrorChange(IOseeBranch branch, int artId, String exception) {
      super(branch, 0, artId, null, null, false, null, null);
      this.errorMessage = String.format("%s %s", ERROR_STRING, exception);
      this.name =
         String.format("%s ArtID: %s BranchUuid: %s - %s", ERROR_STRING, getArtId(),
            (branch == null ? null : branch.getUuid()), exception);
   }

   @Override
   public String getIsValue() {
      return errorMessage;
   }

   @Override
   public int getItemId() {
      return 0;
   }

   @Override
   public String getItemKind() {
      return errorMessage;
   }

   @Override
   public long getItemTypeId() {
      return 0;
   }

   @Override
   public String getItemTypeName() {
      return errorMessage;
   }

   @Override
   public String getName() {
      return name;
   }

   @Override
   public String getWasValue() {
      return errorMessage;
   }

   @SuppressWarnings("rawtypes")
   @Override
   public Object getAdapter(Class adapter) {
      return null;
   }

   @Override
   public LoadChangeType getChangeType() {
      return null;
   }

   @Override
   public Class<? extends IChangeWorker> getWorker() {
      return null;
   }

}

Back to the top