private void initializeSEPAStorage() { inMemorySEPAStorage.clear(); List<DataProcessorDescription> sepas = sesameStorage.getAllSEPAs(); sepas.forEach(sepa -> inMemorySEPAStorage.put(sepa.getElementId(), sepa)); }
private void initializeSEPAStorage() { inMemorySEPAStorage.clear(); List<DataProcessorDescription> sepas = sesameStorage.getAllSEPAs(); sepas.forEach(sepa -> inMemorySEPAStorage.put(sepa.getElementId(), sepa)); }
private List<ConsumableStreamPipesEntity> getAllSepas() { List<String> userObjects = UserManagementService.getUserService().getOwnSepaUris(email); return getTripleStore() .getAllSEPAs() .stream() .filter(e -> userObjects.stream().anyMatch(u -> u.equals(e.getElementId()))) .map(DataProcessorDescription::new) .collect(Collectors.toList()); }
private List<org.streampipes.model.ApplicationLink> generateAppLinks() { List<NamedStreamPipesEntity> allElements = new ArrayList<>(); List<org.streampipes.model.ApplicationLink> allApplicationLinks = new ArrayList<>(); allElements.addAll(getPipelineElementRdfStorage() .getAllSEPAs().stream().map(e -> new DataProcessorDescription(e)).collect(Collectors.toList())); allElements.addAll(getPipelineElementRdfStorage() .getAllSECs().stream().map(e -> new DataSinkDescription(e)).collect(Collectors.toList())); allElements.addAll(getPipelineElementRdfStorage() .getAllSEPs().stream().map(e -> new DataSourceDescription(e)).collect(Collectors.toList())); allElements.stream().forEach(e -> allApplicationLinks.addAll(removeDuplicates(allApplicationLinks, e.getApplicationLinks()))); return allApplicationLinks; }
private List<ConsumableStreamPipesEntity> getAllSepas() { List<String> userObjects = UserManagementService.getUserService().getOwnSepaUris(email); return getTripleStore() .getAllSEPAs() .stream() .filter(e -> userObjects.stream().anyMatch(u -> u.equals(e.getElementId()))) .map(DataProcessorDescription::new) .collect(Collectors.toList()); }
@Override @Path("/sepas") @GsonWithIds @GET @Produces(MediaType.APPLICATION_JSON) public Response getSepas() { JsonArray result = new JsonArray(); List<DataProcessorDescription> sesameSepas = StorageManager.INSTANCE.getStorageAPI().getAllSEPAs(); for(DataProcessorDescription sepa : sesameSepas) result.add(getHeader(sepa.getUri(), sepa.getName())); return ok(result); }
@GET @Path("/own") @RequiresAuthentication @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response getOwn(@PathParam("username") String username) { List<DataProcessorDescription> sepas = Filter.byUri(getPipelineElementRdfStorage().getAllSEPAs(), getUserService().getOwnSepaUris(username)); List<DataProcessorInvocation> si = sepas.stream().map(s -> new DataProcessorInvocation(new DataProcessorInvocation(s))).collect(Collectors.toList()); return ok(si); }
@GET @Path("/favorites") @RequiresAuthentication @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response getFavorites(@PathParam("username") String username) { List<DataProcessorDescription> sepas = Filter.byUri(getPipelineElementRdfStorage().getAllSEPAs(), getUserService().getFavoriteSepaUris(username)); return ok(sepas); }
@GET @Path("/available") @RequiresAuthentication @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response getAvailable(@PathParam("username") String username) { List<DataProcessorDescription> sepas = Filter.byUri(getPipelineElementRdfStorage().getAllSEPAs(), getUserService().getAvailableSepaUris(username)); return ok(sepas); }
public void prepareMonitoring() { StorageManager.INSTANCE.getStorageAPI().getAllSEPAs().forEach(s -> addJob(new SepaMonitoringJob(s))); StorageManager.INSTANCE.getStorageAPI().getAllSECs().forEach(s -> addJob(new SecMonitoringJob(s))); //TODO: add seps StorageManager.INSTANCE.getStorageAPI().getAllSECs().forEach(s -> currentJobs.add(new SecMonitoringJob(s))); } }
public void prepareMonitoring() { StorageManager.INSTANCE.getStorageAPI().getAllSEPAs().forEach(s -> addJob(new SepaMonitoringJob(s))); StorageManager.INSTANCE.getStorageAPI().getAllSECs().forEach(s -> addJob(new SecMonitoringJob(s))); //TODO: add seps StorageManager.INSTANCE.getStorageAPI().getAllSECs().forEach(s -> currentJobs.add(new SecMonitoringJob(s))); } }