X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Fservice%2Frole%2FFnRoleService.java;fp=portal-BE%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fportal%2Fservice%2Frole%2FFnRoleService.java;h=3d489ae2be356c8cb7424f78020bf2f4cc1deb08;hb=ca3d9f4b725774763f12488940033a294b778244;hp=d73ae66e87a51a5ef36c462ecda6b2a537c19c43;hpb=4c6f6a443cb2e6effa995e77d56689c1c2dab4ad;p=portal.git diff --git a/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java b/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java index d73ae66e..3d489ae2 100644 --- a/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java +++ b/portal-BE/src/main/java/org/onap/portal/service/role/FnRoleService.java @@ -126,6 +126,10 @@ public class FnRoleService { return Optional.of(fnRoleDao.retrieveActiveRolesOfApplication(appId)).orElse(new ArrayList<>()); } + public List retrieveAppRolesByRoleNameAndWhereAppIdIsNull(final String roleName){ + return fnRoleDao.retrieveAppRolesByRoleNameAndWhereAppIdIsNull(roleName).orElse(new ArrayList<>()); + } + public List getGlobalRolesOfPortal() { List globalRoles = new ArrayList<>(); try { @@ -152,4 +156,13 @@ public class FnRoleService { public List saveAll(List fnRoles) { return fnRoleDao.saveAll(fnRoles); } + + public List userAppGlobalRoles(final Long userId, final Long appId) { + return fnRoleDao.userAppGlobalRoles(userId, appId).orElse(new ArrayList<>()); + } + + + public List retrieveActiveRolesWhereAppIdIsNull() { + return fnRoleDao.retrieveActiveRolesWhereAppIdIsNull().orElse(new ArrayList<>()); + } }