Eclipseplugins
ReconcileActionSettings.java
1 package com.proalpha.pds.gitutils.mylyn;
2 
3 import java.util.ArrayList;
4 import java.util.List;
5 
14 
15  private boolean loadXml = true;
16  private boolean createDf = true;
17  private boolean loadDf = true;
18  private boolean updateStartparam = true;
19  private boolean updateArtifacts = true;
20  private DeleteRcodeType deleteRcodeType = DeleteRcodeType.SMART;
21 
22  public ReconcileActionSettings() {
23  super();
24  }
25 
32  deleteRcodeType = DeleteRcodeType.SMART;
33  updateArtifacts = true;
34 
35  if (chkAction == CheckoutAction.FULL_RECONCILE) {
36  loadXml = true;
37  createDf = true;
38  loadDf = true;
39  updateStartparam = true;
40  } else if (chkAction == CheckoutAction.LOAD_XML_CREATE_DF) {
41  loadXml = true;
42  createDf = true;
43  updateStartparam = true;
44  } else if (chkAction == CheckoutAction.LOAD_XML) {
45  loadXml = true;
46  updateStartparam = true;
47  }
48 
49  }
50 
51  public boolean isLoadXml() {
52  return loadXml;
53  }
54 
55  public void setLoadXml(boolean loadXml) {
56  this.loadXml = loadXml;
57  }
58 
59  public boolean isCreateDf() {
60  return createDf;
61  }
62 
63  public void setCreateDf(boolean createDf) {
64  this.createDf = createDf;
65  }
66 
67  public boolean isLoadDf() {
68  return loadDf;
69  }
70 
71  public void setLoadDf(boolean loadDf) {
72  this.loadDf = loadDf;
73  }
74 
75  public boolean isUpdateStartparam() {
76  return updateStartparam;
77  }
78 
79  public void setUpdateStartparam(boolean updateStartparam) {
80  this.updateStartparam = updateStartparam;
81  }
82 
83  public boolean isUpdateArtifacts() {
84  return updateArtifacts;
85  }
86 
87  public void setUpdateArtifacts(boolean updateArtifacts) {
88  this.updateArtifacts = updateArtifacts;
89  }
90 
91  public DeleteRcodeType getDeleteRcodeTyper() {
92  return deleteRcodeType;
93  }
94 
95  public void setDeleteRcodeType(DeleteRcodeType deletRcodeType) {
96  this.deleteRcodeType = deletRcodeType;
97  }
98 
106  public void deriveFromDiff(List<?> pdiDiffList, List<?> stateInfoDiffList) {
107 
108  if (!stateInfoDiffList.isEmpty())
109  this.updateArtifacts = true;
110  else
111  this.updateArtifacts = false;
112 
113  if (!pdiDiffList.isEmpty()) {
114  this.loadXml = true;
115  this.createDf = true;
116  this.loadDf = true;
117  this.updateStartparam = true;
118  this.deleteRcodeType = DeleteRcodeType.SMART;
119  } else {
120  this.loadXml = false;
121  this.createDf = false;
122  this.loadDf = false;
123  this.updateStartparam = false;
124  this.deleteRcodeType = DeleteRcodeType.NONE;
125  }
126 
127  }
128 
134  public List<String> getPaUpdateStages() {
135 
136  ArrayList<String> stages = new ArrayList<>();
137 
138  stages.add("init");
139  stages.add("getchanges");
140  if (loadXml)
141  stages.add("loaddiffs");
142  if (updateStartparam)
143  stages.add("updatestartparam");
144  if (createDf)
145  stages.add("createdf");
146  if (loadDf)
147  stages.add("loaddf");
148  stages.add("restore_repository");
149  if (updateArtifacts)
150  stages.add("updateartifacts");
151  if (deleteRcodeType != DeleteRcodeType.NONE)
152  stages.add("clean_rcode_smart");
153  stages.add("uploaddb");
154  return stages;
155 
156  }
157 
158 }
void deriveFromDiff(List<?> pdiDiffList, List<?> stateInfoDiffList)