package org.onap.dmaap.dbcapi.service;
import org.onap.dmaap.dbcapi.aaf.AafService.ServiceType;
-import org.onap.dmaap.dbcapi.aaf.AafServiceImpl;
+import org.onap.dmaap.dbcapi.aaf.AafServiceFactory;
import org.onap.dmaap.dbcapi.database.DatabaseClass;
import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum;
this(DatabaseClass.getTopics(), new MR_ClientService(), (DmaapConfig) DmaapConfig.getConfig(),
new MR_ClusterService(), new DcaeLocationService(), new MirrorMakerService(),
new AafTopicSetupService(
- new AafServiceImpl(ServiceType.AAF_TopicMgr),
+ new AafServiceFactory().initAafService(ServiceType.AAF_TopicMgr),
dmaapSvc,
"true".equalsIgnoreCase(DmaapConfig.getConfig().getProperty("aaf.CreateTopicRoles", "true"))));
apiError.setFields("fqtn");
return null;
}
+
+ ApiError topicSetupError = aafTopicSetupService.aafTopicCleanup(topic);
+ updateApiError(apiError, topicSetupError);
+ if (apiError.getCode() >= 400) {
+ return null;
+ }
+
ArrayList<MR_Client> clients = new ArrayList<MR_Client>(clientService.getAllMrClients(pubId));
for (Iterator<MR_Client> it = clients.iterator(); it.hasNext(); ) {
MR_Client c = it.next();
-
-
clientService.removeMr_Client(c.getMrClientId(), false, apiError);
if (!apiError.is2xx()) {
return null;