Skip to content

Package: JobTarget

JobTarget

nameinstructionbranchcomplexitylinemethod
getType()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2017, 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.service.job.targets;
14:
15: import org.eclipse.kapua.model.KapuaUpdatableEntity;
16: import org.eclipse.kapua.model.id.KapuaId;
17: import org.eclipse.kapua.model.id.KapuaIdAdapter;
18:
19: import javax.xml.bind.annotation.XmlAccessType;
20: import javax.xml.bind.annotation.XmlAccessorType;
21: import javax.xml.bind.annotation.XmlRootElement;
22: import javax.xml.bind.annotation.XmlTransient;
23: import javax.xml.bind.annotation.XmlType;
24: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
25:
26: /**
27: * {@link JobTarget} definition.
28: *
29: * @since 1.0.0
30: */
31: @XmlRootElement(name = "jobTarget")
32: @XmlAccessorType(XmlAccessType.PROPERTY)
33: @XmlType(factoryClass = JobTargetXmlRegistry.class, factoryMethod = "newJobTarget")
34: public interface JobTarget extends KapuaUpdatableEntity {
35:
36: String TYPE = "jobTarget";
37:
38: @Override
39: default String getType() {
40: return TYPE;
41: }
42:
43: /**
44: * Gets the {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
45: *
46: * @return The {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
47: * @since 1.0.0
48: */
49: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
50: KapuaId getJobId();
51:
52: /**
53: * Sets the {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
54: *
55: * @param jobId The {@link org.eclipse.kapua.service.job.Job} {@link KapuaId}.
56: * @since 1.0.0
57: */
58: void setJobId(KapuaId jobId);
59:
60: /**
61: * Gets the {@link org.eclipse.kapua.model.KapuaEntity} {@link KapuaId}.
62: *
63: * @return The {@link org.eclipse.kapua.model.KapuaEntity} {@link KapuaId}.
64: * @since 1.0.0
65: */
66: @XmlJavaTypeAdapter(KapuaIdAdapter.class)
67: KapuaId getJobTargetId();
68:
69: /**
70: * Sets the {@link org.eclipse.kapua.model.KapuaEntity} {@link KapuaId}.
71: *
72: * @param jobTargetId The {@link org.eclipse.kapua.model.KapuaEntity} {@link KapuaId}.
73: * @since 1.0.0
74: */
75: void setJobTargetId(KapuaId jobTargetId);
76:
77: /**
78: * Gets the {@link JobTargetStatus}.
79: *
80: * @return The {@link JobTargetStatus}.
81: * @since 1.0.0
82: */
83: JobTargetStatus getStatus();
84:
85: /**
86: * Sets the {@link JobTargetStatus}.
87: *
88: * @param status The {@link JobTargetStatus}.
89: * @since 1.0.0
90: */
91: void setStatus(JobTargetStatus status);
92:
93: /**
94: * Gets the step index.
95: *
96: * @return The step index.
97: * @since 1.0.0
98: */
99: int getStepIndex();
100:
101: /**
102: * Sets The step index.
103: *
104: * @param stepIndex The step index.
105: * @since 1.0.0
106: */
107: void setStepIndex(int stepIndex);
108:
109: /**
110: * Gets the descriptive message linked to the current {@link #getStatus()}.
111: *
112: * @return The descriptive message linked to the current {@link #getStatus()}.
113: * @since 1.1.0
114: */
115: String getStatusMessage();
116:
117: /**
118: * Sets the descriptive message linked to the current {@link #getStatus()}.
119: *
120: * @param statusMessage The descriptive message linked to the current {@link #getStatus()}.
121: * @since 1.1.0
122: */
123: void setStatusMessage(String statusMessage);
124:
125: /**
126: * Gets the {@link Exception} occurred on the last processing.
127: *
128: * @return The {@link Exception} occurred on the last processing.
129: * @since 1.0.0
130: * @deprecated since 1.1.0 - No longer used.
131: */
132: @Deprecated
133: @XmlTransient
134: Exception getException();
135:
136: /**
137: * Sets the {@link Exception} occurred on the last processing.
138: *
139: * @param e The {@link Exception} occurred on the last processing.
140: * @since 1.0.0
141: * @deprecated since 1.1.0 - No longer used.
142: */
143: @Deprecated
144: @XmlTransient
145: void setException(Exception e);
146:
147: }