org.apache.cocoon.portal.coplets.basket
Class ContentStore

java.lang.Object
  extended by org.apache.cocoon.portal.coplets.basket.ContentStore
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Basket, Briefcase, Folder

public abstract class ContentStore
extends Object
implements Serializable

This is a per user store that can contain any object. Make a subclass to add your specific functionality.

Version:
CVS $Id: ContentStore.html 1304258 2012-03-23 10:09:27Z ilgrosso $
See Also:
Serialized Form

Field Summary
protected  String id
          The id
protected  List items
          The ordered list of items
 
Constructor Summary
ContentStore(String id)
          The constructor
 
Method Summary
 void addItem(Object item)
          Add an item
 int contentSize()
          Calculate the size of a basket
 String getId()
           
 Object getItem(int index)
          Get an item at the index
 Object getItem(long id)
          Get an item with the id
 Iterator getIterator()
          Get the iterator
 void removeItem(Object item)
          Remove an item
 int size()
          Number of items in the basket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

protected final List items
The ordered list of items


id

protected final String id
The id

Constructor Detail

ContentStore

public ContentStore(String id)
The constructor

Method Detail

getId

public String getId()
Returns:
Returns the id.

getItem

public Object getItem(int index)
Get an item at the index


addItem

public void addItem(Object item)
Add an item


getIterator

public Iterator getIterator()
Get the iterator


removeItem

public void removeItem(Object item)
Remove an item


size

public int size()
Number of items in the basket


contentSize

public int contentSize()
Calculate the size of a basket


getItem

public Object getItem(long id)
Get an item with the id



Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.