1 package org.sapia.regis.gui.command; 2 3 import java.net.URL ; 4 5 import org.dom4j.Document; 6 import org.sapia.gumby.RenderContext; 7 import org.sapia.gumby.jelly.JellyHelper; 8 9 public abstract class JellyCommand implements Command{ 10 11 12 public Object execute(RenderContext ctx) throws Exception { 13 String resource = getClass().getName().replace(".", "/") + ".jelly.xml"; 14 URL url = ctx.getSettings().resolveURL(resource); 15 Document doc = JellyHelper.renderDocument(ctx, url); 16 return doExecute(ctx, doc); 17 } 18 19 protected abstract Object doExecute(RenderContext ctx, Document doc) throws Exception ; 20 } 21 | Popular Tags |