From ebd1b2c5c1d2ea85accd6ea2b023ece1fcbf3dde Mon Sep 17 00:00:00 2001 From: Fabio Sinibaldi Date: Tue, 3 Aug 2021 12:37:43 +0200 Subject: [PATCH] Interface returns Iterator --- CHANGELOG.md | 2 +- .../application/geoportal/common/rest/ProjectsI.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7089dc2..7c318e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # [v1.0.6-SNAPSHOT] - 2021-08-3 Interface parameter "force" -MongoConcessioni returns iterator instead of iterable +Interfaces return iterator instead of iterable # [v1.0.5] - 2020-12-9 Mongo Id in record diff --git a/src/main/java/org/gcube/application/geoportal/common/rest/ProjectsI.java b/src/main/java/org/gcube/application/geoportal/common/rest/ProjectsI.java index cc81111..9e50d3f 100644 --- a/src/main/java/org/gcube/application/geoportal/common/rest/ProjectsI.java +++ b/src/main/java/org/gcube/application/geoportal/common/rest/ProjectsI.java @@ -2,14 +2,16 @@ package org.gcube.application.geoportal.common.rest; import org.gcube.application.geoportal.common.model.project.Project; +import java.util.Iterator; + public interface ProjectsI { - public Iterable getAll() throws Exception; - public Iterable getByProfile(String profileId) throws Exception; + public Iterator getAll() throws Exception; + public Iterator getByProfile(String profileId) throws Exception; public Project getById(String profileId,String id) throws Exception; - public Iterable getByFilter(String filter)throws Exception; - public Iterable getByFilter(String filter, String profileId)throws Exception; + public Iterator getByFilter(String filter)throws Exception; + public Iterator getByFilter(String filter, String profileId)throws Exception; public Project registrNew(String profileId, String jsonDocument)throws Exception; public Project update(String profileId, String projectId,String jsonDocument) throws Exception; public void deleteById(String profileId, String projectId)throws Exception;