]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/test/TestRunDescriptor.java
Introduce JCR metadata writer
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / test / TestRunDescriptor.java
1 /*
2 * Copyright (C) 2007-2012 Mathieu Baudier
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 package org.argeo.slc.test;
17
18 import java.io.Serializable;
19
20 import org.argeo.slc.deploy.DeployedSystem;
21 import org.argeo.slc.process.SlcExecutionRelated;
22
23 public class TestRunDescriptor implements Serializable {
24 private static final long serialVersionUID = -6488010128523489018L;
25 private String testRunUuid;
26 private String slcExecutionUuid;
27 private String slcExecutionStepUuid;
28 private String testResultUuid;
29 private String deployedSytemId;
30
31 public TestRunDescriptor() {
32
33 }
34
35 public TestRunDescriptor(TestRun testRun) {
36 testRunUuid = testRun.getUuid();
37
38 if (testRun.getTestResult() != null)
39 testResultUuid = testRun.<TestResult> getTestResult().getUuid();
40
41 if (testRun.getDeployedSystem() != null)
42 deployedSytemId = testRun.<DeployedSystem> getDeployedSystem()
43 .getDeployedSystemId();
44
45 if (testRun instanceof SlcExecutionRelated) {
46 slcExecutionUuid = ((SlcExecutionRelated) testRun)
47 .getSlcExecutionUuid();
48 slcExecutionStepUuid = ((SlcExecutionRelated) testRun)
49 .getSlcExecutionStepUuid();
50 }
51 }
52
53 public String getTestRunUuid() {
54 return testRunUuid;
55 }
56
57 public void setTestRunUuid(String testRunUuid) {
58 this.testRunUuid = testRunUuid;
59 }
60
61 public String getSlcExecutionUuid() {
62 return slcExecutionUuid;
63 }
64
65 public void setSlcExecutionUuid(String slcExecutionUuid) {
66 this.slcExecutionUuid = slcExecutionUuid;
67 }
68
69 public String getSlcExecutionStepUuid() {
70 return slcExecutionStepUuid;
71 }
72
73 public void setSlcExecutionStepUuid(String slcExecutionStepUuid) {
74 this.slcExecutionStepUuid = slcExecutionStepUuid;
75 }
76
77 public String getTestResultUuid() {
78 return testResultUuid;
79 }
80
81 public void setTestResultUuid(String testResultUuid) {
82 this.testResultUuid = testResultUuid;
83 }
84
85 public String getDeployedSytemId() {
86 return deployedSytemId;
87 }
88
89 public void setDeployedSytemId(String deploymentId) {
90 this.deployedSytemId = deploymentId;
91 }
92
93 @Override
94 public boolean equals(Object obj) {
95 if (obj instanceof TestRunDescriptor) {
96 return getTestRunUuid().equals(
97 ((TestRunDescriptor) obj).getTestRunUuid());
98 }
99 return false;
100 }
101 }