public abstract class GenericAsanaObjectFetcher<T extends com.asana.models.Resource> extends AbstractAsanaObjectFetcher
| Modifier and Type | Field and Description |
|---|---|
private static String |
LAST_FINGERPRINTS |
private Map<String,String> |
lastFingerprints |
| Constructor and Description |
|---|
GenericAsanaObjectFetcher() |
| Modifier and Type | Method and Description |
|---|---|
private String |
calculateSecureHash(String input) |
void |
clearState()
Call this method to wipe out all the state information of this object fetcher.
|
private static String |
compress(String str) |
protected String |
createObjectFingerprint(T object) |
private static String |
decompress(String str) |
protected Iterator<AsanaObject> |
fetch() |
AsanaObject |
fetchNext()
Call this method to retrieve the next unprocessed object from Asana.
|
protected abstract Stream<T> |
fetchObjects() |
void |
loadState(Map<String,String> state)
Call this method to deserialize & restore a state that was saved/exported earlier.
|
Map<String,String> |
saveState()
Call this method to serialize this object fetcher's state.
|
protected String |
transformObjectToPayload(T object) |
private static final String LAST_FINGERPRINTS
public AsanaObject fetchNext()
AsanaObjectFetcherAsanaObject contains
the object in Json formatted string, and information about its ID and whether it is new, updated, or removed.fetchNext in interface AsanaObjectFetcherfetchNext in class AbstractAsanaObjectFetcherAsanaObject otherwise.public Map<String,String> saveState()
AsanaObjectFetcherMap containing the object state in key-value pairs. Optimized for using it with
StateManagerpublic void loadState(Map<String,String> state)
AsanaObjectFetcherstate - A Map containing all the key-value pairs returned by a prior call to saveState().public void clearState()
AsanaObjectFetcherclearState in interface AsanaObjectFetcherclearState in class AbstractAsanaObjectFetcherprotected Iterator<AsanaObject> fetch()
fetch in class AbstractAsanaObjectFetcherprivate static String compress(String str) throws IOException
IOExceptionprivate static String decompress(String str) throws IOException
IOExceptionCopyright © 2024 Apache NiFi Project. All rights reserved.