Random Page Naming Strategy
| Generate random unique page names by using UUIDs |
| Type | JAR |
| Category | Other |
| Developed by | |
| Active Installs | 0 |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
This extension allows to create pages with unique, random looking page names, so users do not have to care if there is a page with the same name in the current parent page or not.
Instead in the the "Create Page" dialog, the name will be shown as a standard serialization of an UUID:

(only if the user clicks the pencil icon to edit the location manually - otherwise they do not have to notice how the page names are formed unless they look at the URL in their browsers status bar.)
Installation
The extension is implemented as a page naming strategy, so after installation of the extension it can be enabled via the "Name Strategies" section in the "Editing" category of the wiki administration:

For Developers
- this extension uses the java-uuid-generator library
- if the choosen UUID generator is not suitable, one can change this programmatically, at least on java level code, like:Currently one must inject a com.fasterxml.uuid.NoArgGenerator. Generators taking an argument (i.e. com.fasterxml.uuid.StringArgGenerator are not supported yet.)
import org.xwiki.model.validation.EntityNameValidation; import org.xwiki.contrib.validation.uuidpages.UUIDEntityNameValidation; import com.fasterxml.uuid.Generators; [...] @Component public class SomeOtherComponent implements Initializable { [...] @Inject @Named("UUIDEntityNameValidation") EntityNameValidation nameValidator; [...] public void initialize() { UUIDEntityNameValidation uuidNameValidator = (UUIDEntityNameValidation)nameValidator; uuidNameValidator.setUuidGenerator( Generators. randomBasedGenerator() ); } [...] }
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Versions
Dependencies
Dependencies for this extension (org.xwiki.contrib:api-random-page-names 1.1):
- org.xwiki.commons:xwiki-commons-observation-api 13.10
- org.xwiki.platform:xwiki-platform-model-validation-api 13.10
- com.fasterxml.uuid:java-uuid-generator 4.0.1