站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

ForumsPortlet - JBOSS Portal 2.4 API 英文版文档


org.jboss.portlet.forums
Class ForumsPortlet

java.lang.Object
  extended byorg.jboss.portlet.JBossPortlet
      extended byorg.jboss.portlet.forums.ForumsPortlet
All Implemented Interfaces:
ForumsConstants, Portlet

public class ForumsPortlet
extends JBossPortlet
implements ForumsConstants


Nested Class Summary
 
Nested classes inherited from class org.jboss.portlet.forums.ForumsConstants
ForumsConstants.ModeDecoder
 
Field Summary
static java.lang.String OP_SHOWADMINFORUMS
           
static java.lang.String OP_SHOWFORUM
           
static java.lang.String OP_SHOWMODERATEFORUM
           
static java.lang.String OP_SHOWMOVETOPIC
           
static java.lang.String OP_SHOWODELETETOPIC
           
static java.lang.String OP_SHOWSPLITTOPIC
           
static java.lang.String OP_SHOWTOPIC
           
static java.lang.String OP_SHOWUSERPROFILE
           
 
Fields inherited from interface org.jboss.portlet.forums.ForumsConstants
ATTACHMENT_TOKENS_MANAGER, AUTH_PRESETS_NAMES, AUTH_TYPE_TO_MESSAGE, BLOCK_TOPICS_MODE_HOT_TOPICS, BLOCK_TOPICS_MODE_HOTTEST_TOPICS, BLOCK_TOPICS_MODE_LATEST_POSTS, BLOCK_TOPICS_MODE_MOST_VIEWED, CRITICAL_ERROR, CRITICAL_MESSAGE, DEFAULT_DATE_PATTERN, DISK_PERSISTED_ATTACHEMENTS, FILE_SESSION_INDEX, FORUM_AUTH_FORM_FIELD_LABELS, FORUM_AUTH_FORM_FIELD_NAMES, FORUM_AUTH_LEVEL_LABELS, FORUM_LOCKED, FORUM_UNLOCKED, FORUMSMODULE_JNDINAME, GENERAL_ERROR, GENERAL_MESSAGE, MMODE_DELETE, MMODE_IP, MMODE_LOCK, MMODE_MOVE, MMODE_NO_MODE, MMODE_SPLIT, MMODE_UNLOCK, PMASK_DELETE, PMASK_EDIT_POST, PMASK_NEW_TOPIC, PMASK_POLL_DELETE, PMASK_QUOTE, PMASK_REPLY, PMASK_SMILIES, PMASK_TOPIC_REVIEW, PMASK_VOTE, PMASKS, PMODE_DELETE, PMODE_EDIT_POST, PMODE_NEW_TOPIC, PMODE_NO_MODE, PMODE_POLL_DELETE, PMODE_QUOTE, PMODE_REPLY, PMODE_REPOST, PMODE_SMILIES, PMODE_TOPIC_REVIEW, PMODE_VOTE, POST_ANNOUNCE, POST_CAT_URL, POST_FORUM_URL, POST_GLOBAL_ANNONCE, POST_NORMAL, POST_POST_URL, POST_ROLES_URL, POST_STICKY, POST_TOPIC_URL, POST_USERS_URL, POSTING_POSTBACK_FLAG, PREVIOUS_DAYS, PREVIOUS_DAYS_TEXT_POSTS, PREVIOUS_DAYS_TEXT_TOPICS, SORT_BY_TYPES, THEMENAME, TOPIC_LOCKED, TOPIC_MOVED, TOPIC_TYPE_TO_AUTH_TYPE, TOPIC_UNLOCKED, TOPIC_WATCH_NOTIFIED, TOPIC_WATCH_UN_NOTIFIED, TPL_MAIL_FORUM_NOTIFY, TPL_MAIL_TOPIC_NOTIFY, TPL_THEME_ADD_ATTACHMENT_BODY, TPL_THEME_ADMIN_ATTACH_MANAGE_BODY, TPL_THEME_ADMIN_AUTH_FORUM_BODY, TPL_THEME_ADMIN_AUTH_SELECT_BODY, TPL_THEME_ADMIN_CATEGORY_EDIT_BODY, TPL_THEME_ADMIN_FORUM_ADMIN_BODY, TPL_THEME_ADMIN_FORUM_DELETE_BODY, TPL_THEME_ADMIN_FORUM_EDIT_BODY, TPL_THEME_BLOCK_TOPICS, TPL_THEME_CODE_B_CLOSE, TPL_THEME_CODE_B_OPEN, TPL_THEME_CODE_CODE_CLOSE, TPL_THEME_CODE_CODE_OPEN, TPL_THEME_CODE_COLOR_CLOSE, TPL_THEME_CODE_COLOR_OPEN, TPL_THEME_CODE_EMAIL, TPL_THEME_CODE_I_CLOSE, TPL_THEME_CODE_I_OPEN, TPL_THEME_CODE_IMG, TPL_THEME_CODE_LISTITEM, TPL_THEME_CODE_OLIST_CLOSE, TPL_THEME_CODE_OLIST_OPEN, TPL_THEME_CODE_QUOTE_CLOSE, TPL_THEME_CODE_QUOTE_OPEN, TPL_THEME_CODE_QUOTE_USERNAME_OPEN, TPL_THEME_CODE_SIZE_CLOSE, TPL_THEME_CODE_SIZE_OPEN, TPL_THEME_CODE_U_CLOSE, TPL_THEME_CODE_U_OPEN, TPL_THEME_CODE_ULIST_CLOSE, TPL_THEME_CODE_ULIST_OPEN, TPL_THEME_CODE_URL, TPL_THEME_CONFIRM_BODY, TPL_THEME_ERROR_BODY, TPL_THEME_INDEX_BODY, TPL_THEME_JUMP_BOX, TPL_THEME_MESSAGE_BODY, TPL_THEME_MODCP_BODY, TPL_THEME_MODCP_MOVE, TPL_THEME_POSTED_ATTACHMENTS_BODY, TPL_THEME_POSTING_ATTACH_BODY, TPL_THEME_POSTING_BODY, TPL_THEME_POSTING_POLL_BODY, TPL_THEME_POSTING_PREVIEW, TPL_THEME_POSTING_TOPIC_REVIEW, TPL_THEME_SEARCH_BODY, TPL_THEME_SEARCH_RESULTS_POSTS, TPL_THEME_SEARCH_RESULTS_TOPICS, TPL_THEME_SMALL_HEADER, TPL_THEME_TOPIC_NOTIFY, TPL_THEME_VIEWFORUM_BODY, TPL_THEME_VIEWTOPIC_ATTACH_BODY, TPL_THEME_VIEWTOPIC_BODY, TPL_THEME_VIEWTOPIC_POLL_BALLOT, TPL_THEME_VIEWTOPIC_POLL_RESULT, TPL_THEME_WATCHED_FORUMS_BODY, TPL_THEME_WATCHED_TOPICS_BODY, USER_SIGNATURE_ADD_PROPERTY, USER_SIGNATURE_PROPERTY, WATCH_MODE_EMBEDED, WATCH_MODE_LINKED
 
