private static List<PortMapping> createPortMappings(CartridgeInfo cartridgeInfo) {
List<PortMapping> portMappings = new ArrayList<PortMapping>();
if (cartridgeInfo.getPortMappings() != null) {
for (org.apache.stratos.cloud.controller.stub.pojo.PortMapping portMapping : cartridgeInfo.getPortMappings()) {
PortMapping portMap = new PortMapping();
portMap.setPrimaryPort(portMapping.getPort());
portMap.setProxyPort(portMapping.getProxyPort());
portMap.setType(portMapping.getProtocol());
portMappings.add(portMap);
}
}
return portMappings;
}