001package net.gdface.codegen.webclient;
002
003import java.io.File;
004
005import net.gdface.codegen.generator.GeneratorConfiguration;
006
007import org.apache.commons.cli.CommandLine;
008import org.apache.commons.cli.Options;
009import org.apache.commons.cli.ParseException;
010
011public class GSoapStubConfiguration extends GeneratorConfiguration implements GSoapConstants,WebClientConstants {
012        private File stubFolder;
013        private String stubPrefix;
014        private Class<?> serviceClass;
015        public GSoapStubConfiguration() {
016                // stubPrefix默认值为空
017                defaultValue.setProperty(GSOAP_STUBPREFIX_OPTION_LONG, "");
018        }
019
020        @Override
021        public void loadConfig(Options options, CommandLine cmd) throws ParseException {
022                super.loadConfig(options, cmd);
023                stubFolder = getProperty(GSOAP_STUB_FOLDER_OPTION_LONG);
024                serviceClass = getProperty(WebClientConstants.CLASSNAME_OPTION_LONG);
025                stubPrefix = getProperty(GSOAP_STUBPREFIX_OPTION_LONG);
026        }
027
028        /**
029         * @return stubFolder
030         */
031        public File getStubFolder() {
032                return stubFolder;
033        }
034
035        /**
036         * @return stubPrefix
037         */
038        public String getStubPrefix() {
039                return stubPrefix;
040        }
041
042        /**
043         * @return serviceClass
044         */
045        public Class<?> getServiceClass() {
046                return serviceClass;
047        }
048
049}