Constructor Summary
ForumsPortlet()
           
 
Method Summary
 void addErrorMessage(JBossActionResponse resp, java.lang.String key, java.lang.String error)
          DOCUMENT_ME
 void addSuccessMessage(JBossActionResponse resp, java.lang.String key, java.lang.String success)
          DOCUMENT_ME
 void admin_forums(JBossActionRequest req, JBossActionResponse resp)
          admin_forums operation
protected  void doEdit(JBossRenderRequest req, JBossRenderResponse resp)
          doEdit Portlet method
protected  void doView(JBossRenderRequest req, JBossRenderResponse resp)
          doView Portlet method
 Result executeForumCommand(JBossActionRequest request, JBossActionResponse response, ForumCommand cmd)
          DOCUMENT_ME
 java.lang.String formatMessage(PortletRequest req, java.lang.String text, boolean allowBBCode, boolean allowHTML)
          DOCUMENT_ME
 java.lang.String formatSignature(PortletRequest req, java.lang.String text, boolean allowBBCode, boolean allowHTML)
          DOCUMENT_ME
 java.lang.String formatTitle(PortletRequest req, java.lang.String text)
          DOCUMENT_ME
 java.lang.String formatUserName(User user)
           
 void forum_watches(JBossActionRequest req, JBossActionResponse resp)
          DOCUMENT_ME
 AttachmentTokenManager getAttachmentManager(PortletRequest req)
           
 java.lang.String getDefaultOperation()
          Return the string main, it can be overriden to return another value by subclasses.
 java.text.SimpleDateFormat getSDF(PortletRequest req)
          Get a SimpleDateFormat object from the session.
 void init()
          Initialization method of the portlet
 void moderate_forum(JBossActionRequest request, JBossActionResponse response)
          Method do action processing for Moderator functions from moderator panel in forum view and moderator bar in topic view.
 void navigation(JBossActionRequest request, JBossActionResponse response)
           
 void posting(JBossActionRequest request, JBossActionResponse response)
          posting operation
 void preferences(JBossActionRequest request, JBossActionResponse response)
           
 void topic_watches(JBossActionRequest req, JBossActionResponse resp)
          DOCUMENT_ME
 
