private void initializeSECStorage() { inMemorySECStorage.clear(); List<DataSinkDescription> secs = sesameStorage.getAllSECs(); secs.forEach(sec -> inMemorySECStorage.put(sec.getElementId(), sec)); }
private void initializeSECStorage() { inMemorySECStorage.clear(); List<DataSinkDescription> secs = sesameStorage.getAllSECs(); secs.forEach(sec -> inMemorySECStorage.put(sec.getElementId(), sec)); }
private List<ConsumableStreamPipesEntity> getAllSecs() { List<String> userObjects = UserManagementService.getUserService().getOwnActionUris(email); return getTripleStore() .getAllSECs() .stream() .filter(e -> userObjects.stream().anyMatch(u -> u.equals(e.getElementId()))) .map(DataSinkDescription::new) .collect(Collectors.toList()); }
private List<ConsumableStreamPipesEntity> getAllSecs() { List<String> userObjects = UserManagementService.getUserService().getOwnActionUris(email); return getTripleStore() .getAllSECs() .stream() .filter(e -> userObjects.stream().anyMatch(u -> u.equals(e.getElementId()))) .map(DataSinkDescription::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; }
@Override @Path("/actions") @GET @GsonWithIds @Produces(MediaType.APPLICATION_JSON) public Response getActions() { List<DataSinkDescription> result = new ArrayList<>(); List<DataSinkDescription> sesameSecs = StorageManager.INSTANCE.getStorageAPI().getAllSECs(); for(DataSinkDescription sec : sesameSecs) result.add(new DataSinkDescription(sec)); return ok(result); }
@GET @Path("/own") @RequiresAuthentication @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response getOwn(@PathParam("username") String username) { List<DataSinkDescription> secs = Filter.byUri(getPipelineElementRdfStorage().getAllSECs(), getUserService().getOwnActionUris(username)); List<DataSinkInvocation> si = secs.stream().map(s -> new DataSinkInvocation(new DataSinkInvocation(s))).collect(Collectors.toList()); return ok(si); }
@GET @Path("/available") @RequiresAuthentication @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response getAvailable(@PathParam("username") String username) { List<DataSinkDescription> secs = Filter.byUri(getPipelineElementRdfStorage().getAllSECs(), getUserService().getAvailableActionUris(username)); return ok(secs); }
@GET @Path("/favorites") @RequiresAuthentication @Produces(MediaType.APPLICATION_JSON) @GsonWithIds @Override public Response getFavorites(@PathParam("username") String username) { List<DataSinkDescription> secs = Filter.byUri(getPipelineElementRdfStorage().getAllSECs(), getUserService().getFavoriteActionUris(username)); return ok(secs); }
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))); } }