Class SelectionBasketEntry
- java.lang.Object
-
- org.silverpeas.core.webapi.selection.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 theSelectionBasket
, it is always done through aSelectionBasketEntry
instance.- Author:
- mmoquillon
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SelectionBasketEntry()
SelectionBasketEntry(BasketItem item)
SelectionBasketEntry(BasketItem item, SelectionContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static SelectionBasketEntry
from(SelectionEntry<SilverpeasResource> entry)
SelectionContext
getContext()
Gets the context for what the related item has been put into the basket.BasketItem
getItem()
Gets the item in the basket to which this entry is related.URI
getURI()
Gets the URI through which this entry can be retrieved through the selection basket Web API.int
hashCode()
SelectionBasketEntry
reload()
Reloads the data of the represented Silverpeas resource.SelectionBasketEntry
withURI(URI uri)
-
-
-
Constructor Detail
-
SelectionBasketEntry
protected SelectionBasketEntry()
-
SelectionBasketEntry
public SelectionBasketEntry(BasketItem item, SelectionContext context)
-
SelectionBasketEntry
public SelectionBasketEntry(BasketItem item)
-
-
Method Detail
-
from
public static SelectionBasketEntry from(SelectionEntry<SilverpeasResource> entry)
-
getURI
public URI getURI()
Gets the URI through which this entry can be retrieved through the selection basket Web API.
-
withURI
public SelectionBasketEntry withURI(URI uri)
-
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
-
-