Feature extend system management resource with custom data (#423)
* Added map to system management and mgmt resource to extend the the rest resource with custom data Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com> * Lazy initialization of hash map and typo fix Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com> * Renamed the map to usageData Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com> * Adapted hashcode and equals and now returning empty map Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com> * Reduced duplicated code Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com> * Removed the if statement Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com> * Added separated method for lazy initialization Signed-off-by: Jonathan Philip Knoblauch <JonathanPhilip.Knoblauch@bosch-si.com>
This commit is contained in:
committed by
Michael Hirsch
parent
a00ea49e47
commit
d553716cda
@@ -87,7 +87,9 @@ public class MgmtSystemManagementResource implements MgmtSystemManagementRestApi
|
||||
result.setArtifacts(tenant.getArtifacts());
|
||||
result.setOverallArtifactVolumeInBytes(tenant.getOverallArtifactVolumeInBytes());
|
||||
result.setTargets(tenant.getTargets());
|
||||
|
||||
if (!tenant.getUsageData().isEmpty()) {
|
||||
result.setUsageData(tenant.getUsageData());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user