bbende commented on code in PR #9138:
URL: https://github.com/apache/nifi/pull/9138#discussion_r1705417081
##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/dto/DtoFactory.java:
##########
@@ -1509,6 +1512,26 @@ private ParameterProviderConfigurationEntity
createParameterProviderConfiguratio
return config;
}
+ public AssetEntity createAssetEntity(final Asset asset) {
+ final AssetEntity entity = new AssetEntity();
+ entity.setAsset(createAssetDto(asset));
+ return entity;
+ }
+
+ public AssetDTO createAssetDto(final Asset asset) {
+ final File assetFile = asset.getFile();
+ final AssetDTO dto = new AssetDTO();
+ dto.setId(asset.getIdentifier());
+ dto.setName(asset.getName());
+ dto.setDigest(asset.getDigest().orElse(null));
+ dto.setMissingContent(!assetFile.exists());
Review Comment:
I don't have a strong preference, it seemed like we used "missing" for other
stuff like components that are ghosted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]