Search in sources :

Example 1 with EncryptionKeyConfigResponse

use of com.sequenceiq.environment.api.v1.platformresource.model.EncryptionKeyConfigResponse in project cloudbreak by hortonworks.

the class CloudEncryptionKeysToPlatformEncryptionKeysV1ResponseConverter method convert.

public PlatformEncryptionKeysResponse convert(CloudEncryptionKeys source) {
    PlatformEncryptionKeysResponse platformEncryptionKeysResponse = new PlatformEncryptionKeysResponse();
    Set<EncryptionKeyConfigResponse> result = new HashSet<>();
    for (CloudEncryptionKey entry : source.getCloudEncryptionKeys()) {
        EncryptionKeyConfigResponse actual = new EncryptionKeyConfigResponse(entry.getName(), entry.getId(), entry.getDescription(), entry.getDisplayName(), entry.getProperties());
        result.add(actual);
    }
    platformEncryptionKeysResponse.setEncryptionKeyConfigs(result);
    return platformEncryptionKeysResponse;
}
Also used : PlatformEncryptionKeysResponse(com.sequenceiq.environment.api.v1.platformresource.model.PlatformEncryptionKeysResponse) CloudEncryptionKey(com.sequenceiq.cloudbreak.cloud.model.CloudEncryptionKey) EncryptionKeyConfigResponse(com.sequenceiq.environment.api.v1.platformresource.model.EncryptionKeyConfigResponse) HashSet(java.util.HashSet)

Aggregations

CloudEncryptionKey (com.sequenceiq.cloudbreak.cloud.model.CloudEncryptionKey)1 EncryptionKeyConfigResponse (com.sequenceiq.environment.api.v1.platformresource.model.EncryptionKeyConfigResponse)1 PlatformEncryptionKeysResponse (com.sequenceiq.environment.api.v1.platformresource.model.PlatformEncryptionKeysResponse)1 HashSet (java.util.HashSet)1