
com.livefyre.factory.CursorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
Utilities for assistance with Livefyre features.
package com.livefyre.factory;
import java.util.Calendar;
import java.util.Date;
import com.livefyre.core.LfCore;
import com.livefyre.core.Network;
import com.livefyre.entity.TimelineCursor;
import com.livefyre.entity.Topic;
public class CursorFactory {
public static TimelineCursor getTopicStreamCursor(LfCore core, Topic topic) {
return getTopicStreamCursor(core, topic, 50, Calendar.getInstance().getTime());
}
public static TimelineCursor getTopicStreamCursor(LfCore core, Topic topic, Integer limit, Date date) {
String resource = topic.getId() + ":topicStream";
return new TimelineCursor(core, resource, limit, date);
}
public static TimelineCursor getPersonalStreamCursor(Network network, String user) {
return getPersonalStreamCursor(network, user, 50, Calendar.getInstance().getTime());
}
public static TimelineCursor getPersonalStreamCursor(Network network, String user, Integer limit, Date date) {
String resource = network.getUserUrn(user) + ":personalStream";
return new TimelineCursor(network, resource, limit, date);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy