コード例 #1
0
  @Override
  public void onRequestSaveAnalysisParameters(final SaveAnalysisParametersEvent event) {
    fileEditorServiceAsyncProvider.get(
        new AsyncCallback<FileEditorServiceFacade>() {
          @Override
          public void onFailure(Throwable caught) {
            ErrorHandler.post(caught);
          }

          @Override
          public void onSuccess(FileEditorServiceFacade service) {
            service.uploadTextAsFile(
                event.getPath(),
                event.getFileContents(),
                true,
                new SaveAnalysisParametersCallback(
                    announcer,
                    appearance,
                    diskResourceUtil,
                    eventBus,
                    jsonUtil,
                    userInfo,
                    userSessionService,
                    event));
          }
        });
  }
コード例 #2
0
  @Override
  public void get(final AsyncCallback<T> callback) {
    bundleProvider.get(
        new AsyncCallback<B>() {
          @Override
          public void onFailure(Throwable caught) {
            callback.onFailure(caught);
          }

          @SuppressWarnings("unchecked")
          @Override
          public void onSuccess(B providerBundle) {
            callback.onSuccess(((Provider<T>) providerBundle.get(providerId)).get());
          }
        });
  }
コード例 #3
0
  @Override
  public void onAnalysisParamValueSelected(AnalysisParamValueSelectedEvent event) {
    final AnalysisParameter value = event.getValue();

    if (!((Input.equals(value.getType())
        || FileInput.equals(value.getType())
        || FolderInput.equals(value.getType())
        || FileFolderInput.equals(value.getType())
        || MultiFileSelector.equals(value.getType())))) {
      return;
    }
    String infoType = value.getInfoType();
    if (infoType.equalsIgnoreCase("ReferenceGenome")
        || infoType.equalsIgnoreCase("ReferenceSequence")
        || infoType.equalsIgnoreCase("ReferenceAnnotation")) {
      return;
    }

    final File hasPath = factory.file().as();
    hasPath.setPath(value.getDisplayValue());
    final FastMap<TYPE> typeFastMap =
        diskResourceUtil.asStringPathTypeMap(Lists.newArrayList(hasPath), TYPE.FILE);
    diskResourceServiceAsyncProvider.get(
        new AsyncCallback<DiskResourceServiceFacade>() {
          @Override
          public void onFailure(Throwable caught) {
            ErrorHandler.post(caught);
          }

          @Override
          public void onSuccess(DiskResourceServiceFacade service) {
            service.getStat(
                typeFastMap, new GetStatCallback(value, eventBus, announcer, appearance));
          }
        });
  }