Class ProductDetailsPresenter<T extends ProductDetailsView>

    • Constructor Detail

      • ProductDetailsPresenter

        public ProductDetailsPresenter​(@NonNull
                                       java.lang.String productId)
        Create the presenter with a given product id
        Parameters:
        productId - the id of the Product to be fetched
      • ProductDetailsPresenter

        public ProductDetailsPresenter​(@NonNull
                                       java.lang.String productId,
                                       ProductsParams queryParams)
        Create the presenter with a given product id and ProductsParams
        Parameters:
        productId - the id of the Product to be fetched
        queryParams - the ProductsParams
    • Method Detail

      • setCustomizeScreen

        public void setCustomizeScreen​(boolean isCustomizeScreen)
        Set flag to launch customize screen
        Parameters:
        isCustomizeScreen - true to launch customize screen, else false
      • setOrderItem

        public void setOrderItem​(@NonNull
                                 OrderItem orderItem)
        Set the current stored OrderItem
        Parameters:
        orderItem - instance of OrderItem that serves a container for the Product
      • getProduct

        @Nullable
        public Product getProduct()
      • onProductReceiveSuccess

        protected void onProductReceiveSuccess​(Product product)
        Executed after receiving a successful response from ProductsAPI
        Parameters:
        product - the instance of Product received from the request
      • addProductAttribute

        protected void addProductAttribute​(Product product)
        Part of the load data where product attributes are filtered
        Parameters:
        product - instance of Product
      • addComponent

        protected void addComponent​(Product product)
        Part of the load data where additional component are parsed
        Parameters:
        product - instance of Product