This page (revision-12) was last changed on 23-Apr-2022 17:05 by Harry Metske

This page was created on 23-Apr-2022 17:05 by Harry Metske

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
12 23-Apr-2022 17:05 4 KB Harry Metske to previous
11 23-Apr-2022 17:05 4 KB Harry Metske to previous | to last
10 23-Apr-2022 17:05 4 KB Harry Metske to previous | to last
9 23-Apr-2022 17:05 4 KB Harry Metske to previous | to last
8 23-Apr-2022 17:05 3 KB Harry Metske to previous | to last
7 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
6 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
5 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
4 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
3 23-Apr-2022 17:05 1 KB Harry Metske to previous | to last
2 23-Apr-2022 17:05 694 bytes Harry Metske to previous | to last incoming and outgoing wiki links added
1 23-Apr-2022 17:05 630 bytes Harry Metske to last

Page References

Incoming links Outgoing links
WikiPageStats...nobody

Version management

Difference between version and

At line 1 changed one line
!!! WikePageStats
!!! WikiPageStats
At line 3 added 4 lines
[{TableOfContents}]
!! Introduction
At line 20 added 2 lines
* Number of incoming wikilinks
* Number of outgoing wikilinks
At line 17 changed one line
The information should be presentable in a tabular form where you can sort it and filter it (like the %%Sortable and %%table-filter).
The information should be presentable in a tabular form where you can sort it and filter it (like the {{{%%Sortable and %%table-filter}}}).
At line 19 changed 3 lines
The functionality can be built in different forms:
* as a JSPWiki plugin
* as an MBean
The following interfaces/classes are planned :
* a class that represents one Wiki Page with getters/setters for all the above fields
* an interface that describes the actions that can be performed on the statistics of a page
* a basic class that implements this interface based on the current JSPWiki provider
* a factory class that creates and gathers all the WikiPageStat objects. This class should provide public methods that return a List of (populated) WikiPageStat objects. (optionally with a pattern as filter to return a subset of the pagestats)
* a class that provides the information to the end user :
** a JSPWiki plugin to provide the info in HTML format
** an MBean ?
** a class to provide the stats in xml format for automated processing afterwards
!! Security
Security is important because sensitive meta data of pages are provided, for now the access to this function should be limited to administrators.
\\Another reason to limit access is the fact that gathering all this info might generate quite some load on the server.
!! Interfaces/classes
! com.ecyd.jspwiki.stats.WikiPageStat
This class represents all information of a Wiki page. For now we only deal with regular WikiPages, not attachments. Although attachment information is part of some Wiki pages.
! com.ecyrd.jspwiki.stats.WikiPageStatUtilInterface
This interface describes all the actions that can be done with (collections of) WikiPageStat objects.
\\To mention a few :
| public List<WikiPageStat> getAllWikiPageStats();|returns a List of WikiPageStat objects, if necessary the new List is built, or a cached version is returned
| public void sortWikiPageStats(String field); | sorts the internally kept (cached) list of pages by the supplied field
| public void addWikiPageStat(WikiPageStat myNewWikiPageStat); | add a WikiPage to the collection
| public void refreshStats(); | rebuilds a complete new List of WikiPageStat objects, and of course updates te TimeStamp
| public Date getTimeStamp(); |returns a Date object representing the date/time the List of WikiPageStat objects has been created (how actual is the data)
| public int getTotalNumberOfPages()|returns the total number of pages found during the last refresh or update of the stats
| public int getAveragePageSize()|returns the average size of all pages (in bytes) found during the last refresh of the stats
| public long getTotalSize()|returns the sum of the size of all versions of all pages and their attachments, this should give you an estimate on the used disk space.
|''more to come''|-
! com.ecyrd.jspwiki.stats.WikiPageStatUtility
This class implements the above interface. It can cache the statistics in an internally kept List of WikiPageStat objects.
\\Note that the freshness of this data strongly depends on how frequently the wiki is updated.
It is (in the future) also possible that on every change in the wiki, the statistics are updated. Note that updating the statistics might be a heavy process if we decide to also update all the totals and averages the we cache internally.
The WikiPageStatUtility is once instantiated by the the first caller, passing it a ServletConfig.
A reference to the WikiPageStatUtility can be obtained also via the WikiEngine, and this is what the Plugin should do.
! com.ecyrd.jspwiki.stats.WikiPageStatPlugin
This is a regular JSPWiki Plugin that should use the WikiPageStatUtility to get all information and present it i a tabular form in your browser. Optional parameters can be used to limit the amount of rows or columns.