if(parameter == null){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage", this.getClass().getName()));
}
WikiPage wikiPage = (WikiPage)parameter;
// check for mandatory fields
String name = wikiPage.getName();
if(name == null || name.trim().equals("")){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage.name", this.getClass().getName()));
}
String content = wikiPage.getContent();
if(content == null || content.trim().equals("")){
throw new TracException(MessageUtils.getMessage("core.parameter.not.found", "wikiPage.content", this.getClass().getName()));
}
MultiParameter multiParameter = new MultiParameter();
multiParameter.addParameter(name);
multiParameter.addParameter(content);
Hashtable attributes = new Hashtable();
String comment = wikiPage.getComment();
if(comment != null && !comment.trim().equals("")){
attributes.put(WikiKeys.COMMENT, comment);
}
multiParameter.addParameter(attributes);