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

ForumsTools - JBOSS Portal 2.4 API 英文版文档


org.jboss.portlet.forums.helper
Class ForumsTools

java.lang.Object
  extended byorg.jboss.portlet.forums.helper.ForumsTools

public class ForumsTools
extends java.lang.Object


Constructor Summary
ForumsTools()
           
 
Method Summary
static void authCan(java.lang.StringBuffer authCan, JBossRenderRequest req, java.lang.String[] testArray, java.util.ResourceBundle bundle)
           
static void batchUpdate(java.sql.Connection conn, java.lang.String updateQuery, java.lang.String selectQuery, int size)
          Performs a generic batch update.
static java.lang.String[][] collectFields(java.lang.Class clazz, java.lang.String prefix)
          DOCUMENT_ME
static java.lang.String computeCacheKey(boolean format_1_00, java.lang.String forumId)
          DOCUMENT_ME
static java.lang.String createImageLink(java.lang.String url, java.lang.String image, java.lang.String title)
          DOCUMENT_ME
static java.lang.String createImageLink(java.lang.String url, java.lang.String image, java.lang.String title, java.lang.String alt)
          DOCUMENT_ME
static java.lang.String createImageLink(java.lang.String url, java.lang.String target, java.lang.String image, java.lang.String title, java.lang.String alt)
          DOCUMENT_ME
static java.lang.String createLink(java.lang.String url, java.lang.String text)
          DOCUMENT_ME
static java.lang.String createLink(java.lang.String url, java.lang.String target, java.lang.String text)
          DOCUMENT_ME
static org.apache.lucene.search.Query createQuery(java.lang.String text, java.lang.String field, boolean isOr)
          DOCUMENT_ME
static boolean hasPermission(PortletRequest req, java.lang.String perm)
           
static boolean hasPermission(PortletRequest req, java.lang.String[] test, java.lang.String permission)
           
static java.lang.Object head(java.util.Collection c)
          DOCUMENT_ME
static boolean isNullOrBlank(java.lang.String s)
          DOCUMENT_ME
static java.lang.String listCategories(java.util.List categories, int selectedId)
          DOCUMENT_ME
static java.lang.String listForums(java.util.List forums, int selectedId)
          DOCUMENT_ME
static java.lang.String listForumsCategories(ForumsModule module)
          DOCUMENT_ME
static java.lang.String listTopics(java.util.List forums)
          returns html containing forums
static java.lang.String pageNumber(int start, int size, int per)
          DOCUMENT_ME
static void radioButton(java.lang.StringBuffer buffer, java.lang.String name, java.lang.String value, boolean selected)
          DOCUMENT_ME
static java.lang.String selectDays(java.lang.String name, int days)
          DOCUMENT_ME
static java.lang.String selectEJBs(javax.ejb.EJBLocalHome home, java.lang.reflect.Method getter, java.lang.Object key, boolean all)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForumsTools

public ForumsTools()
Method Detail

authCan

public static void authCan(java.lang.StringBuffer authCan,
                           JBossRenderRequest req,
                           java.lang.String[] testArray,
                           java.util.ResourceBundle bundle)

radioButton

public static void radioButton(java.lang.StringBuffer buffer,
                               java.lang.String name,
                               java.lang.String value,
                               boolean selected)
DOCUMENT_ME

Parameters:
buffer - DOCUMENT_ME
name - DOCUMENT_ME
value - DOCUMENT_ME
selected - DOCUMENT_ME

createImageLink

public static java.lang.String createImageLink(java.lang.String url,
                                               java.lang.String target,
                                               java.lang.String image,
                                               java.lang.String title,
                                               java.lang.String alt)
DOCUMENT_ME

Parameters:
url - DOCUMENT_ME
target - DOCUMENT_ME
image - DOCUMENT_ME
title - DOCUMENT_ME
alt - DOCUMENT_ME
Returns:
DOCUMENT_ME

createImageLink

public static java.lang.String createImageLink(java.lang.String url,
                                               java.lang.String image,
                                               java.lang.String title,
                                               java.lang.String alt)
DOCUMENT_ME

Parameters:
url - DOCUMENT_ME
image - DOCUMENT_ME
title - DOCUMENT_ME
alt - DOCUMENT_ME
Returns:
DOCUMENT_ME

createImageLink

