Skip to content

Package: JobStepFactoryImpl

JobStepFactoryImpl

nameinstructionbranchcomplexitylinemethod
JobStepFactoryImpl()
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%
clone(JobStep)
M: 13 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
newCreator(KapuaId)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newEntity(KapuaId)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newListResult()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newQuery(KapuaId)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
newStepProperty(String, String, String)
M: 8 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.step.internal;
14:
15: import org.eclipse.kapua.KapuaEntityCloneException;
16: import org.eclipse.kapua.locator.KapuaProvider;
17: import org.eclipse.kapua.model.id.KapuaId;
18: import org.eclipse.kapua.service.job.step.JobStep;
19: import org.eclipse.kapua.service.job.step.JobStepCreator;
20: import org.eclipse.kapua.service.job.step.JobStepFactory;
21: import org.eclipse.kapua.service.job.step.JobStepListResult;
22: import org.eclipse.kapua.service.job.step.JobStepQuery;
23: import org.eclipse.kapua.service.job.step.definition.JobStepProperty;
24: import org.eclipse.kapua.service.job.step.definition.internal.JobStepPropertyImpl;
25:
26: /**
27: * {@link JobStepFactory} implementation.
28: *
29: * @since 1.0.0
30: */
31: @KapuaProvider
32: public class JobStepFactoryImpl implements JobStepFactory {
33:
34: @Override
35: public JobStep newEntity(KapuaId scopeId) {
36: return new JobStepImpl(scopeId);
37: }
38:
39: @Override
40: public JobStepCreator newCreator(KapuaId scopeId) {
41: return new JobStepCreatorImpl(scopeId);
42: }
43:
44: @Override
45: public JobStepQuery newQuery(KapuaId scopeId) {
46: return new JobStepQueryImpl(scopeId);
47: }
48:
49: @Override
50: public JobStepListResult newListResult() {
51: return new JobStepListResultImpl();
52: }
53:
54: @Override
55: public JobStepProperty newStepProperty(String name, String propertyType, String propertyValue) {
56: return new JobStepPropertyImpl(name, propertyType, propertyValue, null);
57: }
58:
59: @Override
60: public JobStep clone(JobStep jobStep) {
61: try {
62: return new JobStepImpl(jobStep);
63: } catch (Exception e) {
64: throw new KapuaEntityCloneException(e, JobStep.TYPE, jobStep);
65: }
66: }
67: }