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 TypeMethodDescriptionint
int
Returns the Author of this bean.int
Returns 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.boolean
Returns if this entry is raw HTML.Return this entry's Title.void
setAuthorID
(int id) Updates the author of this bean.void
setBannerWidth
(int w) Updates the width of the banner image.void
Updates this entry's body content.void
Update the date of this entry.void
setIsHTML
(boolean html) Updates if this entry is raw HTML.void
setSubject
(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, setWidth
Methods inherited from class org.deltava.beans.DatabaseBlobBean
clear, getInputStream, isLoaded
Methods 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:AuthoredBean
Returns the Author of this bean.- Specified by:
getAuthorID
in interfaceAuthoredBean
- Returns:
- the author's database ID
- See Also:
-
getImageType
Description copied from class:ImageBean
Returns the database image type.- Specified by:
getImageType
in 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:AuthoredBean
Updates the author of this bean.- Specified by:
setAuthorID
in 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:
compareTo
in interfaceComparable<Object>
- Overrides:
compareTo
in classDatabaseBean
-