2 * Copyright (C) 2007-2012 Mathieu Baudier
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.
16 package org
.argeo
.slc
.test
;
18 import java
.io
.Serializable
;
20 import org
.argeo
.slc
.deploy
.DeployedSystem
;
21 import org
.argeo
.slc
.process
.SlcExecutionRelated
;
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
;
31 public TestRunDescriptor() {
35 public TestRunDescriptor(TestRun testRun
) {
36 testRunUuid
= testRun
.getUuid();
38 if (testRun
.getTestResult() != null)
39 testResultUuid
= testRun
.<TestResult
> getTestResult().getUuid();
41 if (testRun
.getDeployedSystem() != null)
42 deployedSytemId
= testRun
.<DeployedSystem
> getDeployedSystem()
43 .getDeployedSystemId();
45 if (testRun
instanceof SlcExecutionRelated
) {
46 slcExecutionUuid
= ((SlcExecutionRelated
) testRun
)
47 .getSlcExecutionUuid();
48 slcExecutionStepUuid
= ((SlcExecutionRelated
) testRun
)
49 .getSlcExecutionStepUuid();
53 public String
getTestRunUuid() {
57 public void setTestRunUuid(String testRunUuid
) {
58 this.testRunUuid
= testRunUuid
;
61 public String
getSlcExecutionUuid() {
62 return slcExecutionUuid
;
65 public void setSlcExecutionUuid(String slcExecutionUuid
) {
66 this.slcExecutionUuid
= slcExecutionUuid
;
69 public String
getSlcExecutionStepUuid() {
70 return slcExecutionStepUuid
;
73 public void setSlcExecutionStepUuid(String slcExecutionStepUuid
) {
74 this.slcExecutionStepUuid
= slcExecutionStepUuid
;
77 public String
getTestResultUuid() {
78 return testResultUuid
;
81 public void setTestResultUuid(String testResultUuid
) {
82 this.testResultUuid
= testResultUuid
;
85 public String
getDeployedSytemId() {
86 return deployedSytemId
;
89 public void setDeployedSytemId(String deploymentId
) {
90 this.deployedSytemId
= deploymentId
;
94 public boolean equals(Object obj
) {
95 if (obj
instanceof TestRunDescriptor
) {
96 return getTestRunUuid().equals(
97 ((TestRunDescriptor
) obj
).getTestRunUuid());