Search in sources :

Example 1 with SecurityGroupDetails

use of com.sequenceiq.cloudbreak.structuredevent.event.SecurityGroupDetails in project cloudbreak by hortonworks.

the class SecurityGroupToSecurityGroupDetailsConverter method convert.

@Override
public SecurityGroupDetails convert(SecurityGroup source) {
    SecurityGroupDetails securityGroupDetails = new SecurityGroupDetails();
    securityGroupDetails.setId(source.getId());
    securityGroupDetails.setName(source.getName());
    securityGroupDetails.setDescription(source.getDescription());
    securityGroupDetails.setSecurityGroupId(source.getSecurityGroupId());
    securityGroupDetails.setSecurityRules((List<SecurityRuleDetails>) conversionService.convert(source.getSecurityRules(), TypeDescriptor.forObject(source.getSecurityRules()), TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(SecurityRuleDetails.class))));
    return securityGroupDetails;
}
Also used : SecurityRuleDetails(com.sequenceiq.cloudbreak.structuredevent.event.SecurityRuleDetails) List(java.util.List) SecurityGroupDetails(com.sequenceiq.cloudbreak.structuredevent.event.SecurityGroupDetails)

Aggregations

SecurityGroupDetails (com.sequenceiq.cloudbreak.structuredevent.event.SecurityGroupDetails)1 SecurityRuleDetails (com.sequenceiq.cloudbreak.structuredevent.event.SecurityRuleDetails)1 List (java.util.List)1