Skip to content
Snippets Groups Projects
Commit e4b4e708 authored by harshit aggarwal's avatar harshit aggarwal Committed by ethiraj krishnamanaidu
Browse files

Adding ITopicsRepository Interface

parent b66f0139
No related branches found
No related tags found
No related merge requests found
package org.opengroup.osdu.register.provider.interfaces.subscriber;
import org.opengroup.osdu.core.common.model.notification.Topic;
import java.util.List;
public interface ITopicsRepository {
List<Topic> listMessages();
}
......@@ -22,6 +22,7 @@ import org.apache.http.HttpStatus;
import org.opengroup.osdu.core.common.logging.JaxRsDpsLog;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.notification.Topic;
import org.opengroup.osdu.register.provider.interfaces.subscriber.ITopicsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Repository;
......@@ -33,7 +34,7 @@ import java.util.ArrayList;
import java.util.List;
@Repository
public class TopicsRepository {
public class TopicsRepository implements ITopicsRepository {
@Autowired
private JaxRsDpsLog log;
......
......@@ -18,6 +18,7 @@ package org.opengroup.osdu.register.subscriber.services;
import com.google.common.base.Strings;
import org.opengroup.osdu.core.common.model.notification.Topic;
import org.opengroup.osdu.register.provider.interfaces.subscriber.ITopicsRepository;
import org.opengroup.osdu.register.subscriber.persistence.TopicsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -29,7 +30,7 @@ import java.util.stream.Collectors;
public class AvailableTopics {
@Autowired
private TopicsRepository topicRepo;
private ITopicsRepository topicRepo;
public boolean exists(String name) {
if (Strings.isNullOrEmpty(name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment