de.tuberlin.cs.flp.jspwiki


Class CategoryManager

All known implemented Interfaces:
WikiEventListener


public class CategoryManager
Namespace: jspwiki


Handles Categories in the Wiki. A category is a page which contains other pages in the sense that
  • each page belonging to the category contains at least one link to the category-page
  • each page belonging to the category contains one of the member-phrases, as stored in the wiki page CategoriesMemberPhrases (or as configured via jspwiki.categories.memberPhrases.page)
  • the category-page includes the plugin de.tuberlin.cs.flp.jspwiki.plugin.Category (and usually nothing more, i.e. the category-page does not contain links to its members in wiki markup, but links are displayed by the plugin)
  • the category-page is linked from the central Categories page (or as configured via jspwiki.categories.page)
Authors:
Jens Gulden
See also:
de.tuberlin.cs.flp.jspwiki.plugin.Category
de.tuberlin.cs.flp.jspwiki.tags.CategoryIterator


Attribute Summary
public static String  CATEGORY_EDITINFO_SUFFIX
 
public static String  CATEGORY_INFO_SUFFIX
 
public static String  CATEGORY_INITIAL_SUFFIX
Image file suffices to identify an image by its filename. (Simple hard-coded solution. Should be configurable or taken from the Wiki's general configuration.)  
public static String  DEFAULT_CATEGORY_MEMBER_PHRASES_PAGE
 
public static String  DEFAULT_CATEGORY_PAGE
Default name of the central Categories page.  
public static long  NEW_MEMBER_TIMEOUT_SECONDS
 
public static String  PROPERTY_CATEGORY_MEMBER_PHRASES_PAGE
 
public static String  PROPERTY_CATEGORY_PAGE
Property holding the name of the central Categories page on which all CategoryXxx pages are registered to become known as categories.  
protected Map  existingCategoryMembersCacheByCategory

Represents ...

 
protected static java.util.Map  instancesByEngine

Represents ...

 
protected Map  membersToBeCreatedByCategory
 
protected Map  membersToBeCreatedTimestamp
 

Constructor Summary
protected   CategoryManager(WikiEngine engine)
 

Method Summary
public void  actionPerformed(WikiEvent e)
Implementation of WikiEventListener. This watches out for any change of a page and then invalidates the cached list of category members (as it might have changed through the page change). Using the cache is a simple optimization.  
public void  addCategoryMember(String category, String newPage)
 
public Collection   getAllCategories()
Returns all categories used in the wiki. Typically, this is a Collection of Strings like CategoryXxx, CategoryYyy, CategoryZzz etc.  
public Collection   getCategories(String page)
Returns all categories in which the page is a member.  
public Collection   getCategoryMemberPhrases()
 
public String   getCategoryMemberPhrasesPageName()
 
public java.util.Collection   getCategoryMembers(String category)
Convert category page name into the format as it is regarded as valid reference to mark a page as being member of the category.  
public String   getCategoryPageName()
Returns the name of the central Categories page on which all categories are registered as links to the individual CategoryXxx pages. (Note that the concept of categories is not applied recursively to declare categories on the Categories page. Thus, a CategoryXxx page needs not to link back to the main Categories page. Instead, there are links _from_ the Categories page _to_ the individual CategoryXxx pages.)  
public String   getDefaultCategoryMemberPhrase()
 
public java.util.Collection   getExistingCategoryMembers(String category)
 
protected java.util.Collection   getExistingCategoryMembersUncached(String category)

Does ...

 
public static CategoryManager   getInstance(WikiEngine engine)
Static method to get a CategoryManager. (As this is an extension to the original JSPWiki, we cannot query the CategoryManager from the engine.)  
public java.util.Collection   getNewCategoryMembers(String category)
 
public boolean  isCategory(String page)
 
protected java.util.Collection   membersToBeCreated(String category)

Does ...

 

Association Summary

Own Association End Summary

Opposite Association End Summary

Tagged Values
static false
documentation#author Jens Gulden
documentation#see de.tuberlin.cs.flp.jspwiki.tags.CategoryIterator

Attribute Detail

CATEGORY_EDITINFO_SUFFIX

public static final String CATEGORY_EDITINFO_SUFFIX

Multiplicity: 1..1
Ordering: unspecified



CATEGORY_INFO_SUFFIX

public static final String CATEGORY_INFO_SUFFIX

Multiplicity: 1..1
Ordering: unspecified



CATEGORY_INITIAL_SUFFIX

public static final String CATEGORY_INITIAL_SUFFIX

Multiplicity: 1..1
Ordering: unspecified


Image file suffices to identify an image by its filename. (Simple hard-coded solution. Should be configurable or taken from the Wiki's general configuration.)


DEFAULT_CATEGORY_MEMBER_PHRASES_PAGE

public static final String DEFAULT_CATEGORY_MEMBER_PHRASES_PAGE

Multiplicity: 1..1
Ordering: unspecified



DEFAULT_CATEGORY_PAGE

public static final String DEFAULT_CATEGORY_PAGE

Multiplicity: 1..1
Ordering: unspecified


Default name of the central Categories page.


NEW_MEMBER_TIMEOUT_SECONDS

public static final long NEW_MEMBER_TIMEOUT_SECONDS

Multiplicity: 1..1
Ordering: unspecified



PROPERTY_CATEGORY_MEMBER_PHRASES_PAGE

public static final String PROPERTY_CATEGORY_MEMBER_PHRASES_PAGE

Multiplicity: 1..1
Ordering: unspecified



PROPERTY_CATEGORY_PAGE

public static final String PROPERTY_CATEGORY_PAGE

Multiplicity: 1..1
Ordering: unspecified


Property holding the name of the central Categories page on which all CategoryXxx pages are registered to become known as categories.


existingCategoryMembersCacheByCategory

protected Map existingCategoryMembersCacheByCategory

Multiplicity: 1..1
Ordering: unspecified


Represents ...



instancesByEngine

protected static java.util.Map instancesByEngine

Multiplicity: 1..1
Ordering: unspecified


Represents ...



membersToBeCreatedByCategory

protected Map membersToBeCreatedByCategory

Multiplicity: 1..1
Ordering: unspecified



membersToBeCreatedTimestamp

protected Map membersToBeCreatedTimestamp

Multiplicity: 1..1
Ordering: unspecified

Constructor Detail

CategoryManager

protected de.tuberlin.cs.flp.jspwiki.CategoryManager CategoryManager(WikiEngine engine)

Has stereotypes: << create >>
Parameters:
engine -
Returns:
Method Detail

actionPerformed

public void actionPerformed(WikiEvent e)


Implementation of WikiEventListener. This watches out for any change of a page and then invalidates the cached list of category members (as it might have changed through the page change). Using the cache is a simple optimization.
Parameters:
e -


addCategoryMember

public void addCategoryMember(String category, String newPage)

Parameters:
category -
newPage -


getAllCategories

public Collection getAllCategories()


Returns all categories used in the wiki. Typically, this is a Collection of Strings like CategoryXxx, CategoryYyy, CategoryZzz etc.
Returns:


getCategories

public Collection getCategories(String page)


Returns all categories in which the page is a member.
Parameters:
page -
Returns:


getCategoryMemberPhrases

public Collection getCategoryMemberPhrases()

Returns:


getCategoryMemberPhrasesPageName

public String getCategoryMemberPhrasesPageName()

Returns:


getCategoryMembers

public java.util.Collection getCategoryMembers(String category)


Convert category page name into the format as it is regarded as valid reference to mark a page as being member of the category.
Parameters:
category -
Returns:


getCategoryPageName

public String getCategoryPageName()


Returns the name of the central Categories page on which all categories are registered as links to the individual CategoryXxx pages. (Note that the concept of categories is not applied recursively to declare categories on the Categories page. Thus, a CategoryXxx page needs not to link back to the main Categories page. Instead, there are links _from_ the Categories page _to_ the individual CategoryXxx pages.)
Returns:


getDefaultCategoryMemberPhrase

public String getDefaultCategoryMemberPhrase()

Returns:


getExistingCategoryMembers

public java.util.Collection getExistingCategoryMembers(String category)

Parameters:
category -
Returns:


getExistingCategoryMembersUncached

protected java.util.Collection getExistingCategoryMembersUncached(String category)


Does ...

Parameters:
category -
Returns:


getInstance

public static CategoryManager getInstance(WikiEngine engine)


Static method to get a CategoryManager. (As this is an extension to the original JSPWiki, we cannot query the CategoryManager from the engine.)
Parameters:
engine -
Returns:


getNewCategoryMembers

public java.util.Collection getNewCategoryMembers(String category)

Parameters:
category -
Returns:


isCategory

public boolean isCategory(String page)

Parameters:
page -
Returns:


membersToBeCreated

protected java.util.Collection membersToBeCreated(String category)


Does ...

Parameters:
category -
Returns:
Association Detail

Own Association End CategoryManager

public CategoryManager CategoryManager [1..1]



Opposite Association End engine

protected WikiEngine engine [1..1] navigable

Association Tagged Values
gentleware-initialValue


previous   TOC   next

Generated with Poseidon for UMLTM.
Poseidon is a registered trademark of Gentleware AG in the USA and other countries. Copyright 2003-2006 Gentleware AG, Ludwigstr. 12, 20357 Hamburg, Germany. All Rights Reserved.
UML is a trademark or registered trademark of Object Management Group, Inc. in the U.S. and other countries.