Methods inherited from class org.jboss.portlet.JBossPortlet
destroy, doDispatch, doHelp, getInitParameter, getInitParameterNames, getOperationName, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, init, processAction, processAction, processDispatch, processEdit, processHelp, processView, render, render
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OP_SHOWFORUM

public static final java.lang.String OP_SHOWFORUM
See Also:
Constant Field Values

OP_SHOWTOPIC

public static final java.lang.String OP_SHOWTOPIC
See Also:
Constant Field Values

OP_SHOWADMINFORUMS

public static final java.lang.String OP_SHOWADMINFORUMS
See Also:
Constant Field Values

OP_SHOWMODERATEFORUM

public static final java.lang.String OP_SHOWMODERATEFORUM
See Also:
Constant Field Values

OP_SHOWMOVETOPIC

public static final java.lang.String OP_SHOWMOVETOPIC
See Also:
Constant Field Values

OP_SHOWODELETETOPIC

public static final java.lang.String OP_SHOWODELETETOPIC
See Also:
Constant Field Values

OP_SHOWSPLITTOPIC

public static final java.lang.String OP_SHOWSPLITTOPIC
See Also:
Constant Field Values

OP_SHOWUSERPROFILE

public static final java.lang.String OP_SHOWUSERPROFILE
See Also:
Constant Field Values
Constructor Detail

ForumsPortlet

public ForumsPortlet()
Method Detail

init

public void init()
          throws PortletException
Initialization method of the portlet

Overrides:
init in class JBossPortlet
Throws:
PortletException - DOCUMENT_ME

getDefaultOperation

public java.lang.String getDefaultOperation()
Description copied from class: JBossPortlet
Return the string main, it can be overriden to return another value by subclasses.

Overrides:
getDefaultOperation in class JBossPortlet

doEdit

protected void doEdit(JBossRenderRequest req,
                      JBossRenderResponse resp)
               throws PortletException,
                      java.io.IOException
doEdit Portlet method

Overrides:
doEdit in class JBossPortlet
Parameters:
req - Portlet render request
resp - Portlet response request
Throws:
PortletException - For any unexpected exception
java.io.IOException - If cannot write HTML chunk

doView

protected void doView(JBossRenderRequest req,
                      JBossRenderResponse resp)
               throws PortletException,
                      java.io.IOException
doView Portlet method

