1 package xdoclet.modules.ojb; 2 3 17 18 import org.apache.commons.logging.Log; 19 import xdoclet.XDocletException; 20 import xdoclet.XmlSubTask; 21 import xdoclet.util.LogUtil; 22 23 30 public class OjbSubTask extends XmlSubTask 31 { 32 private static String OJB_TEMPLATE_FILE = "resources/ojb_xml.xdt"; 33 private static String OJB_REPOSITORY_FILE_NAME = "repository_user.xml"; 34 35 38 public OjbSubTask() 39 { 40 setTemplateURL(getClass().getResource(OJB_TEMPLATE_FILE)); 41 setDestinationFile(OJB_REPOSITORY_FILE_NAME); 42 setSubTaskName("ojbrepository"); 43 } 44 45 48 private boolean _verbose; 49 50 55 public boolean getVerbose() 56 { 57 return _verbose; 58 } 59 60 65 public void setVerbose(boolean beVerbose) 66 { 67 _verbose = beVerbose; 68 } 69 70 75 public void validateOptions() throws XDocletException 76 { 77 } 78 79 84 public void execute() throws XDocletException 85 { 86 startProcess(); 87 } 88 89 public void startProcess() throws XDocletException 90 { 91 Log log = LogUtil.getLog(OjbSubTask.class, "startProcess"); 92 93 if (log.isDebugEnabled()) { 94 log.debug("destDir.toString()=" + getDestDir()); 95 log.debug("getTemplateURL()=" + getTemplateURL()); 96 log.debug("getDestinationfile()=" + getDestinationFile()); 97 log.debug("getOfType()=" + getOfType()); 98 log.debug("getExtent()=" + getExtent()); 99 log.debug("getHavingClassTag()=" + getHavingClassTag()); 100 } 101 102 startProcessForAll(); 103 } 104 105 110 protected void engineStarted() throws XDocletException 111 { 112 System.out.println("Generating ojb repository descriptor ("+getDestinationFile()+")"); 113 } 114 } 115 | Popular Tags |