01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2006 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id:$
23: *
24: */
25:
26: package com.bostechcorp.cbesb.common.util.generators;
27:
28: import com.bostechcorp.cbesb.common.util.EsbPathHelper;
29:
30: public class SchedulerComponentSimpleWsdlGenerator extends
31: AbstractGenerator {
32:
33: private static String TEMPLATE_NAME = "Scheduler_WSDL.template";
34:
35: private String SCHEDULER_WSDL_OUTPUT_FILENAME = "schedule.wsdl";
36:
37: public SchedulerComponentSimpleWsdlGenerator(String path,
38: String saName, String suName, String interfaceName,
39: String serviceName) {
40: super ("");
41: String cpath;// building output path + filename
42: if (path.endsWith("/")) {
43: cpath = path + SCHEDULER_WSDL_OUTPUT_FILENAME;
44: } else {
45: cpath = path + "/" + SCHEDULER_WSDL_OUTPUT_FILENAME;
46: }
47: getIo().setFileOut(cpath); // setting output file
48: setFileIn(getTemplateName()); // setting template file
49:
50: addHolder("#Service_Name#", serviceName);
51: addHolder("#SA_Name#", saName);
52: addHolder("#SU_Name#", suName);
53: addHolder("#Interface_Name#", interfaceName);
54: }
55:
56: @Override
57: public String getTemplateName() {
58: return EsbPathHelper.getCbesbHomeDir() + "/config/template/xml"
59: + "/" + TEMPLATE_NAME;
60: }
61:
62: @Override
63: protected void setPaths() {// no need it is final class
64: }
65: }
|