Overrides:
doView in class JBossPortlet
Parameters:
req - Portlet render request
resp - Portlet response request
Throws:
PortletException - For any unexpected exception
java.io.IOException - If cannot write HTML chunk

navigation

public void navigation(JBossActionRequest request,
                       JBossActionResponse response)
                throws CommandException
Throws:
CommandException

moderate_forum

public void moderate_forum(JBossActionRequest request,
                           JBossActionResponse response)
                    throws CommandException
Method do action processing for Moderator functions from moderator panel in forum view and moderator bar in topic view.

This method MUST get both proper "f" (forum id) and "t" (topic id) params.

Parameters:
request -
response -
Throws:
CommandException

preferences

public void preferences(JBossActionRequest request,
                        JBossActionResponse response)
                 throws CommandException
Throws:
CommandException

posting

public void posting(JBossActionRequest request,
                    JBossActionResponse response)
             throws CommandException
posting operation

Parameters:
request - JBoss action request
response - JBoss action response
Throws:
CommandException
CommandException - DOCUMENT_ME

admin_forums

public void admin_forums(JBossActionRequest req,
                         JBossActionResponse resp)
admin_forums operation

Parameters:
req - JBoss Action Request
resp - JBoss Action Response

forum_watches

public void forum_watches(JBossActionRequest req,
                          JBossActionResponse resp)
DOCUMENT_ME

Parameters:
req - DOCUMENT_ME
resp - DOCUMENT_ME

topic_watches

public void topic_watches(JBossActionRequest req,
                          JBossActionResponse resp)
DOCUMENT_ME

Parameters:
req - DOCUMENT_ME
resp - DOCUMENT_ME

formatTitle

public java.lang.String formatTitle(PortletRequest req,
                                    java.lang.String text)
DOCUMENT_ME

Parameters:
text - DOCUMENT_ME
Returns:
DOCUMENT_ME

formatMessage

public java.lang.String formatMessage(PortletRequest req,
                                      java.lang.String text,
                                      boolean allowBBCode,
                                      boolean allowHTML)
DOCUMENT_ME

Parameters:
text - DOCUMENT_ME
allowBBCode - DOCUMENT_ME
allowHTML - DOCUMENT_ME
Returns:
DOCUMENT_ME

formatSignature

public java.lang.String formatSignature(PortletRequest req,
                                        java.lang.String text,
                                        boolean allowBBCode,
                                        boolean allowHTML)
DOCUMENT_ME

Parameters:
text - DOCUMENT_ME
allowBBCode - DOCUMENT_ME
allowHTML - DOCUMENT_ME
Returns:
DOCUMENT_ME

formatUserName

public java.lang.String formatUserName(User user)

executeForumCommand

public Result executeForumCommand(JBossActionRequest request,
                                  JBossActionResponse response,
                                  ForumCommand cmd)
                           throws CommandException
DOCUMENT_ME

Parameters:
cmd - DOCUMENT_ME
Returns:
DOCUMENT_ME
Throws:
CommandException - DOCUMENT_ME

addErrorMessage

public void addErrorMessage(JBossActionResponse resp,
                            java.lang.String key,
                            java.lang.String error)
DOCUMENT_ME

Parameters:
resp - DOCUMENT_ME
key - DOCUMENT_ME
error - DOCUMENT_ME

addSuccessMessage

public void addSuccessMessage(JBossActionResponse resp,
                              java.lang.String key,
                              java.lang.String success)
DOCUMENT_ME

Parameters:
resp - DOCUMENT_ME
key - DOCUMENT_ME
success - DOCUMENT_ME

getSDF

public java.text.SimpleDateFormat getSDF(PortletRequest req)
Get a SimpleDateFormat object from the session. The object is stored in the session because it is expensive to create and we want to reuse it as much as we can. Also it is configured with the date format taken from the preference of the user if it exists.

Parameters:
req - the request that maybe contains the format object
Returns:
the format object

getAttachmentManager

public AttachmentTokenManager getAttachmentManager(PortletRequest req)