org.ceryle.wiki.handler
Class UniqueIdHandler
java.lang.Object
org.ceryle.wiki.handler.NewPageHandler
org.ceryle.wiki.handler.UniqueIdHandler
- All Implemented Interfaces:
- FormHandler, WikiPlugin
public class UniqueIdHandler
- extends NewPageHandler
A plugin that provides a unique identifier upon request.
So you need a unique ID generated for oh, lets just say asset tracking or whatever, you can of
course use a database and get this, but isn't a wiki like a database? (in some senses a better,
more flexible and approachable one too!). But how do you get a wiki to make a unique ID for you?
Well, you can use this plugin.
This plugin is a form handler that extends the NewPageHandler, we take our parameters and
generate the needed parameters to feed up to the NewPageHandler so it can make a page for us.
UniqueIdHandler Parameters:
uidprefix = "", optional
uidsuffix = "", optional
uidtype = [randalpha, randnumeric, randalphanumeric, autoincrement], optional, default is randalphanumeric
uidlength = 1-maxint, optional, default is 4
uidautoincrement = "" starting number/pattern, optional, defaults to "0[length-1]1" only used if idtype=autoincrement
Parameters to be sent to the NewPageHandler:
_body, if empty, add a boilerplate body
newPageName
newPageNamePrefix
autoIncrement overwrite = false
- Author:
- John Volkar (john.volkar at gmail.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PARAM_UID_PREFIX
public static final String PARAM_UID_PREFIX
- See Also:
- Constant Field Values
PARAM_UID_SUFFIX
public static final String PARAM_UID_SUFFIX
- See Also:
- Constant Field Values
PARAM_UID_TYPE
public static final String PARAM_UID_TYPE
- See Also:
- Constant Field Values
PARAM_UID_LENGTH
public static final String PARAM_UID_LENGTH
- See Also:
- Constant Field Values
PARAM_UID_AUTO_INCREMENT
public static final String PARAM_UID_AUTO_INCREMENT
- See Also:
- Constant Field Values
BOILERPLATE_BODY
public static final String BOILERPLATE_BODY
- See Also:
- Constant Field Values
UniqueIdHandler
public UniqueIdHandler()
execute
public String execute(WikiContext context,
Map paramMap)
throws PluginException
- Specified by:
execute in interface WikiPlugin- Overrides:
execute in class NewPageHandler
- Throws:
PluginException
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.