All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getstream.client.service.FlatActivityServiceImpl Maven / Gradle / Ivy

There is a newer version: 2.1.3
Show newest version
package io.getstream.client.service;

import io.getstream.client.model.activities.BaseActivity;
import io.getstream.client.exception.StreamClientException;
import io.getstream.client.model.beans.StreamResponse;
import io.getstream.client.model.feeds.BaseFeed;
import io.getstream.client.model.filters.FeedFilter;
import io.getstream.client.repo.StreamRepository;

import java.io.IOException;

/**
 * Provide methods to interact with Flat activities of subtype of {@link BaseActivity}.
 *
 * @param  Subtype of {@link BaseActivity} representing the activity type to handle.
 */
public class FlatActivityServiceImpl extends AbstractActivityService
        implements FlatActivityService {

    public FlatActivityServiceImpl(BaseFeed feed, Class type, StreamRepository streamRepository) {
        super(feed, type, streamRepository);
    }

    @Override
    public StreamResponse getActivities() throws IOException, StreamClientException {
        return streamRepository.getActivities(this.feed, type, new FeedFilter.Builder().build());
    }

    @Override
    public StreamResponse getActivities(final FeedFilter filter) throws IOException, StreamClientException {
        return streamRepository.getActivities(this.feed, type, filter);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy