1 25 26 package org.snipsnap.render.macro; 27 28 import org.radeox.macro.Preserved; 29 import org.radeox.macro.parameter.MacroParameter; 30 import org.snipsnap.render.macro.parameter.SnipMacroParameter; 31 32 import java.io.IOException ; 33 import java.io.Writer ; 34 35 41 42 public abstract class SnipPreserved extends Preserved { 43 public abstract void execute(Writer writer, SnipMacroParameter params) throws IllegalArgumentException , IOException ; 44 45 public void execute(Writer writer, MacroParameter params) throws IllegalArgumentException , IOException { 46 if (params instanceof SnipMacroParameter) { 47 execute(writer, (SnipMacroParameter) params); 48 return; 49 } else { 50 throw new IllegalArgumentException ("Macro must be called in a SnipSnap enviroment."); 51 } 52 } 53 54 } 55 | Popular Tags |