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 Type
    Method
    Description
    void
    Call this method to wipe out all the state information of this object fetcher.
    Call this method to retrieve the next unprocessed object from Asana.
    void
    Call 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 returned AsanaObject contains 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, AsanaObject otherwise.
    • saveState

      Map<String,String> saveState()
      Call this method to serialize this object fetcher's state.
      Returns:
      A Map containing the object state in key-value pairs. Optimized for using it with StateManager
    • loadState

      void loadState(Map<String,String> state)
      Call this method to deserialize invalid input: '&' restore a state that was saved/exported earlier.
      Parameters:
      state - A Map containing all the key-value pairs returned by a prior call to saveState().
    • clearState

      void clearState()
      Call this method to wipe out all the state information of this object fetcher. As if it was brand-new.