Skip to main content
summaryrefslogtreecommitdiffstats
blob: 182e52bc6eeb6141fa28ec22b70fe38109a02c5f (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
/*
 * Created on Nov 3, 2009
 *
 * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
 */
package org.eclipse.osee.coverage.merge;

import org.eclipse.osee.framework.core.exception.OseeArgumentException;

/**
 * @author Donald G. Dunne
 */
public abstract class MergeItemBase implements IMergeItem {

   private final MergeType mergeType;
   private boolean checked = false;
   private boolean isCheckable = true;
   private boolean importAllowed = true;

   public MergeItemBase(MergeType mergeType, boolean isCheckable) {
      this.mergeType = mergeType;
      this.isCheckable = isCheckable;
   }

   public MergeType getMergeType() {
      return mergeType;
   }

   public boolean isChecked() {
      return checked;
   }

   public void setChecked(boolean checked) throws OseeArgumentException {
      if (!isCheckable) {
         throw new OseeArgumentException(String.format("Merge Item is not checkable [%s]", this));
      }
      this.checked = checked;
   }

   public boolean isImportAllowed() {
      return importAllowed;
   }

   public void setImportAllowed(boolean importAllowed) {
      this.importAllowed = importAllowed;
   }

   public boolean isCheckable() {
      return isCheckable;
   }

}

Back to the top