-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3273 from Coduz/feature-extensibleBirth
[Feature] Device Birth Extended Properties
- Loading branch information
Showing
31 changed files
with
1,345 additions
and
421 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
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
80 changes: 80 additions & 0 deletions
80
...va/org/eclipse/kapua/message/internal/device/lifecycle/model/BirthExtendedProperties.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,80 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2021 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.message.internal.device.lifecycle.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonRootName; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* Birth extended property definition. | ||
* | ||
* @since 1.5.0 | ||
*/ | ||
@JsonRootName("deviceExtendedProperties") | ||
public class BirthExtendedProperties { | ||
|
||
@JsonProperty("version") | ||
private String version; | ||
|
||
@JsonProperty("properties") | ||
@JsonDeserialize(keyAs = String.class, contentAs = BirthExtendedProperty.class) | ||
private Map<String, BirthExtendedProperty> extendedProperties; | ||
|
||
/** | ||
* Gets the version. | ||
* | ||
* @return The version. | ||
* @since 1.5.0 | ||
*/ | ||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
/** | ||
* Sets the version. | ||
* | ||
* @param version The version. | ||
* @since 1.5.0 | ||
*/ | ||
public void setVersion(String version) { | ||
this.version = version; | ||
} | ||
|
||
/** | ||
* Gets the {@link Map} of {@link BirthExtendedProperty}es. | ||
* | ||
* @return The {@link Map} of {@link BirthExtendedProperty}es. | ||
* @since 1.5.0 | ||
*/ | ||
public Map<String, BirthExtendedProperty> getExtendedProperties() { | ||
if (extendedProperties == null) { | ||
extendedProperties = new HashMap<>(); | ||
} | ||
|
||
return extendedProperties; | ||
} | ||
|
||
/** | ||
* Sets the {@link Map} of {@link BirthExtendedProperty}es. | ||
* | ||
* @param extendedProperties The {@link Map} of {@link BirthExtendedProperty}es. | ||
* @since 1.5.0 | ||
*/ | ||
public void setExtendedProperties(Map<String, BirthExtendedProperty> extendedProperties) { | ||
this.extendedProperties = extendedProperties; | ||
} | ||
} |
Oops, something went wrong.