This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

During the development of some plugins I've noticed that there should be some sort of a way to store persistent metadata with the wikipages, not only attachments. For example, the VotePlugin (2.1.52+) currently stores the votes it has received as attachments on the page, but really, the data should be stored in some other way.

There is already discussion on AttachmentMetaData, but this is really a bigger issue that concerns both WikiPages and WikiAttachments. It also ties in with some of the discussion on Ideas - SubPages, as the metadata could be embedded in subpages.

It must be possible to define arbitrary metadata so that plugins can save metadata as they please. However, certain constant names for JSPWiki internal use need to be defined, such as "author" and "lastModified" and "description".

Currently, we have the WikiPage.get/setAttribute() calls, but these unfortunately only handle non-persistent information, as there is no way to store this information on shutdown. I fear that the PageProvider interface needs to be amended with

    void setPageInfo( WikiPage page )
which would then save all of the PERSISTENT attributes. The WikiPage class needs to be amended with
    void setAttribute( String key, String value, int persistence )

where persistence is either TRANSIENT or PERSISTENT.

Unfortunately, breaking the PageProvider interface means that we don't want to do this now; we want to wait until 3.0.

Question: is it better to store Serializable Objects instead of Strings?

-- JanneJalkanen, 18-Jul-2003


Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
pmcs.txt 0.1 kB 1 14-Jan-2006 08:08
« This particular version was published on 18-Jul-2003 12:24 by JanneJalkanen.