X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdbcapi.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fservice%2FDmaapService.java;h=c54fce8a9ae4b24f9cae1308d4b78f57bec2b594;hp=48ee661963c48943ce395b52295a99ee09e6d830;hb=c52d9c91d54f7e8b0500cebba00255b3e6b08c13;hpb=036eaca9ccd55f5c568dff6347da1bcf07e5c61b diff --git a/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java b/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java index 48ee661..c54fce8 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java +++ b/src/main/java/org/onap/dmaap/dbcapi/service/DmaapService.java @@ -3,6 +3,8 @@ * org.onap.dmaap * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,17 +23,8 @@ package org.onap.dmaap.dbcapi.service; import java.util.ArrayList; - - - - - - - - - - import org.onap.dmaap.dbcapi.aaf.AafService; +import org.onap.dmaap.dbcapi.aaf.AafServiceFactory; import org.onap.dmaap.dbcapi.aaf.DmaapGrant; import org.onap.dmaap.dbcapi.aaf.DmaapPerm; import org.onap.dmaap.dbcapi.aaf.AafService.ServiceType; @@ -43,7 +36,6 @@ import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum; import org.onap.dmaap.dbcapi.model.ApiError; import org.onap.dmaap.dbcapi.model.Dmaap; import org.onap.dmaap.dbcapi.model.MR_Client; -import org.onap.dmaap.dbcapi.model.ReplicationType; import org.onap.dmaap.dbcapi.model.Topic; import org.onap.dmaap.dbcapi.model.DmaapObject.DmaapObject_Status; import org.onap.dmaap.dbcapi.util.DmaapConfig; @@ -94,9 +86,9 @@ public class DmaapService extends BaseLoggingClass { nd.setLastMod(); dmaapholder.update(nd); - AafService aaf = new AafService( ServiceType.AAF_Admin); + AafService aaf = new AafServiceFactory().initAafService(ServiceType.AAF_Admin); ApiPolicy apiPolicy = new ApiPolicy(); - if ( apiPolicy.getUseAuthClass() ) { + if ( apiPolicy.isPermissionClassSet() ) { ApiPerms p = new ApiPerms(); p.setEnvMap(); } @@ -139,11 +131,11 @@ public class DmaapService extends BaseLoggingClass { dmaapholder.update(nd); //need to set this so the following perms will pick up any new vals. //dcaeTopicNs = dmaapholder.get().getTopicNsRoot(); ApiPolicy apiPolicy = new ApiPolicy(); - if ( apiPolicy.getUseAuthClass()) { + if ( apiPolicy.isPermissionClassSet()) { ApiPerms p = new ApiPerms(); p.setEnvMap(); } - AafService aaf = new AafService( ServiceType.AAF_Admin); + AafService aaf = new AafServiceFactory().initAafService(ServiceType.AAF_Admin); if ( multiSite ) { anythingWrong = setTopicMgtPerms( nd, aaf ) || createMmaTopic(); }