1 5 package xdoclet.modules.webwork; 6 7 import xdoclet.XmlSubTask; 8 import xdoclet.XDocletException; 9 import xdoclet.util.Translator; 10 11 21 public class WebWorkActionsXmlSubTask extends XmlSubTask 22 { 23 private static final String DD_FILE_NAME = "resources/actions.dtd"; 24 25 private static final String DEFAULT_TEMPLATE_FILE = "resources/webwork_actions_xml.xdt"; 26 27 private static final String GENERATED_FILE_NAME = "actions.xml"; 28 29 32 public WebWorkActionsXmlSubTask() 33 { 34 setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE)); 35 setDestinationFile(GENERATED_FILE_NAME); 36 addOfType("webwork.action.Action"); 37 } 38 39 44 public void execute() throws XDocletException 45 { 46 setDtdURL(getClass().getResource(DD_FILE_NAME)); 48 49 startProcess(); 50 } 51 52 57 protected void engineStarted() throws XDocletException 58 { 59 System.out.println(Translator.getString(XDocletModulesWebWorkMessages.class, XDocletModulesWebWorkMessages.GENERATING_ACTIONS_XML, new String []{getDestinationFile()})); 60 } 61 } 62 | Popular Tags |