PageletStore

public class PageletStore

A PageletStore is a holder which stores a set of pagelets for a certain context.

Author:Hugo Y. K. Lam

See also: Pagelet

Constructors

PageletStore

public PageletStore()

Creates a new instance of PageletStore.

Methods

addPagelet

public Pagelet addPagelet(Pagelet pagelet)

Adds a pagelet to this store.

Parameters:
  • pagelet – the pagelet to be added.
Returns:

the previous pagelet, if any, which has the same ID with the given pagelet.

getPagelet

public Pagelet getPagelet(String id)

Retrieves a pagelet from this store.

Parameters:
  • id – the pagelet ID.
Returns:

the corresponding pagelet, if any.

removePagelet

public Pagelet removePagelet(String id)

Removes a pagelet from this store.

Parameters:
  • id – the pagelet ID.
Returns:

the removed pagelet, if any.