]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunDescriptor.java
Improve JCR integration
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / test / TestRunDescriptor.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.slc.test;
18
19 import java.io.Serializable;
20
21 import org.argeo.slc.deploy.DeployedSystem;
22 import org.argeo.slc.process.SlcExecutionRelated;
23
24 public class TestRunDescriptor implements Serializable {
25 private static final long serialVersionUID = -6488010128523489018L;
26 private String testRunUuid;
27 private String slcExecutionUuid;
28 private String slcExecutionStepUuid;
29 private String testResultUuid;
30 private String deployedSytemId;
31
32 public TestRunDescriptor() {
33
34 }
35
36 public TestRunDescriptor(TestRun testRun) {
37 testRunUuid = testRun.getUuid();
38
39 if (testRun.getTestResult() != null)
40 testResultUuid = testRun.<TestResult> getTestResult().getUuid();
41
42 if (testRun.getDeployedSystem() != null)
43 deployedSytemId = testRun.<DeployedSystem> getDeployedSystem()
44 .getDeployedSystemId();
45
46 if (testRun instanceof SlcExecutionRelated) {
47 slcExecutionUuid = ((SlcExecutionRelated) testRun)
48 .getSlcExecutionUuid();
49 slcExecutionStepUuid = ((SlcExecutionRelated) testRun)
50 .getSlcExecutionStepUuid();
51 }
52 }
53
54 public String getTestRunUuid() {
55 return testRunUuid;
56 }
57
58 public void setTestRunUuid(String testRunUuid) {
59 this.testRunUuid = testRunUuid;
60 }
61
62 public String getSlcExecutionUuid() {
63 return slcExecutionUuid;
64 }
65
66 public void setSlcExecutionUuid(String slcExecutionUuid) {
67 this.slcExecutionUuid = slcExecutionUuid;
68 }
69
70 public String getSlcExecutionStepUuid() {
71 return slcExecutionStepUuid;
72 }
73
74 public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {
75 this.slcExecutionStepUuid = slcExecutionStepUuid;
76 }
77
78 public String getTestResultUuid() {
79 return testResultUuid;
80 }
81
82 public void setTestResultUuid(String testResultUuid) {
83 this.testResultUuid = testResultUuid;
84 }
85
86 public String getDeployedSytemId() {
87 return deployedSytemId;
88 }
89
90 public void setDeployedSytemId(String deploymentId) {
91 this.deployedSytemId = deploymentId;
92 }
93
94 @Override
95 public boolean equals(Object obj) {
96 if (obj instanceof TestRunDescriptor) {
97 return getTestRunUuid().equals(
98 ((TestRunDescriptor) obj).getTestRunUuid());
99 }
100 return false;
101 }
102 }