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

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


      ComputeResourceResource computeHostResource)
      throws AppCatalogException {
    List<DataMovementInterface> dataMovemenetInterfaces = description.getDataMovementInterfaces();
    if (dataMovemenetInterfaces != null && !dataMovemenetInterfaces.isEmpty()) {
        for (DataMovementInterface dataMovementInterface : dataMovemenetInterfaces) {
          DataMovementInterfaceResource dmir = AppCatalogThriftConversion.getDataMovementInterface(dataMovementInterface);
          dmir.setComputeHostResource(computeHostResource);
          dmir.setComputeResourceId(computeHostResource.getResourceId());
        computeHostResource.save();
        }
    }
  }
View Full Code Here


    }

    @Override
    public void addDataMovementProtocol(String computeResourceId, DataMovementInterface dataMovementInterface) throws AppCatalogException {
        try {
          DataMovementInterfaceResource dmi = AppCatalogThriftConversion.getDataMovementInterface(dataMovementInterface);
          dmi.setComputeResourceId(computeResourceId);
          ComputeResourceResource computeResourceResource = new ComputeResourceResource();
          computeResourceResource=(ComputeResourceResource)computeResourceResource.get(computeResourceId);
          dmi.setComputeHostResource(computeResourceResource);
          dmi.save();
        }catch (Exception e){
            logger.error("Error while saving "+dataMovementInterface.getDataMovementProtocol().toString()+" data movement Protocol...", e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

    }

    @Override
    public void removeDataMovementInterface(String dataMovementInterfaceId) throws AppCatalogException {
        try {
            DataMovementInterfaceResource resource = new DataMovementInterfaceResource();
            resource.remove(dataMovementInterfaceId);
        }catch (Exception e){
            logger.error("Error while removing data movement interface..", e);
            throw new AppCatalogException(e);
        }
    }
View Full Code Here

        }
    return resourceJobManagerResource;
  }
   
    private static Resource createDataMovementInterface(DataMovementInterface o) {
    DataMovementInterfaceResource dataMovementInterfaceResource = new DataMovementInterfaceResource();
        if (o != null) {
            dataMovementInterfaceResource.setComputeResourceId(o.getComputeResourceId());
            dataMovementInterfaceResource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
            dataMovementInterfaceResource.setDataMovementProtocol(o.getDataMovementProtocol());
            dataMovementInterfaceResource.setDataMovementInterfaceId(o.getDataMovementInterfaceId());
            dataMovementInterfaceResource.setPriorityOrder(o.getPriorityOrder());
        }
    return dataMovementInterfaceResource;
  }
View Full Code Here

TOP

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

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.