-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jobs): added JobStepProperty overrides on JobEngineStartOptions
Signed-off-by: Alberto Codutti <alberto.codutti@eurotech.com>
- Loading branch information
Showing
16 changed files
with
225 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...c/main/java/org/eclipse/kapua/job/engine/app/core/jackson/mixin/JobStepPropertyMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021, 2022 Eurotech and/or its affiliates and others | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Eurotech - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.kapua.job.engine.app.core.jackson.mixin; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import org.eclipse.kapua.service.job.step.definition.internal.JobStepPropertyImpl; | ||
|
||
@JsonDeserialize(as = JobStepPropertyImpl.class) | ||
@JsonIgnoreProperties("type") | ||
public interface JobStepPropertyMixin { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
.../src/main/java/org/eclipse/kapua/job/engine/commons/model/JobStepPropertiesOverrides.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018, 2022 Eurotech and/or its affiliates and others | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Eurotech - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.kapua.job.engine.commons.model; | ||
|
||
import org.eclipse.kapua.service.job.step.definition.JobStepProperty; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElementWrapper; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlType; | ||
import java.util.ArrayList; | ||
import java.util.Iterator; | ||
import java.util.List; | ||
|
||
@XmlRootElement(name = "jobStepPropertiesOverrides") | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlType | ||
public class JobStepPropertiesOverrides implements Iterable<JobStepProperty> { | ||
|
||
@XmlElementWrapper(name = "jobStepPropertiesOverrides") | ||
private List<JobStepProperty> jobStepPropertiesOverrides = new ArrayList<>(); | ||
|
||
public JobStepPropertiesOverrides() { | ||
} | ||
|
||
public JobStepPropertiesOverrides(List<JobStepProperty> targetIds) { | ||
this.jobStepPropertiesOverrides.addAll(targetIds); | ||
} | ||
|
||
public List<JobStepProperty> getJobStepPropertiesOverrides() { | ||
if (jobStepPropertiesOverrides == null) { | ||
jobStepPropertiesOverrides = new ArrayList<>(); | ||
} | ||
|
||
return jobStepPropertiesOverrides; | ||
} | ||
|
||
public void setJobStepPropertiesOverrides(List<JobStepProperty> jobStepPropertiesOverrides) { | ||
this.jobStepPropertiesOverrides = jobStepPropertiesOverrides; | ||
} | ||
|
||
@Override | ||
public Iterator<JobStepProperty> iterator() { | ||
return jobStepPropertiesOverrides.iterator(); | ||
} | ||
|
||
public boolean isEmpty() { | ||
return getJobStepPropertiesOverrides().isEmpty(); | ||
} | ||
|
||
public int size() { | ||
return getJobStepPropertiesOverrides().size(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.