public static PortFlow extractPortFlow(final NeutronSecurityRule securityRule, final List<String> endPointgroups) { Integer portMin = securityRule.getSecurityRulePortMin(); Integer portMax = securityRule.getSecurityRulePortMax(); String etherType = securityRule.getSecurityRuleEthertype(); String protocol = securityRule.getSecurityRuleProtocol(); String direction = securityRule.getSecurityRuleDirection(); final PortFlow portFlow = new PortFlow(portMax, portMin, protocol, etherType, direction, endPointgroups); portFlow.validate(); return portFlow; } }