public static java.lang.String createImageLink(java.lang.String url,
                                               java.lang.String image,
                                               java.lang.String title)
DOCUMENT_ME

Parameters:
url - DOCUMENT_ME
image - DOCUMENT_ME
title - DOCUMENT_ME
Returns:
DOCUMENT_ME

createLink

public static java.lang.String createLink(java.lang.String url,
                                          java.lang.String text)
DOCUMENT_ME

Parameters:
url - DOCUMENT_ME
text - DOCUMENT_ME
Returns:
DOCUMENT_ME

createLink

public static java.lang.String createLink(java.lang.String url,
                                          java.lang.String target,
                                          java.lang.String text)
DOCUMENT_ME

Parameters:
url - DOCUMENT_ME
target - DOCUMENT_ME
text - DOCUMENT_ME
Returns:
DOCUMENT_ME

createQuery

public static org.apache.lucene.search.Query createQuery(java.lang.String text,
                                                         java.lang.String field,
                                                         boolean isOr)
DOCUMENT_ME

Parameters:
text - DOCUMENT_ME
field - DOCUMENT_ME
isOr - DOCUMENT_ME
Returns:
DOCUMENT_ME

listTopics

public static java.lang.String listTopics(java.util.List forums)
returns html containing forums

Parameters:
forums - DOCUMENT_ME
Returns:
DOCUMENT_ME

listForums

public static java.lang.String listForums(java.util.List forums,
                                          int selectedId)
DOCUMENT_ME

Parameters:
forums - DOCUMENT_ME
selectedId - DOCUMENT_ME
Returns:
DOCUMENT_ME

listCategories

public static java.lang.String listCategories(java.util.List categories,
                                              int selectedId)
DOCUMENT_ME

Parameters:
categories - DOCUMENT_ME
selectedId - DOCUMENT_ME
Returns:
DOCUMENT_ME

listForumsCategories

public static java.lang.String listForumsCategories(ForumsModule module)
DOCUMENT_ME

Returns:
DOCUMENT_ME

selectDays

public static java.lang.String selectDays(java.lang.String name,
                                          int days)
DOCUMENT_ME

Parameters:
name - DOCUMENT_ME
days - DOCUMENT_ME
Returns:
DOCUMENT_ME

batchUpdate

public static void batchUpdate(java.sql.Connection conn,
                               java.lang.String updateQuery,
                               java.lang.String selectQuery,
                               int size)
                        throws java.sql.SQLException
Performs a generic batch update.

Throws:
java.sql.SQLException

pageNumber

public static java.lang.String pageNumber(int start,
                                          int size,
                                          int per)
DOCUMENT_ME

Parameters:
start - DOCUMENT_ME
size - DOCUMENT_ME
per - DOCUMENT_ME
Returns:
DOCUMENT_ME

selectEJBs

public static java.lang.String selectEJBs(javax.ejb.EJBLocalHome home,
                                          java.lang.reflect.Method getter,
                                          java.lang.Object key,
                                          boolean all)
Parameters:
home - where the EJBs are taken
getter - how to get some info about the EJB
key - the key used to set the skip or select the item in the list according the all parameter
all - force all the items to be displayed
Returns:

collectFields

public static java.lang.String[][] collectFields(java.lang.Class clazz,
                                                 java.lang.String prefix)
DOCUMENT_ME

Parameters:
clazz - DOCUMENT_ME
prefix - DOCUMENT_ME
Returns:
DOCUMENT_ME

head

public static java.lang.Object head(java.util.Collection c)
DOCUMENT_ME

Parameters:
c - DOCUMENT_ME
Returns:
DOCUMENT_ME

computeCacheKey

public static final java.lang.String computeCacheKey(boolean format_1_00,
                                                     java.lang.String forumId)
DOCUMENT_ME

Parameters:
format_1_00 - DOCUMENT_ME
forumId - DOCUMENT_ME
Returns:
DOCUMENT_ME

isNullOrBlank

public static boolean isNullOrBlank(java.lang.String s)
DOCUMENT_ME

Parameters:
s - DOCUMENT_ME
Returns:
DOCUMENT_ME

hasPermission

public static boolean hasPermission(PortletRequest req,
                                    java.lang.String[] test,
                                    java.lang.String permission)

hasPermission

public static boolean hasPermission(PortletRequest req,
                                    java.lang.String perm)