public ClientResponse runWorkflowResponse(WorkflowInputs workflowInputs) { return super.create(workflowInputs); }
public List<Role> getRoles() { return super.get(ROLE_LIST_TYPE_REFERENCE); }
/** * {@inheritDoc} */ @Override public JobDetails showJob(final String id) { return super.show(id, JobDetails.class); }
public List<User> getUsers() { // Handles both User lists and single user retrieval try { return super.get(USER_LIST_TYPE_REFERENCE); } catch(RuntimeException e) { List out = new ArrayList(); out.add(super.getWebResource().get(User.class)); return out; } }
@Override public String createApiKey(String userId) { return super.read(super.getWebResource().path(userId).path("api_key").post(ClientResponse.class), String.class); }
/** * {@inheritDoc} */ public Tool showTool(final String toolId) { return super.getWebResource(toolId).get(Tool.class); }
public List<RepositoryWorkflow> exportedWorkflows(String toolShedId) { return super.read(this.exportedWorkflowsRequest(toolShedId), TOOL_SHED_REPOSITORY_WORKFLOW_LIST_TYPE_REFERENCE); }
public ClientResponse uploadFile(String libraryId, FileLibraryUpload upload) { final Map<String, Object> entityMap = new HashMap<String, Object>(); entityMap.put("file_type", upload.getFileType()); entityMap.put("db_key", upload.getDbkey()); entityMap.put("files_0|NAME", upload.getName()); entityMap.put("upload_option", upload.getUploadOption()); entityMap.put("folder_id", upload.getFolderId()); entityMap.put("create_type", upload.getCreateType()); return super.multipartPost(getWebResourceContents(libraryId), entityMap, prepareUpload(upload.getFile())); }
@Override public void downloadDataset(String historyId, String datasetId, File destinationFile) throws IOException { Dataset dataset = showDataset(historyId, datasetId); String fileExt = dataset.getDataTypeExt(); File downloadedFile = super.getWebResourceContents(historyId) .path(datasetId).path("display").queryParam("to_ext", fileExt) .get(File.class); downloadedFile.renameTo(destinationFile); FileWriter fr = new FileWriter(downloadedFile); fr.close(); }
public HistoryExport exportHistory(String historyId) { final WebResource.Builder resource = super.path(historyId).path("exports").type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON); final ClientResponse response = resource.put(ClientResponse.class); final int status = response.getStatus(); if(status == 200) { return response.getEntity(HistoryExport.class); } else if(status == 202) { return new HistoryExport(); } else { throw new RuntimeException("Problems with history export."); } }
public ClientResponse showWorkflowResponse(final String id) { return super.show(id, ClientResponse.class); }
public ClientResponse createUserRequest(final String remoteUserEmail) { final Map<String, String> map = new HashMap<String, String>(); map.put("remote_user_email", remoteUserEmail); return super.getWebResource().post(ClientResponse.class, write(map)); }
public List<InstalledRepository> installRepository(final RepositoryInstall install) { final ClientResponse response = this.installRepositoryRequest(install); return super.read(response, TOOL_SHED_REPOSITORY_LIST_TYPE_REFERENCE); }
public ClientResponse createRequest(final History history) { return super.create(history); }
public WorkflowDetails showWorkflow(final String id) { return super.show(id, WorkflowDetails.class); }
@Override public ClientResponse createUserRequest(UserCreate userCreate) { return super.getWebResource().post(ClientResponse.class, write(userCreate)); }
public List<InstalledRepository> getRepositories() { return super.get(TOOL_SHED_REPOSITORY_LIST_TYPE_REFERENCE); }
public ClientResponse createLibraryRequest(final Library library) { return super.create(library); }