com.arsdigita.acs.bboard
Class TopicsDataSource

java.lang.Object
  |
  +--com.arsdigita.acs.Selection
        |
        +--com.arsdigita.acs.bboard.TopicsDataSource
All Implemented Interfaces:
DataSource
Direct Known Subclasses:
SingleTopicDataSource

public class TopicsDataSource
extends Selection


Fields inherited from class com.arsdigita.acs.Selection
ctr, db, rs, rsmd
 
Constructor Summary
TopicsDataSource()
           
TopicsDataSource(ResultSet rs)
           
TopicsDataSource(SqlStatement sql, Database db)
           
 
Method Summary
 boolean adminAuthorize(UserInfo user, PageContext pc)
          Verifies that a user can administer messages for this topic.
 boolean authorizeUser(UserInfo user, PageContext pc)
          Verifies that a user can read messages for this topic.
 String getBackLink()
          Returns back-link URL for this topic id.
 String getModerationPolicy()
           
 
Methods inherited from class com.arsdigita.acs.Selection
contains, dumpBLOB, freeze, get, getBLOB, keys, next, rownum
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopicsDataSource

public TopicsDataSource(SqlStatement sql,
                        Database db)
                 throws SQLException

TopicsDataSource

public TopicsDataSource(ResultSet rs)
                 throws SQLException

TopicsDataSource

public TopicsDataSource()
Method Detail

getModerationPolicy

public String getModerationPolicy()
                           throws DataSourceException

authorizeUser

public boolean authorizeUser(UserInfo user,
                             PageContext pc)
                      throws Exception
Verifies that a user can read messages for this topic. Redirects to registration page if topic is public and user not logged in. Displays error page if private and user not part of group.
Returns:
true if user is authorized, false if not

adminAuthorize

public boolean adminAuthorize(UserInfo user,
                              PageContext pc)
Verifies that a user can administer messages for this topic. Redirects to registration page if topic is public and user not logged in. Displays error page if user is not an authorized administrator.
Returns:
true if user is authorized, false if not

getBackLink

public String getBackLink()
                   throws DataSourceException
Returns back-link URL for this topic id. For now, just q-and-a?topic_id=&topic=