KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > regis > gui > command > JellyCommand


1 package org.sapia.regis.gui.command;
2
3 import java.net.URL JavaDoc;
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 JavaDoc execute(RenderContext ctx) throws Exception JavaDoc {
13     String JavaDoc resource = getClass().getName().replace(".", "/") + ".jelly.xml";
14     URL JavaDoc url = ctx.getSettings().resolveURL(resource);
15     Document doc = JellyHelper.renderDocument(ctx, url);
16     return doExecute(ctx, doc);
17   }
18   
19   protected abstract Object JavaDoc doExecute(RenderContext ctx, Document doc) throws Exception JavaDoc;
20 }
21
Popular Tags