API Reference

com.kinvey.android.network

Class AsyncLinkedNetworkManager<T extends LinkedGenericJson>

  • com.kinvey.android.network.AsyncLinkedNetworkManager<T>


  • public class AsyncLinkedNetworkManager<T extends LinkedGenericJson>

    Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask.

    This functionality can be accessed through the com.kinvey.android.Client.linkedData} convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class.

    The methods provided in this class take two (optional) callbacks, a KinveyClientCallback for the NetworkManager request as well as a UploaderProgressListener or DownloaderProgressListener for updates on the NetworkFileManager status

    The functionality of this class is provided by both the com.kinvey.java.network.NetworkManager API as well as the com.kinvey.java.network.NetworkFileManager API.

    See Also:
    com.kinvey.android.Client.linkedData
    • Constructor Summary

      Constructors 
      Constructor and Description
      AsyncLinkedNetworkManager(java.lang.String collectionName, java.lang.Class<T> myClass, Client<?> client)
      Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void get(com.kinvey.java.Query query, KinveyListCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, com.kinvey.java.store.StoreType storeType)
      Method to get an entity or entities and download ALL associated Linked Resources.
      void get(com.kinvey.java.Query query, KinveyListCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, java.lang.String[] resolves, int resolve_depth, boolean retain, com.kinvey.java.store.StoreType storeType)
      Method to get an entity or entities and download ALL associated Linked Resources.
      void get(KinveyListCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, com.kinvey.java.store.StoreType storeType)
      Method to get an entity or entities and download ALL associated Linked Resources.
      void getEntity(java.lang.String entityID, com.kinvey.java.core.KinveyClientCallback<T> callback, com.kinvey.java.core.DownloaderProgressListener download, com.kinvey.java.store.StoreType storeType)
      Method to get an entity or entities and download a subset of associated Linked Resources.
      void save(T entity, com.kinvey.java.core.KinveyClientCallback<T> callback, com.kinvey.java.core.UploaderProgressListener upload, com.kinvey.java.store.StoreType storeType)
      Save (create or update) an entity to a collection and upload ALL associated Linked Resources.
    • Constructor Detail

      • AsyncLinkedNetworkManager

        public AsyncLinkedNetworkManager(java.lang.String collectionName,
                                         java.lang.Class<T> myClass,
                                         Client<?> client)

        Wraps the LinkedNetworkManager public methods in asynchronous functionality using native Android AsyncTask.

        This functionality can be accessed through the com.kinvey.android.Client.linkedData} convenience method. The first String parameter is the name of the Collection, and the Class is the expected Response Class.

        The methods provided in this class take two (optional) callbacks, a KinveyClientCallback for the NetworkManager request as well as a UploaderProgressListener or DownloaderProgressListener for updates on the NetworkFileManager status

        The functionality of this class is provided by both the com.kinvey.java.network.NetworkManager API as well as the com.kinvey.java.network.NetworkFileManager API.

        See Also:
        com.kinvey.android.Client.linkedData
    • Method Detail

      • getEntity

        public void getEntity(java.lang.String entityID,
                              com.kinvey.java.core.KinveyClientCallback<T> callback,
                              com.kinvey.java.core.DownloaderProgressListener download,
                              com.kinvey.java.store.StoreType storeType)

        Method to get an entity or entities and download a subset of associated Linked Resources.

        Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the NetworkFileManager downloads.

        This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

        Parameters:
        entityID - entityID to get
        download -
        • used for progress updates as associated files are downloaded.

        Throws:
        IOException -
        • if there is an issue executing the client requests

      • get

        public void get(com.kinvey.java.Query query,
                        KinveyListCallback<T> callback,
                        com.kinvey.java.core.DownloaderProgressListener download,
                        com.kinvey.java.store.StoreType storeType)

        Method to get an entity or entities and download ALL associated Linked Resources.

        Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the NetworkFileManager downloads.

        This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

        Parameters:
        query - query for entities to retrieve
        download -
        • used for progress updates as associated files are downloaded.

        Throws:
        IOException -
        • if there is an issue executing the client requests

      • get

        public void get(com.kinvey.java.Query query,
                        KinveyListCallback<T> callback,
                        com.kinvey.java.core.DownloaderProgressListener download,
                        java.lang.String[] resolves,
                        int resolve_depth,
                        boolean retain,
                        com.kinvey.java.store.StoreType storeType)

        Method to get an entity or entities and download ALL associated Linked Resources.

        Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the NetworkFileManager downloads.

        This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

        Parameters:
        query - query for entities to retrieve
        download -
        • used for progress updates as associated files are downloaded.

        Throws:
        IOException -
        • if there is an issue executing the client requests

      • get

        public void get(KinveyListCallback<T> callback,
                        com.kinvey.java.core.DownloaderProgressListener download,
                        com.kinvey.java.store.StoreType storeType)

        Method to get an entity or entities and download ALL associated Linked Resources.

        Pass null to entityID to return all entities in a collection. Use the DownloaderProgressListener to retrieve callback information about the NetworkFileManager downloads.

        This method will only download Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

        Parameters:
        download -
        • used for progress updates as associated files are downloaded.

        Throws:
        IOException -
        • if there is an issue executing the client requests

      • save

        public void save(T entity,
                         com.kinvey.java.core.KinveyClientCallback<T> callback,
                         com.kinvey.java.core.UploaderProgressListener upload,
                         com.kinvey.java.store.StoreType storeType)

        Save (create or update) an entity to a collection and upload ALL associated Linked Resources.

        This method will only upload Linked Resources for the fields declared in the resources array. These Strings must match the strings used as keys in the entity.

        Parameters:
        entity - Entity to Save
        upload -
        • Listener for uploading Linked Resources, can be null.

        Throws:
        IOException -
        • if there is an issue executing the client requests