import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.GenericEntity;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import org.apache.log4j.Logger;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-import org.onap.dmaap.dbcapi.aaf.authentication.AuthenticationErrorException;
+import org.onap.dmaap.dbcapi.authentication.AuthenticationErrorException;
import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
import org.onap.dmaap.dbcapi.logging.DmaapbcLogMessageEnum;
import org.onap.dmaap.dbcapi.model.ApiError;
@ApiResponse( code = 200, message = "Success", response = DR_Pub.class),
@ApiResponse( code = 400, message = "Error", response = ApiError.class )
})
- public Response getFeeds() {
+ public Response getFeeds(
+ @QueryParam("feedName") String feedName,
+ @QueryParam("version") String version,
+ @QueryParam("match") String match
+ ) {
ApiService resp = new ApiService();
FeedService feedService = new FeedService();
- List<Feed> nfeeds = feedService.getAllFeeds();
+ List<Feed> nfeeds = feedService.getAllFeeds( feedName, version, match );
GenericEntity<List<Feed>> list = new GenericEntity<List<Feed>>(nfeeds) {
};
return resp.success(list);
return resp.error();
}
} else if ( nfeed.getStatus() == DmaapObject_Status.DELETED ) {
- nfeed = feedService.updateFeed(nfeed, resp.getErr());
+ feed.setFeedId( nfeed.getFeedId());
+ nfeed = feedService.updateFeed(feed, resp.getErr());
if ( nfeed != null ) {
return resp.success(nfeed);
} else {