|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.portal.coplets.basket.AbstractItem
org.apache.cocoon.portal.coplets.basket.ContentItem
public class ContentItem
This is an item that contains a link or a content. The item can either reference a coplet or an URL.
| Field Summary | |
|---|---|
protected byte[] |
content
The content |
protected String |
copletId
The id of the referenced coplet |
protected boolean |
storesContent
Do we store the content or just the link? |
protected String |
stringRep
The cached string rep |
protected String |
url
The referenced url |
| Fields inherited from class org.apache.cocoon.portal.coplets.basket.AbstractItem |
|---|
attributes, currentId, id |
| Constructor Summary | |
|---|---|
ContentItem(CopletInstanceData cid,
boolean content)
Create a new item referencing a coplet instance data |
|
ContentItem(String url,
boolean content)
Create a new item referencing to a url |
|
| Method Summary | |
|---|---|
boolean |
equalsItem(ContentItem ci)
Compare one item with another |
byte[] |
getContent()
Get the content or null |
String |
getCopletId()
Return the referenced coplet or null for a url |
String |
getURL()
Return the url of null for a coplet |
boolean |
isContent()
Do we store the content? |
void |
setContent(byte[] c)
Set the content |
void |
setTitle(String title)
|
int |
size()
Return the size if content is stored Otherwise -1 is returned |
String |
toString()
|
| Methods inherited from class org.apache.cocoon.portal.coplets.basket.AbstractItem |
|---|
getAttribute, getAttributeNames, getId, hasAttribute, removeAttribute, setAttribute |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String copletId
protected boolean storesContent
protected String url
protected String stringRep
protected byte[] content
| Constructor Detail |
|---|
public ContentItem(CopletInstanceData cid,
boolean content)
cid - The copletcontent - Do we store the content (false: a link)
public ContentItem(String url,
boolean content)
url - The urlcontent - Do we store the content (false: a link)| Method Detail |
|---|
public String getURL()
public String getCopletId()
public boolean isContent()
public void setContent(byte[] c)
public byte[] getContent()
public int size()
public String toString()
toString in class Objectpublic boolean equalsItem(ContentItem ci)
public void setTitle(String title)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||