Package tv.mycujoo.mclsnetwork.api
Class DataManager
-
- All Implemented Interfaces:
-
tv.mycujoo.mclsnetwork.api.DataProvider,tv.mycujoo.mclsnetwork.data.IDataManager,tv.mycujoo.mclsnetwork.data.IInternalDataProvider
public final class DataManager implements IDataManager
Serves client as 'Data Provider' Serves internal usage as 'Internal Data Provider'
-
-
Constructor Summary
Constructors Constructor Description DataManager(CoroutineScope scope, Logger logger, GetEventDetailUseCase getEventDetailUseCase, GetEventsUseCase getEventsUseCase, GetActionsUseCase getActionsUseCase)
-
Method Summary
Modifier and Type Method Description MCLSResult<Exception, MCLSEvent>getEventDetails(String eventId, String updateId)fetch Event with details UnitsetLogLevel(LogLevel logLevel)set @param log level of Logger MCLSResult<Exception, List<AnnotationAction>>getActions(String timelineId, String updateId)get Annotation Actions UnitfetchEvents(Integer pageSize, String pageToken, String filter, OrderByEventsParam orderBy, Function3<List<MCLSEventListItem>, String, String, Unit> fetchEventCallback)fetch Events with given specificationEvents Are pushed into the LiveData events and fetchEventCallback when fetch is done. MCLSResult<Exception, Events>fetchEvents(Integer pageSize, String pageToken, String filter, OrderByEventsParam orderBy)-
-
Constructor Detail
-
DataManager
DataManager(CoroutineScope scope, Logger logger, GetEventDetailUseCase getEventDetailUseCase, GetEventsUseCase getEventsUseCase, GetActionsUseCase getActionsUseCase)
- Parameters:
scope- CoroutineScope which calls will made on it's contextlogger- log info, error & warning based on required level of logginggetEventDetailUseCase- an invocation for IEventsRepository#getEventDetailsgetEventsUseCase- an invocation for IEventsRepository#getEventsListgetActionsUseCase- an invocation for IEventsRepository#getActions
-
-
Method Detail
-
getEventDetails
MCLSResult<Exception, MCLSEvent> getEventDetails(String eventId, String updateId)
fetch Event with details
-
setLogLevel
Unit setLogLevel(LogLevel logLevel)
set @param log level of Logger
-
getActions
MCLSResult<Exception, List<AnnotationAction>> getActions(String timelineId, String updateId)
get Annotation Actions
- Parameters:
timelineId- timeLineId of EventupdateId- nullable update of Event
-
fetchEvents
Unit fetchEvents(Integer pageSize, String pageToken, String filter, OrderByEventsParam orderBy, Function3<List<MCLSEventListItem>, String, String, Unit> fetchEventCallback)
fetch Events with given specification
Events Are pushed into the LiveData events and fetchEventCallback when fetch is done.
- Parameters:
pageSize- nullable size of pagepageToken- nullable token of pageorderBy- nullable order of returned EventsfetchEventCallback- nullable callback which will may be used to navigate through paginated data
-
fetchEvents
MCLSResult<Exception, Events> fetchEvents(Integer pageSize, String pageToken, String filter, OrderByEventsParam orderBy)
-
-
-
-