2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.dmaap.mr.cambria.metabroker;
23 import java.util.ArrayList;
24 import java.util.List;
26 import org.onap.dmaap.dmf.mr.CambriaApiException;
27 import org.onap.dmaap.dmf.mr.metabroker.Broker;
28 import org.onap.dmaap.dmf.mr.metabroker.Topic;
29 import com.att.nsa.configs.ConfigDbException;
30 import com.att.nsa.security.ReadWriteSecuredResource.AccessDeniedException;
32 public class BrokerImpl implements Broker {
35 public List<Topic> getAllTopics() throws ConfigDbException {
36 // TODO Auto-generated method stub
37 Topic top = new TopicImplem();
39 List<Topic> list = new ArrayList<Topic>();
41 for (int i = 0; i < 5; i++) {
42 top = new TopicImplem();
52 public Topic getTopic(String topic) throws ConfigDbException {
53 // TODO Auto-generated method stub
54 return new TopicImplem();
58 public Topic createTopic(String topic, String description, String ownerApiKey, int partitions, int replicas,
59 boolean transactionEnabled) throws TopicExistsException, CambriaApiException {
60 // TODO Auto-generated method stub
61 return new TopicImplem(topic, description, ownerApiKey, transactionEnabled);
65 public void deleteTopic(String topic) throws AccessDeniedException, CambriaApiException, TopicExistsException {
66 // TODO Auto-generated method stub
67 Topic top = new TopicImplem();