Class News
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.DatabaseBlobBean
org.deltava.beans.ImageBean
org.deltava.beans.News
- All Implemented Interfaces:
Serializable,Comparable<Object>,AuthoredBean,IDBean,Cacheable
- Direct Known Subclasses:
Notice
A class for storing System News entries.
- Since:
- 1.0
- Version:
- 10.6
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.deltava.beans.ImageBean
ImageBean.ImageFormat -
Field Summary
Fields inherited from class org.deltava.beans.DatabaseBlobBean
_buffer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintReturns the Author of this bean.intReturns the width of the banner image.getBody()Return this entry's Content.getDate()Return the date/entry this entry was created.Returns the database image type.booleanReturns if this entry is raw HTML.Return this entry's Title.voidsetAuthorID(int id) Updates the author of this bean.voidsetBannerWidth(int w) Updates the width of the banner image.voidUpdates this entry's body content.voidUpdate the date of this entry.voidsetIsHTML(boolean html) Updates if this entry is raw HTML.voidsetSubject(String subj) Updates this subject of this entry.Methods inherited from class org.deltava.beans.ImageBean
checkParam, getFormat, getHasImage, getHeight, getSize, getWidth, load, load, setFormat, setHeight, setSize, setWidthMethods inherited from class org.deltava.beans.DatabaseBlobBean
clear, getInputStream, isLoadedMethods inherited from class org.deltava.beans.DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateID
-
Constructor Details
-
News
Create a new System News entry object, with the Date defaulting to the current date/time- Parameters:
sbj- This entry's titlebody- This entry's content- Throws:
NullPointerException- if sbj is null
-
-
Method Details
-
getDate
Return the date/entry this entry was created.- Returns:
- The date/time this System News entry was created
-
getSubject
Return this entry's Title.- Returns:
- The Title of this System News entry
- See Also:
-
getAuthorID
public int getAuthorID()Description copied from interface:AuthoredBeanReturns the Author of this bean.- Specified by:
getAuthorIDin interfaceAuthoredBean- Returns:
- the author's database ID
- See Also:
-
getImageType
Description copied from class:ImageBeanReturns the database image type.- Specified by:
getImageTypein classImageBean- Returns:
- an ImageType
-
getBannerWidth
public int getBannerWidth()Returns the width of the banner image.- Returns:
- the width as a percentage of its parent container
- See Also:
-
getBody
Return this entry's Content.- Returns:
- The Content of this System News entry
- See Also:
-
getIsHTML
public boolean getIsHTML()Returns if this entry is raw HTML.- Returns:
- TRUE if the entry is raw HTML, otherwise FALSE
- See Also:
-
setAuthorID
public void setAuthorID(int id) Description copied from interface:AuthoredBeanUpdates the author of this bean.- Specified by:
setAuthorIDin interfaceAuthoredBean- Parameters:
id- the author's database ID.- See Also:
-
setDate
Update the date of this entry.- Parameters:
d- The new date/time for this System News entry- See Also:
-
setSubject
Updates this subject of this entry.- Parameters:
subj- the new subject- Throws:
NullPointerException- if subj is null- See Also:
-
setBody
Updates this entry's body content.- Parameters:
body- the new content- See Also:
-
setBannerWidth
public void setBannerWidth(int w) Updates the width of the banner image.- Parameters:
w- the width as a percentage of the parent container- Throws:
IllegalStateException- if no banner image is present
-
setIsHTML
public void setIsHTML(boolean html) Updates if this entry is raw HTML.- Parameters:
html- TRUE if raw HTML text, otherwise FALSE- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classDatabaseBean
-