Wiki Examples
The current wiki uses MediaWiki syntax. A planned improvement will allow for an HTML editor in which content is still stored as MediaWiki syntax.
Content is found through the Wiki Subject.
URLs are generated by the application, so the values stored in the database must be normal Strings.
For example:
Each project can have one wiki with a blank subject -- this is the home page wiki entry.
String subject="";
Wiki pages are accessed by each subject...
String subject="This is another wiki page";
The URL to find the wiki is generated as: This+is+another+wiki+page
Wiki pages are case-insensitive so keep that in mind.
Inserting a Wiki...
DataRecord record = new DataRecord(); record.setName("wiki"); record.setAction(DataRecord.INSERT); record.addField("projectId", projectId); record.addField("subject", "A subject for a wiki entry"); record.addField("content", "Content in MediaWiki format"); record.addField("enteredBy", USER_ID); record.addField("modifiedBy", USER_ID);
To retrieve a list of Wiki entries, or a specific entry, set various SELECT filters...
ArrayList<String> meta = new ArrayList<String>(); meta.add("id"); meta.add("projectId"); meta.add("wikiId"); meta.add("subject"); api.setTransactionMeta(meta); // Ask the API to send the just inserted project wiki back DataRecord record = new DataRecord(); record.setName("wikiList"); record.setAction(DataRecord.SELECT); record.addField("projectId", projectId); record.addField("wikiId", wikiId); record.addField("subject", subject); api.save(record);
Sign in to add your comment.