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