use of com.sequenceiq.cloudbreak.structuredevent.event.SecurityRuleDetails 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;
}
use of com.sequenceiq.cloudbreak.structuredevent.event.SecurityRuleDetails in project cloudbreak by hortonworks.
the class SecurityRuleToSecurityRuleDetailsConverter method convert.
@Override
public SecurityRuleDetails convert(SecurityRule source) {
SecurityRuleDetails securityRuleDetails = new SecurityRuleDetails();
securityRuleDetails.setCidr(source.getCidr());
securityRuleDetails.setProtocol(source.getProtocol());
securityRuleDetails.setPorts(Arrays.stream(source.getPorts()).collect(Collectors.joining(",")));
return securityRuleDetails;
}
Aggregations