GridftpDataMovementResource resource = AppCatalogThriftConversion.getGridFTPDataMovementDescription(gridFTPDataMovement);
resource.save();
List<String> gridFTPEndPoint = gridFTPDataMovement.getGridFTPEndPoints();
if (gridFTPEndPoint != null && !gridFTPEndPoint.isEmpty()) {
for (String endpoint : gridFTPEndPoint) {
GridftpEndpointResource endpointResource = new GridftpEndpointResource();
endpointResource.setDataMovementInterfaceId(resource.getDataMovementInterfaceId());
endpointResource.setEndpoint(endpoint);
endpointResource.setGridftpDataMovementResource(resource);
endpointResource.save();
}
}
return resource.getDataMovementInterfaceId();
}catch (Exception e){
logger.error("Error while saving GridFTP Data Movement...", e);