From 894c36fe2686ab6641f715465ef439e2bc6e5d8b Mon Sep 17 00:00:00 2001 From: brasseld Date: Fri, 20 Nov 2015 16:47:23 +0100 Subject: [PATCH] refactor: Remove methods for API repository --- .../repository/management/api/ApiRepository.java | 2 +- .../io/gravitee/repository/management/model/User.java | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/gravitee/repository/management/api/ApiRepository.java b/src/main/java/io/gravitee/repository/management/api/ApiRepository.java index bcce6720..ea179bb5 100644 --- a/src/main/java/io/gravitee/repository/management/api/ApiRepository.java +++ b/src/main/java/io/gravitee/repository/management/api/ApiRepository.java @@ -66,7 +66,7 @@ public interface ApiRepository extends CrudRepository{ void deleteMember(String api, String username) throws TechnicalException; - Collection getMembers(String api) throws TechnicalException; + Collection getMembers(String api, MembershipType membershipType) throws TechnicalException; Membership getMember(String api, String username) throws TechnicalException; } diff --git a/src/main/java/io/gravitee/repository/management/model/User.java b/src/main/java/io/gravitee/repository/management/model/User.java index 5bd57463..a5da1736 100644 --- a/src/main/java/io/gravitee/repository/management/model/User.java +++ b/src/main/java/io/gravitee/repository/management/model/User.java @@ -16,8 +16,8 @@ package io.gravitee.repository.management.model; import java.util.Date; -import java.util.List; import java.util.Objects; +import java.util.Set; /** * @author David BRASSELY (brasseld at gmail.com) @@ -52,7 +52,7 @@ public class User { /** * The user roles */ - private List roles; + private Set roles; /** * The user creation date @@ -104,11 +104,11 @@ public void setPassword(String password) { this.password = password; } - public List getRoles() { + public Set getRoles() { return roles; } - public void setRoles(List roles) { + public void setRoles(Set roles) { this.roles = roles; } @@ -148,7 +148,6 @@ public String toString() { sb.append(", lastname='").append(lastname).append('\''); sb.append(", mail='").append(email).append('\''); sb.append(", username='").append(username).append('\''); - sb.append(", roles='").append(roles).append('\''); sb.append('}'); return sb.toString(); }