From 6e271a5772e87e7142a39ca7ea0e6c47c0c42207 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 24 Mar 2022 14:25:21 +0100 Subject: [PATCH] Added isApplication and getFullName APIs --- .../common/authorization/utils/user/User.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/org/gcube/common/authorization/utils/user/User.java b/src/main/java/org/gcube/common/authorization/utils/user/User.java index 558da35..80b738f 100644 --- a/src/main/java/org/gcube/common/authorization/utils/user/User.java +++ b/src/main/java/org/gcube/common/authorization/utils/user/User.java @@ -9,6 +9,8 @@ public interface User { public String getUsername(); + public boolean isApplication(); + public Collection getRoles(); public void setRoles(Collection roles); @@ -17,6 +19,20 @@ public interface User { public String getFamilyName(); + /** + * @return the full name in the form 'Surname Name' for a person + * or the application identifier for an application; + */ + public String getFullName(); + + /** + * @param nameSurname when true the fullname will be formatted as 'Name Surname', + * when false the fullname will be formatted as 'Surname Name', + * @return the full name according to nameSurname boolean for a person + * or the application identifier for an application; + */ + public String getFullName(boolean nameSurname); + public String getEmail(); public String getAbout();