Skip to content
Snippets Groups Projects
Commit 965c00b4 authored by ethiraj krishnamanaidu's avatar ethiraj krishnamanaidu
Browse files

Merge branch 'haaggarw/AddingITopicsRepositoryInterface' into 'master'

Adding ITopicsRepository Interface

See merge request !26
parents b66f0139 e4b4e708
No related branches found
No related tags found
1 merge request!26Adding ITopicsRepository Interface
Pipeline #12759 passed
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; ...@@ -22,6 +22,7 @@ import org.apache.http.HttpStatus;
import org.opengroup.osdu.core.common.logging.JaxRsDpsLog; import org.opengroup.osdu.core.common.logging.JaxRsDpsLog;
import org.opengroup.osdu.core.common.model.http.AppException; import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.notification.Topic; 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.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -33,7 +34,7 @@ import java.util.ArrayList; ...@@ -33,7 +34,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@Repository @Repository
public class TopicsRepository { public class TopicsRepository implements ITopicsRepository {
@Autowired @Autowired
private JaxRsDpsLog log; private JaxRsDpsLog log;
......
...@@ -18,6 +18,7 @@ package org.opengroup.osdu.register.subscriber.services; ...@@ -18,6 +18,7 @@ package org.opengroup.osdu.register.subscriber.services;
import com.google.common.base.Strings; import com.google.common.base.Strings;
import org.opengroup.osdu.core.common.model.notification.Topic; 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.opengroup.osdu.register.subscriber.persistence.TopicsRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -29,7 +30,7 @@ import java.util.stream.Collectors; ...@@ -29,7 +30,7 @@ import java.util.stream.Collectors;
public class AvailableTopics { public class AvailableTopics {
@Autowired @Autowired
private TopicsRepository topicRepo; private ITopicsRepository topicRepo;
public boolean exists(String name) { public boolean exists(String name) {
if (Strings.isNullOrEmpty(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