|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.core.AbstractDateStamped
org.davesag.generica.core.AbstractContent
org.davesag.generica.core.AbstractExtensibleContent
org.davesag.generica.core.AbstractText
org.davesag.generica.core.Story
The Story bean represents a basic story suitable as a base for
any content management system where stories should be displayed on a
website. The stories are designed to be localizable.
| Field Summary | |
protected Category |
theCategory
a category for this story |
protected List |
theComments
a list of comments about this story |
protected String |
theDescription
a short description of this story |
protected String |
theLink
a url or other link for this story |
| Fields inherited from class org.davesag.generica.core.AbstractText |
theAuthor, theText, theTitle |
| Fields inherited from class org.davesag.generica.core.AbstractExtensibleContent |
theMetaData |
| Fields inherited from class org.davesag.generica.core.AbstractContent |
theCountryCode, theLanguageCode |
| Fields inherited from class org.davesag.generica.core.AbstractDateStamped |
theCreated, theId, theLastModified |
| Constructor Summary | |
Story()
null constructor required by hibernate. |
|
Story(String title,
User author,
String text,
Locale loc)
Constructor that takes a title, author, text and iso language code. |
|
Story(String title,
User author,
String text,
String lang)
Constructor that takes a title, author, text and iso language code. |
|
| Method Summary | |
void |
addComment(Comment comment)
Add a Comment to this Story. |
boolean |
equals(Object o)
Tests if the supplied object is equal to this Story. |
Category |
getCategory()
the category. |
Comment |
getComment(int index)
returns the Comment with the given index. |
List |
getComments()
get the list of comments. |
String |
getDescription()
the description. |
String |
getLink()
the story link. |
int |
hashcode()
hashode. |
void |
removeComment(Comment comment)
Remove a Comment from this Story. |
void |
setCategory(Category cat)
Set the Category for this Story. |
void |
setComment(int index,
Comment picture)
sets the Comment at the index specified. |
void |
setComments(List comments)
Set this Story's comments list. |
void |
setDescription(String desc)
Set a short description of this Story. |
void |
setLink(String link)
Set an associated link for this Story. |
String |
toString()
simple string of the story. |
| Methods inherited from class org.davesag.generica.core.AbstractText |
getAuthor, getText, getTitle, setAuthor, setText, setTitle |
| Methods inherited from class org.davesag.generica.core.AbstractExtensibleContent |
addMetaData, getMetaData, getMetaData, removeMetaData, setMetaData |
| Methods inherited from class org.davesag.generica.core.AbstractContent |
getCountryCode, getLanguageCode, getLocale, setCountryCode, setLanguageCode, setLocale |
| Methods inherited from class org.davesag.generica.core.AbstractDateStamped |
getCreated, getId, getLastModified, setCreated, setId, setLastModified, setTemplateId |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.davesag.generica.core.DateStamped |
getCreated, getLastModified, setCreated, setLastModified |
| Field Detail |
protected String theLink
protected String theDescription
protected Category theCategory
protected List theComments
| Constructor Detail |
public Story()
public Story(String title,
User author,
String text,
String lang)
title - The title of the Story.author - The User that wrote the story.text - The text of the story.lang - The ISO Language Code.
public Story(String title,
User author,
String text,
Locale loc)
title - The title of the Story.author - The User that wrote the story.text - The text of the story.loc - The Locale we use to determine the ISO Language Code.| Method Detail |
public String getLink()
public void setLink(String link)
link - A link for this Story.public String getDescription()
public void setDescription(String desc)
desc - A description of this Story.public Category getCategory()
public void setCategory(Category cat)
cat - The Category of this Story.public List getComments()
public void setComments(List comments)
comments - The List of Comments about this Story.public Comment getComment(int index)
index - The index of the Comment you want.
public void setComment(int index,
Comment picture)
index - The index at which to set the Comment, overwriting any
previous picture at that index.picture - The picture to set.public void addComment(Comment comment)
comment - The Comment to add.public void removeComment(Comment comment)
comment - The Comment to remove.public String toString()
toString in class AbstractContentpublic boolean equals(Object o)
equals in class AbstractTexto - The object to test against this Story. Must also be a Story
to make sense.
public int hashcode()
hashcode in class AbstractContent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||