| |
|
| java.lang.Object vqwiki.PseudoTopicHandler
PseudoTopicHandler | public class PseudoTopicHandler (Code) | | Class for controlling "pseudotopics". A pseudotopic is a topic name that maps to a redirect URL rather
than a real Wiki topic. Examples are RecentChanges and SetUsername. The mappings of topic names
to redirect URLs are persisted in WEB-INF/classes/pseudotopics.properties
Pseudotopics can also have permanent parameters associated with them by making appropriate entries in
pseudotopics.properties. E.g. the entries for ToDoWikiTopics looks like this:
ToDoWikiTopics=/jsp/allTopics.jsp
ToDoWikiTopics.param.0=todo=true
this means that when ToDoWikiTopics is redirected to the allTopics.jsp a parameter named "todo" with
the value "true" is also passed. In this way more than one pseudotopic can be mapped to a single
redirect URL.
Subject to LGPL
|
addMapping | public void addMapping(String pseudoTopicName, String redirectUrl)(Code) | | Add a mapping and persist it to the properties file. Used by the plugin manager for actions that
need a pseudotopic.
Parameters: pseudoTopicName - topic name Parameters: redirectUrl - url to redirect to |
getRedirectURL | public String getRedirectURL(String pseudotopicName)(Code) | | Return a redirect URL for the given topic
Parameters: pseudotopicName - topic redirect URL or null if no mapping exists |
isPseudoTopic | public boolean isPseudoTopic(String pseudotopicName)(Code) | | Return true if there is a mapping for the given topic
Parameters: pseudotopicName - topic true if mapping exists |
setAttributes | public void setAttributes(String pseudotopicName, HttpServletRequest request)(Code) | | Add parameters defined in the mapping to the servlet request
Parameters: pseudotopicName - topic name Parameters: request - incoming request |
|
|
|