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

java.lang.Object
  extended by org.apache.cocoon.portal.coplets.basket.AbstractItem
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ContentItem

public class AbstractItem
extends Object
implements Serializable

This is a possible base class for item implementations. It just adds attributes (or meta-data) functionality

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

Field Summary
protected  Map attributes
          The attributes
protected static long currentId
           
protected  long id
          Unique id
 
Constructor Summary
AbstractItem()
           
 
Method Summary
 Object getAttribute(String name)
          Return an attribute or null
 Iterator getAttributeNames()
          Get all attribute names
 long getId()
           
 boolean hasAttribute(String name)
          Check if an attribute is available
 void removeAttribute(String name)
          Remove one attribute
 void setAttribute(String name, Object value)
          Set an attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentId

protected static long currentId

attributes

protected Map attributes
The attributes


id

protected long id
Unique id

Constructor Detail

AbstractItem

public AbstractItem()
Method Detail

getAttribute

public Object getAttribute(String name)
Return an attribute or null


setAttribute

public void setAttribute(String name,
                         Object value)
Set an attribute


getAttributeNames

public Iterator getAttributeNames()
Get all attribute names


removeAttribute

public void removeAttribute(String name)
Remove one attribute


hasAttribute

public boolean hasAttribute(String name)
Check if an attribute is available


getId

public long getId()


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