Add tool tip component to operation features

jenkinsfile
Lasantha Dharmakeerthi 3 months ago
commit f14e2cecdf

@ -58,6 +58,13 @@ public class Feature implements Serializable {
)
private String description;
@ApiModelProperty(
name = "tooltip",
value = "Provides a tooltip for the features.",
required = false
)
private String tooltip;
@ApiModelProperty(
name = "type",
value = "Type of the feature.",
@ -139,6 +146,16 @@ public class Feature implements Serializable {
this.description = description;
}
@XmlElement
public String getTooltip() {
return tooltip;
}
public void setTooltip(String tooltip) {
this.tooltip = tooltip;
}
@XmlAttribute
public String getType() {
return type;

@ -68,6 +68,9 @@ public class HTTPDeviceTypeManagerService extends DeviceTypeManagerService imple
if (feature.getCode() != null && feature.getName() != null) {
configFeature.setCode(feature.getCode());
configFeature.setDescription(feature.getDescription());
if (feature.getTooltip() != null) {
configFeature.setTooltip(feature.getTooltip());
}
configFeature.setName(feature.getName());
if (feature.getMetadataEntries() != null && feature.getMetadataEntries().size() > 0) {
List<String> metaValues = new ArrayList<>();

@ -45,6 +45,7 @@ import java.util.List;
@XmlType(name = "Feature", propOrder = {
"name",
"description",
"tooltip",
"operation",
"metaData"
})
@ -56,6 +57,9 @@ public class Feature {
@XmlElement(name = "Description", required = true)
protected String description;
@XmlElement(name = "Tooltip", required = false)
protected String tooltip;
@XmlElement(name = "Operation")
protected Operation operation;
@ -117,6 +121,31 @@ public class Feature {
this.description = value;
}
/**
* Gets the value of the tooltip property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTooltip() {
return tooltip;
}
/**
* Sets the value of the tooltip property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTooltip(String value) {
this.tooltip = value;
}
/**
* Gets the value of the operation property.
*

@ -60,6 +60,9 @@ public class ConfigurationBasedFeatureManager implements FeatureManager {
deviceFeature.setCode(feature.getCode());
deviceFeature.setName(feature.getName());
deviceFeature.setDescription(feature.getDescription());
if (feature.getTooltip() != null) {
deviceFeature.setTooltip(feature.getTooltip());
}
deviceFeature.setType(feature.getType());
Operation operation = feature.getOperation();
List<Feature.MetadataEntry> metadataEntries = null;

Loading…
Cancel
Save