Package org.apache.aiaravata.application.catalog.data.resources

Examples of org.apache.aiaravata.application.catalog.data.resources.GridftpDataMovementResource


     * Returns a success/failure of the updation.
     */
    @Override
    public boolean updateGridFTPDataMovementDetails(String jobSubmissionInterfaceId, GridFTPDataMovement gridFTPDataMovement) throws InvalidRequestException, AiravataClientException, AiravataSystemException, TException {
      try {
            GridftpDataMovementResource movment = AppCatalogThriftConversion.getGridFTPDataMovementDescription(gridFTPDataMovement);
            movment.setDataMovementInterfaceId(jobSubmissionInterfaceId);
            movment.save();
            return true;
        } catch (AppCatalogException e) {
            logger.error("Error while adding job submission interface to resource compute resource...", e);
            AiravataSystemException exception = new AiravataSystemException();
            exception.setAiravataErrorType(AiravataErrorType.INTERNAL_ERROR);
View Full Code Here


    @Override
    public String addGridFTPDataMovement(GridFTPDataMovement gridFTPDataMovement) throws AppCatalogException {
        try {
          gridFTPDataMovement.setDataMovementInterfaceId(AppCatalogUtils.getID("SCP"));
          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);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

//    }

    @Override
    public GridFTPDataMovement getGridFTPDataMovement(String dataMoveId) throws AppCatalogException {
        try {
            GridftpDataMovementResource resource = new GridftpDataMovementResource();
            GridftpDataMovementResource dataMovementResource = (GridftpDataMovementResource)resource.get(dataMoveId);
            return AppCatalogThriftConversion.getGridFTPDataMovementDescription(dataMovementResource);
        }catch (Exception e){
            logger.error("Error while retrieving Grid FTP Data Movement...", e);
            throw new AppCatalogException(e);
        }
View Full Code Here

        }
    return scpDataMovementResource;
  }

    private static Resource createGridftpDataMovement(GridftpDataMovement o) {
    GridftpDataMovementResource gridftpDataMovementResource = new GridftpDataMovementResource();
        if (o != null){
            gridftpDataMovementResource.setDataMovementInterfaceId(o.getDataMovementInterfaceId());
            gridftpDataMovementResource.setSecurityProtocol(o.getSecurityProtocol());
        }
    return gridftpDataMovementResource;
  }
View Full Code Here

TOP

Related Classes of org.apache.aiaravata.application.catalog.data.resources.GridftpDataMovementResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.