com.arsdigita.acs.bboard
Class MessagesDataSource
java.lang.Object
|
+--com.arsdigita.acs.Selection
|
+--com.arsdigita.acs.bboard.MessagesDataSource
- All Implemented Interfaces:
- DataSource
- Direct Known Subclasses:
- SingleMessageDataSource
- public class MessagesDataSource
- extends Selection
Extension of the Selection class specific to bboard messages.
Declares some properties explicitly, to take some code out of JSP
pages; these get methods may be called implicitly by introspection
from the ad:sub tag.
Method Summary |
String |
getCategory()
Gets the category, suitable for display (null == "Uncategorized")
if and only if it is different than the category for the previous
message (useful in ad:loop) |
String |
getInterestLevel()
Gets the interest level. |
String |
getMessage()
gets the message text for display in the browser. |
String |
getPrettyFilename()
gets the associated filename, with all non-standard chars
replaced with underscores. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessagesDataSource
public MessagesDataSource(SqlStatement sql,
Database db)
throws SQLException
- Create a new MessagesDataSource out of a SqlStatement.
MessagesDataSource
public MessagesDataSource(ResultSet rs)
throws SQLException
- Create a new MessagesDataSource out of a ResultSet.
getMessage
public String getMessage()
throws DataSourceException
- gets the message text for display in the browser.
if the message is plain text, escape the special HTML characters
and insert line breaks so it looks right to the user.
getPrettyFilename
public String getPrettyFilename()
throws DataSourceException
- gets the associated filename, with all non-standard chars
replaced with underscores.
getCategory
public String getCategory()
throws DataSourceException
- Gets the category, suitable for display (null == "Uncategorized")
if and only if it is different than the category for the previous
message (useful in ad:loop)
getInterestLevel
public final String getInterestLevel()
throws DataSourceException
- Gets the interest level. Returns the string "NULL" if no
interest level is supplied for this message.