From a174f8ddbc5eb78a648fb68b33ef18cb64d81fda Mon Sep 17 00:00:00 2001 From: Instrumental Date: Thu, 7 Mar 2019 12:58:39 -0600 Subject: Improve Batches Issue-ID: AAF-740 Change-Id: Ib3e8a3f977964eed2e992dc02154dd3bc90492df Signed-off-by: Instrumental --- .../org/onap/aaf/auth/service/AuthzCassServiceImpl.java | 13 +++++++------ .../main/java/org/onap/aaf/auth/service/AuthzService.java | 4 +++- .../src/main/java/org/onap/aaf/auth/service/api/API_NS.java | 2 +- .../java/org/onap/aaf/auth/service/facade/AuthzFacade.java | 2 +- .../org/onap/aaf/auth/service/facade/AuthzFacadeImpl.java | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) (limited to 'auth/auth-service/src/main/java/org') diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java index c9730f5b..81a9d5ec 100644 --- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java +++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/AuthzCassServiceImpl.java @@ -470,7 +470,7 @@ public class AuthzCassServiceImpl getNSbyName(AuthzTrans trans, String ns) { + public Result getNSbyName(AuthzTrans trans, String ns, boolean includeExpired) { final Validator v = new ServiceValidator(); if (v.nullOrBlank("NS", ns).err()) { return Result.err(Status.ERR_BadData,v.errs()); @@ -488,11 +488,11 @@ public class AuthzCassServiceImpl > rd = func.getOwners(trans, namespace.name, false); + Result> rd = func.getOwners(trans, namespace.name, includeExpired); if (rd.isOK()) { namespace.owner = rd.value; } - rd = func.getAdmins(trans, namespace.name, false); + rd = func.getAdmins(trans, namespace.name, includeExpired); if (rd.isOK()) { namespace.admin = rd.value; } @@ -2731,6 +2731,7 @@ public class AuthzCassServiceImpl getNSbyName(AuthzTrans trans, String ns); + public Result getNSbyName(AuthzTrans trans, String ns, boolean full); /** * @@ -765,4 +765,6 @@ public interface AuthzService r = context.getNSsByName(trans, resp, pathParam(req,":id")); + Result r = context.getNSsByName(trans, resp, pathParam(req,":id"),TRUE.equals(req.getParameter(FULL))); switch(r.status) { case OK: resp.setStatus(HttpStatus.OK_200); diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacade.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacade.java index 61a491f0..a08e958f 100644 --- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacade.java +++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacade.java @@ -53,7 +53,7 @@ public interface AuthzFacade { */ public abstract Result requestNS(AuthzTrans trans, HttpServletRequest req, HttpServletResponse resp, NsType type); - public abstract Result getNSsByName(AuthzTrans trans, HttpServletResponse resp, String ns); + public abstract Result getNSsByName(AuthzTrans trans, HttpServletResponse resp, String ns, boolean full); public abstract Result getNSsByAdmin(AuthzTrans trans, HttpServletResponse resp, String user, boolean full); diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacadeImpl.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacadeImpl.java index e77e0908..a2fb2209 100644 --- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacadeImpl.java +++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/facade/AuthzFacadeImpl.java @@ -472,10 +472,10 @@ public abstract class AuthzFacadeImpl getNSsByName(AuthzTrans trans, HttpServletResponse resp, String ns) { + public Result getNSsByName(AuthzTrans trans, HttpServletResponse resp, String ns, boolean full) { TimeTaken tt = trans.start(GET_NS_BY_NAME + ' ' + ns, Env.SUB|Env.ALWAYS); try { - Result rp = service.getNSbyName(trans, ns); + Result rp = service.getNSbyName(trans, ns, full ); switch(rp.status) { case OK: RosettaData data = nssDF.newData(trans).load(rp.value); -- cgit 1.2.3-korg