codegenconfiguration.java
来自「开源的axis2框架的源码。用于开发WEBSERVER」· Java 代码 · 共 576 行 · 第 1/2 页
JAVA
576 行
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axis2.wsdl.codegen;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.util.CommandLineOptionConstants;
import org.apache.axis2.util.URLProcessor;
import org.apache.axis2.wsdl.databinding.TypeMapper;
import org.apache.axis2.wsdl.util.ConfigPropertyFileLoader;
import javax.wsdl.Definition;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
public class CodeGenConfiguration implements CommandLineOptionConstants {
/** Axis Services reference */
private List axisServices;
/** Axis service to use */
private AxisService axisService;
/** Base URI */
private String baseURI;
/** path to the repository - used for evaluating policy */
private String repositoryPath;
/** Mapping file including the qname to type map */
private File typeMappingFile;
/** keeps the WSDL version - default is 1.1 */
private String WSDLVersion = WSDL2JavaConstants.WSDL_VERSION_1;
public String getWSDLVersion() {
return WSDLVersion;
}
public void setWSDLVersion(String WSDLVersion) {
this.WSDLVersion = WSDLVersion;
}
public File getTypeMappingFile() {
return typeMappingFile;
}
public void setTypeMappingFile(File typeMappingFile) {
this.typeMappingFile = typeMappingFile;
}
/** A map to keep the custom namespace and package name mappings */
private Map uri2PackageNameMap;
public Map getUri2PackageNameMap() {
return uri2PackageNameMap;
}
public void setUri2PackageNameMap(Map uri2PackageNameMap) {
if (this.uri2PackageNameMap == null) {
this.uri2PackageNameMap = uri2PackageNameMap;
} else {
this.uri2PackageNameMap.putAll(uri2PackageNameMap);
}
}
/** Full path and name of XMLBeans xsdconfig file to use */
private String xsdConfigFile = null;
/**
* Returns the xsdconfig file to use for XMLBeans data binding.
*
* @return Full path and name of XMLBeans xsdconfig file to use
* @deprecated
*/
public String getXsdConfigFile() {
return xsdConfigFile;
}
/**
* Sets the xsdconfig file to use for XMLBeans data binding.
*
* @param xsdConfigFile Full path and name of XMLBeans xsdconfig file to use
* @deprecated
*/
public void setXsdConfigFile(String xsdConfigFile) {
this.xsdConfigFile = xsdConfigFile;
}
/** Says whether to flatten the files or put them in specific folders */
private boolean flattenFiles = false;
public boolean isFlattenFiles() {
return flattenFiles;
}
public void setFlattenFiles(boolean flattenFiles) {
this.flattenFiles = flattenFiles;
}
/** Folder name for the resource files */
private String resourceLocation = ConfigPropertyFileLoader.getResourceFolderName();
public String getResourceLocation() {
return resourceLocation;
}
public void setResourceLocation(String resourceLocation) {
this.resourceLocation = resourceLocation;
}
/** Folder name for the source files */
private String sourceLocation = ConfigPropertyFileLoader.getSrcFolderName();
public String getSourceLocation() {
return sourceLocation;
}
public void setSourceLocation(String sourceLocation) {
this.sourceLocation = sourceLocation;
}
/** Determines whether the parameters are wrapped or unwrapped true by default */
private boolean parametersWrapped = true;
public boolean isParametersWrapped() {
return parametersWrapped;
}
public void setParametersWrapped(boolean parametersWrapped) {
this.parametersWrapped = parametersWrapped;
}
public String getBaseURI() {
return baseURI;
}
public void setBaseURI(String baseURI) {
this.baseURI = baseURI;
}
public Map getConfigurationProperties() {
return configurationProperties;
}
public void setConfigurationProperties(Map configurationProperties) {
this.configurationProperties = configurationProperties;
}
public void setOutputLanguage(String outputLanguage) {
this.outputLanguage = outputLanguage;
}
public void setAdvancedCodeGenEnabled(boolean advancedCodeGenEnabled) {
this.advancedCodeGenEnabled = advancedCodeGenEnabled;
}
public void setAsyncOn(boolean asyncOn) {
this.asyncOn = asyncOn;
}
public void setSyncOn(boolean syncOn) {
this.syncOn = syncOn;
}
public void setServerSide(boolean serverSide) {
this.serverSide = serverSide;
}
public void setGenerateDeployementDescriptor(boolean generateDeployementDescriptor) {
this.generateDeployementDescriptor = generateDeployementDescriptor;
}
public void setWriteTestCase(boolean writeTestCase) {
this.writeTestCase = writeTestCase;
}
public void setOutputLocation(File outputLocation) {
this.outputLocation = outputLocation;
}
private File outputLocation;
//get the defaults for these from the property file
private String outputLanguage = ConfigPropertyFileLoader.getDefaultLanguage();
private String databindingType = ConfigPropertyFileLoader.getDefaultDBFrameworkName();
private boolean advancedCodeGenEnabled = false;
private boolean asyncOn = true;
private boolean syncOn = true;
private boolean serverSide = false;
private boolean generateDeployementDescriptor = true;
private boolean writeTestCase = false;
private boolean skipMessageReceiver = false;
private boolean skipWriteWSDLs = false;
private boolean skipBuildXML = false;
private String packageName = URLProcessor.DEFAULT_PACKAGE;
// Default packClasses is true, which means the classes generated
// by default are wrapped. The effect of this setting will be controlled
// to some extent, by the other settings as well.
private boolean packClasses = true;
private boolean generateAll = false;
//user selected portname
private String portName;
//user selected servicename
private String serviceName;
//option to generate server side interface or not
private boolean serverSideInterface = false;
public boolean isServerSideInterface() {
return serverSideInterface;
}
public void setServerSideInterface(boolean serverSideInterface) {
this.serverSideInterface = serverSideInterface;
}
public String getPortName() {
return portName;
}
public void setPortName(String portName) {
this.portName = portName;
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/** A hashmap to hang the property objects */
private Map policyMap = new HashMap();
/*
* A hashmap of properties that may be populated on the way. extensions can populate it
* This can be used to keep non specific information
*/
private Map configurationProperties = new HashMap();
public boolean isGenerateAll() {
return generateAll;
}
public void setGenerateAll(boolean generateAll) {
this.generateAll = generateAll;
}
/**
* Gets the wrap classes flag.
*
* @return Returns true if it is a wrap class, else returns false.
*/
public boolean isPackClasses() {
return packClasses;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?