Skip to content

Package: JobAlreadyRunningExceptionInfo

JobAlreadyRunningExceptionInfo

nameinstructionbranchcomplexitylinemethod
JobAlreadyRunningExceptionInfo()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
JobAlreadyRunningExceptionInfo(JobAlreadyRunningException)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getExecutionId()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getJobTargetIdSubset()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
setExecutionId(KapuaId)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
setJobTargetIdSubset(Set)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2021, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.app.api.core.exception.model;
14:
15: import java.util.Set;
16:
17: import javax.ws.rs.core.Response.Status;
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlElement;
21: import javax.xml.bind.annotation.XmlElementWrapper;
22: import javax.xml.bind.annotation.XmlRootElement;
23: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
24:
25: import org.eclipse.kapua.job.engine.exception.JobAlreadyRunningException;
26: import org.eclipse.kapua.job.engine.exception.KapuaJobEngineErrorCodes;
27: import org.eclipse.kapua.model.id.KapuaId;
28: import org.eclipse.kapua.model.id.KapuaIdAdapter;
29:
30: @XmlRootElement(name = "jobAlreadyRunningExceptionInfo")
31: @XmlAccessorType(XmlAccessType.FIELD)
32: public class JobAlreadyRunningExceptionInfo extends JobEngineExceptionInfo {
33:
34: @XmlElement(name = "executionId")
35: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
36: private KapuaId executionId;
37:
38: @XmlElement(name = "targetId")
39: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
40: @XmlElementWrapper(name = "jobTargetIdSubset")
41: private Set<KapuaId> jobTargetIdSubset;
42:
43: public JobAlreadyRunningExceptionInfo() {
44: this(null);
45: }
46:
47: public JobAlreadyRunningExceptionInfo(JobAlreadyRunningException jobAlreadyRunningException) {
48: super(Status.INTERNAL_SERVER_ERROR, KapuaJobEngineErrorCodes.JOB_ALREADY_RUNNING, jobAlreadyRunningException);
49: }
50:
51: public KapuaId getExecutionId() {
52: return executionId;
53: }
54:
55: public void setExecutionId(KapuaId executionId) {
56: this.executionId = executionId;
57: }
58:
59: public Set<KapuaId> getJobTargetIdSubset() {
60: return jobTargetIdSubset;
61: }
62:
63: public void setJobTargetIdSubset(Set<KapuaId> jobTargetIdSubset) {
64: this.jobTargetIdSubset = jobTargetIdSubset;
65: }
66:
67: }