de.tuberlin.cs.flp.jspwiki.plugin
Class Category

java.lang.Object
  extended byde.tuberlin.cs.flp.jspwiki.plugin.Category
Direct Known Subclasses:
WikiArchive

public class Category
extends java.lang.Object

[{Category
[page=".."]
format="_list_|gallery"
sort="_alphabetic_|none"
headlines="_alphabetic_lnone|"
attachments="yes|_no_"
gallery-width=n (default: 4)
thumbnails="yes|_no_"
thumbnailWidth=n
thumbnailHeight=n
pagesize=n (maximum number of entries to be displayed per page, default: no limit) }]

Lists all pages that are associated with the current page as their Category. The output format can be configured in several ways according to the parameters. Special (unlike ReferringPagesPlugin): Only those pages are considered members of the category which contain a link where the category name is seperated from the prefix "Category" WITH A BLANK. This way it becomes possible to link to the category page without declaring the referring page a member of the category, by NOT using a blank between "Category" and the category name. Examples: using "[Category Glossary]" DOES mark a page as a member of the category, using [CategoryGlossary] simply is a link to the category page without declaring the page in which it appears as a member of the category. Note that "Category" is not necessarily word that marks a page a category page, simply the first uppercase part of the page's name is used.


Field Summary
static int DEFAULT_GALLERY_COLUMNS
           
static int DEFAULT_PAGE
           
static int DEFAULT_PAGESIZE
           
static java.lang.String DEFAULT_THUMBNAIL_SIZE
           
static int FORMAT_GALLERY
           
static int FORMAT_LIST
           
static int HEADLINES_ALPHABETIC
           
static int HEADLINES_NONE
           
static java.lang.String HTTP_PARAM_PAGE
           
static java.lang.String PARAM_ATTACHMENTS
           
static java.lang.String PARAM_FORMAT
           
static java.lang.String PARAM_GALLERY_COLUMNS
           
static java.lang.String PARAM_HEADLINES
           
static java.lang.String PARAM_PAGE
           
static java.lang.String PARAM_PAGESIZE
           
static java.lang.String PARAM_SORT
           
static java.lang.String PARAM_THUMBNAIL_SIZE
           
static java.lang.String PARAM_THUMBNAILS
           
static int SORT_ALPHABETIC
           
static int SORT_NONE
           
static java.lang.String VALUE_FORMAT_GALLERY
           
static java.lang.String VALUE_HEADLINES_ALPHABETIC
           
static java.lang.String VALUE_SORT_ALPHABETIC
           
 
Constructor Summary
Category()
           
 
Method Summary
static java.lang.String categoryPageLink(java.lang.String category)
           
protected  java.lang.String deriveFullTitle(java.lang.String name, WikiPage wikipage, WikiEngine engine)
           
 java.lang.String execute(WikiContext context, java.util.Map params)
          Executes the plugin.
protected static java.lang.String heading(java.lang.String s)
          Formats a string as HTML-heading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_PAGE

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

PARAM_FORMAT

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

VALUE_FORMAT_GALLERY

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

FORMAT_LIST

public static final int FORMAT_LIST
See Also:
Constant Field Values

FORMAT_GALLERY

public static final int FORMAT_GALLERY
See Also:
Constant Field Values

PARAM_SORT

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

SORT_NONE

public static final int SORT_NONE
See Also:
Constant Field Values

SORT_ALPHABETIC

public static final int SORT_ALPHABETIC
See Also:
Constant Field Values

VALUE_SORT_ALPHABETIC

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

PARAM_HEADLINES

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

HEADLINES_NONE

public static final int HEADLINES_NONE
See Also:
Constant Field Values

HEADLINES_ALPHABETIC

public static final int HEADLINES_ALPHABETIC
See Also:
Constant Field Values

VALUE_HEADLINES_ALPHABETIC

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

PARAM_ATTACHMENTS

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

PARAM_THUMBNAILS

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

PARAM_THUMBNAIL_SIZE

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

DEFAULT_THUMBNAIL_SIZE

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

PARAM_GALLERY_COLUMNS

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

DEFAULT_GALLERY_COLUMNS

public static final int DEFAULT_GALLERY_COLUMNS
See Also:
Constant Field Values

PARAM_PAGESIZE

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

DEFAULT_PAGESIZE

public static final int DEFAULT_PAGESIZE
See Also:
Constant Field Values

HTTP_PARAM_PAGE

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

DEFAULT_PAGE

public static final int DEFAULT_PAGE
See Also:
Constant Field Values
Constructor Detail

Category

public Category()
Method Detail

execute

public java.lang.String execute(WikiContext context,
                                java.util.Map params)
                         throws PluginException
Executes the plugin.

Parameters:
context - The WikiContext.
params - Parameters specified at plugin inclusion.
Returns:
HTML to be inserted into page
Throws:
PluginException - if an error occurs

deriveFullTitle

protected java.lang.String deriveFullTitle(java.lang.String name,
                                           WikiPage wikipage,
                                           WikiEngine engine)
Parameters:
name -
wikipage -
engine -
Returns:

categoryPageLink

public static java.lang.String categoryPageLink(java.lang.String category)
Parameters:
category -
Returns:

heading

protected static java.lang.String heading(java.lang.String s)
Formats a string as HTML-heading.

Parameters:
s - The string to be formatted.
Returns:
The formatted HTML string.