java.lang .Object org.apache.cocoon.portal.coplets.basket .AbstractItem org.apache.cocoon.portal.coplets.basket .ContentItem ContentItem public class ContentItem extends AbstractItem implements Serializable (Code) This is an item that contains a link or a content.
The item can either reference a coplet or an URL.
version: CVS $Id: ContentItem.java 433543 2006-08-22 06:22:54Z crossley $
content protected byte[] content(Code) The content
copletId protected String copletId(Code) The id of the referenced coplet
storesContent protected boolean storesContent(Code) Do we store the content or just the link?
stringRep protected String stringRep(Code) The cached string rep
ContentItem public ContentItem(CopletInstanceData cid, boolean content)(Code) Create a new item referencing a coplet instance data
Parameters: cid - The copletParameters: content - Do we store the content (false: a link)
ContentItem public ContentItem(String url, boolean content)(Code) Create a new item referencing to a url
Parameters: url - The urlParameters: content - Do we store the content (false: a link)
equalsItem public boolean equalsItem(ContentItem ci)(Code) Compare one item with another
getContent public byte[] getContent()(Code) Get the content or null
getCopletId public String getCopletId()(Code) Return the referenced coplet or null for a url
getURL public String getURL()(Code) Return the url of null for a coplet
isContent public boolean isContent()(Code) Do we store the content? (or just the link)
setContent public void setContent(byte[] c)(Code) Set the content
size public int size()(Code) Return the size if content is stored
Otherwise -1 is returned