2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org
.argeo
.slc
.test
;
19 import java
.io
.Serializable
;
21 import org
.argeo
.slc
.deploy
.DeployedSystem
;
22 import org
.argeo
.slc
.process
.SlcExecutionRelated
;
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
;
32 public TestRunDescriptor() {
36 public TestRunDescriptor(TestRun testRun
) {
37 testRunUuid
= testRun
.getUuid();
39 if (testRun
.getTestResult() != null)
40 testResultUuid
= testRun
.<TestResult
> getTestResult().getUuid();
42 if (testRun
.getDeployedSystem() != null)
43 deployedSytemId
= testRun
.<DeployedSystem
> getDeployedSystem()
44 .getDeployedSystemId();
46 if (testRun
instanceof SlcExecutionRelated
) {
47 slcExecutionUuid
= ((SlcExecutionRelated
) testRun
)
48 .getSlcExecutionUuid();
49 slcExecutionStepUuid
= ((SlcExecutionRelated
) testRun
)
50 .getSlcExecutionStepUuid();
54 public String
getTestRunUuid() {
58 public void setTestRunUuid(String testRunUuid
) {
59 this.testRunUuid
= testRunUuid
;
62 public String
getSlcExecutionUuid() {
63 return slcExecutionUuid
;
66 public void setSlcExecutionUuid(String slcExecutionUuid
) {
67 this.slcExecutionUuid
= slcExecutionUuid
;
70 public String
getSlcExecutionStepUuid() {
71 return slcExecutionStepUuid
;
74 public void setSlcExecutionStepUuid(String slcExecutionStepUuid
) {
75 this.slcExecutionStepUuid
= slcExecutionStepUuid
;
78 public String
getTestResultUuid() {
79 return testResultUuid
;
82 public void setTestResultUuid(String testResultUuid
) {
83 this.testResultUuid
= testResultUuid
;
86 public String
getDeployedSytemId() {
87 return deployedSytemId
;
90 public void setDeployedSytemId(String deploymentId
) {
91 this.deployedSytemId
= deploymentId
;
95 public boolean equals(Object obj
) {
96 if (obj
instanceof TestRunDescriptor
) {
97 return getTestRunUuid().equals(
98 ((TestRunDescriptor
) obj
).getTestRunUuid());