Class GenericAsanaObjectFetcher<T extends com.asana.models.Resource>
java.lang.Object
org.apache.nifi.processors.asana.utils.AbstractAsanaObjectFetcher
org.apache.nifi.processors.asana.utils.GenericAsanaObjectFetcher<T>
- All Implemented Interfaces:
AsanaObjectFetcher
- Direct Known Subclasses:
AsanaProjectFetcher,AsanaProjectMembershipFetcher,AsanaProjectStatusAttachmentFetcher,AsanaProjectStatusFetcher,AsanaStoryFetcher,AsanaTagFetcher,AsanaTaskAttachmentFetcher,AsanaTaskFetcher,AsanaTeamFetcher,AsanaTeamMemberFetcher,AsanaUserFetcher
public abstract class GenericAsanaObjectFetcher<T extends com.asana.models.Resource>
extends AbstractAsanaObjectFetcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringcalculateSecureHash(String input) voidCall this method to wipe out all the state information of this object fetcher.private static Stringprotected StringcreateObjectFingerprint(T object) private static Stringdecompress(String str) protected Iterator<AsanaObject> fetch()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.protected StringtransformObjectToPayload(T object)
-
Field Details
-
LAST_FINGERPRINTS
- See Also:
-
lastFingerprints
-
-
Constructor Details
-
GenericAsanaObjectFetcher
public GenericAsanaObjectFetcher()
-
-
Method Details
-
fetchNext
Description copied from interface:AsanaObjectFetcherCall 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.- Specified by:
fetchNextin interfaceAsanaObjectFetcher- Overrides:
fetchNextin classAbstractAsanaObjectFetcher- Returns:
- null if there are no more unprocessed objects at the moment,
AsanaObjectotherwise.
-
saveState
Description copied from interface:AsanaObjectFetcherCall 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
Description copied from interface:AsanaObjectFetcherCall 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
public void clearState()Description copied from interface:AsanaObjectFetcherCall this method to wipe out all the state information of this object fetcher. As if it was brand-new.- Specified by:
clearStatein interfaceAsanaObjectFetcher- Overrides:
clearStatein classAbstractAsanaObjectFetcher
-
fetch
- Specified by:
fetchin classAbstractAsanaObjectFetcher
-
transformObjectToPayload
-
createObjectFingerprint
-
fetchObjects
-
compress
- Throws:
IOException
-
decompress
- Throws:
IOException
-
calculateSecureHash
-