1 25 26 package net.killingar.actions.wiki; 27 28 import com.portalwizard.silo.DocumentVersionPK; 29 import com.portalwizard.silo.Version; 30 31 public class Diff extends WikiAction 32 { 33 String context, version, diff; 34 35 boolean confirmed = false; 36 37 public String getContext () { return context; } 38 public String getVersion () { return version; } 39 public String getDiff () { return diff; } 40 41 public void setContext (String in) { context = in; } 42 public void setVersion (String in) { version = in; } 43 44 protected String doExecute() throws Exception 45 { 46 DocumentVersionPK pk = new DocumentVersionPK(getContext(), getWiki(), version); 47 Version oldV = vm.get(pk); 48 Version newV = vm.get(getContext(), getWiki()); 49 50 diff = new net.killingar.WordDiff().compareStrings(oldV.getContent(), newV.getContent()).toString(); 51 52 return SUCCESS; 53 } 54 } 55 | Popular Tags |