Class SelectionBasketEntry

  • All Implemented Interfaces:
    Serializable, WebEntity

    public class SelectionBasketEntry
    extends Object
    implements WebEntity
    An entry in the basket. Any items in the basket are wrapped by an entry that maps the item, id est the Silverpeas resource, to a context that indicates for what reason the resource was put in the basket. When an item is put or get from the SelectionBasket, it is always done through a SelectionBasketEntry instance.
    Author:
    mmoquillon
    See Also:
    Serialized Form
    • Constructor Detail

      • SelectionBasketEntry

        protected SelectionBasketEntry()
      • SelectionBasketEntry

        public SelectionBasketEntry​(BasketItem item)
    • Method Detail

      • getURI

        public URI getURI()
        Gets the URI through which this entry can be retrieved through the selection basket Web API.
        Specified by:
        getURI in interface WebEntity
        Returns:
        the URI at which this entry, and hence the selected Silverpeas resource, can be found.
      • getItem

        public BasketItem getItem()
        Gets the item in the basket to which this entry is related.
        Returns:
        a Web entity representation of a Silverpeas resource.
      • getContext

        public SelectionContext getContext()
        Gets the context for what the related item has been put into the basket.
        Returns:
        the context of selecting the Silverpeas resource represented here by the item.
      • reload

        public SelectionBasketEntry reload()
        Reloads the data of the represented Silverpeas resource. By calling this method, you ensure the representation of the resource is up-to-date. If the resource supports the l10n, then the data get is in the language of the current user behind the request; by doing this, you ensure the data of the resource will be presented to the user in his language.
        Returns:
        itself
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object