Interface AsanaObjectFetcher
- All Known Implementing Classes:
AbstractAsanaObjectFetcher,AsanaProjectEventFetcher,AsanaProjectFetcher,AsanaProjectMembershipFetcher,AsanaProjectStatusAttachmentFetcher,AsanaProjectStatusFetcher,AsanaStoryFetcher,AsanaTagFetcher,AsanaTaskAttachmentFetcher,AsanaTaskFetcher,AsanaTeamFetcher,AsanaTeamMemberFetcher,AsanaUserFetcher,GenericAsanaObjectFetcher
public interface AsanaObjectFetcher
This interface defines a common API to fetch objects from Asana without knowing what kind of objects are these,
and how to process them. Implementors responsibility to detect whether an object is new, updated, or removed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCall this method to wipe out all the state information of this object fetcher.Call this method to retrieve the next unprocessed object from Asana.voidCall this method to deserialize invalid input: '&' restore a state that was saved/exported earlier.Call this method to serialize this object fetcher's state.
-
Method Details
-
fetchNext
AsanaObject fetchNext()Call this method to retrieve the next unprocessed object from Asana. The returnedAsanaObjectcontains the object in Json formatted string, and information about its ID and whether it is new, updated, or removed.- Returns:
- null if there are no more unprocessed objects at the moment,
AsanaObjectotherwise.
-
saveState
Call this method to serialize this object fetcher's state.- Returns:
- A
Mapcontaining the object state in key-value pairs. Optimized for using it withStateManager
-
loadState
Call this method to deserialize invalid input: '&' restore a state that was saved/exported earlier.- Parameters:
state- AMapcontaining all the key-value pairs returned by a prior call tosaveState().
-
clearState
void clearState()Call this method to wipe out all the state information of this object fetcher. As if it was brand-new.
-