Class NewsfeedPostPresenter<T extends NewsfeedPostView>

    • Constructor Detail

      • NewsfeedPostPresenter

        public NewsfeedPostPresenter()
        Default constructor. This creates an instance of ProfileParams to display the profile of the member posting.
      • NewsfeedPostPresenter

        public NewsfeedPostPresenter​(ProfileParams profileParams)
        Constructor the receives custom ProfileParams to display the profile of the member posting.
        Parameters:
        profileParams - ProfileParams
    • Method Detail

      • onProfileDownloadSuccess

        protected void onProfileDownloadSuccess​(Profile profile)
        Called when GET profile is successful
        Parameters:
        profile - Profile
      • onProfileDownloadFailure

        protected void onProfileDownloadFailure​(java.lang.String error)
        Called when GET profile fails
        Parameters:
        error - error message
      • addPost

        public void addPost​(java.lang.String feedName,
                            java.lang.String body,
                            java.util.List<okhttp3.MultipartBody.Part> attachments)
        Add a new post
        Parameters:
        feedName - name of the feed
        body - content of the post
        attachments - attachments of the post
      • addPost

        public void addPost​(java.lang.String feedName,
                            java.lang.String body,
                            java.util.List<okhttp3.MultipartBody.Part> attachments,
                            NewsfeedParams queryParams,
                            NewsfeedFields fieldParams)
        Add a new post
        Parameters:
        feedName - name of the feed
        body - content of the post
        attachments - attachments of the post
        queryParams - custom NewsfeedParams
        fieldParams - custom NewsfeedFields
      • onPostSuccess

        protected void onPostSuccess​(NewPost data)
        Called when creating a new post API is successful
        Parameters:
        data - NewPost
      • onPostFailure

        protected void onPostFailure​(java.lang.String error)
        Called when creating a new post API fails
        Parameters:
        error - error message