public boolean isInvalid(CommandLineOption option) { String optionType = option.getOptionType(); return !("repo".equalsIgnoreCase(optionType) || "conf" .equalsIgnoreCase(optionType)); } });
/** * Gets the option value. * * @param allOptions * the all options * @param optionName * the option name * @return the option value */ private static String getOptionValue(Map allOptions, String optionName) { CommandLineOption option = (CommandLineOption) allOptions .get(optionName); if (option != null) { return option.getOptionValue().toString(); } return null; }
/** * @param type */ public CommandLineOption(String type, ArrayList values) { setOptionType(type); if (null != values) { this.optionValues = values; } }
if (axisOptionList.contains(op.getOptionType())) { if (op.getOptionType() != null) { originalArgsOps.remove("-".concat(op.getOptionType())); if (op.getOptionValue() != null) { originalArgsOps.remove(op.getOptionValue());
new CommandLineOption(optionType, optionBundle); commandLineOptions.put(commandLineOption.getOptionType(), commandLineOption); state = NEW_OPTION; if (STARTED == state) { commandLineOption = new CommandLineOption( CommandLineOptionConstants.SOLE_INPUT, args); commandLineOptions.put(commandLineOption.getOptionType(), commandLineOption); return commandLineOptions; commandLineOption = new CommandLineOption(optionType, optionBundle); commandLineOptions.put(commandLineOption.getOptionType(), commandLineOption); return commandLineOptions;
optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION, getStringArray(WSDLFileName))); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_CODE_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_SERVICE_DESCRIPTION_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_ALL_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_ALL_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.SERVER_SIDE_INTERFACE_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.GENERATE_TEST_CASE_OPTION, new String[0])); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.PACKAGE_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.PACKAGE_OPTION, getStringArray(packageName))); optionMap.put(CommandLineOptionConstants.WSDL2JavaConstants.STUB_LANGUAGE_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.STUB_LANGUAGE_OPTION, getStringArray(mapLanguagesWithCombo(language))));
for (Iterator iterator = list.iterator(); iterator.hasNext();) { CommandLineOption commandLineOption = (CommandLineOption) iterator.next(); String optionValue = commandLineOption.getOptionValue(); faultOptions += "Invalid input for [ " + commandLineOption.getOptionType() + (optionValue != null ? " : " + optionValue + " ]" : " ]") + "\n"; throw new AxisFault("WSDL URI or Path Cannot be empty"); String uriValue = commandLineOption.getOptionValue().trim(); projectName = getProjectName(uriValue); if ("".equals(uriValue)) {
new CommandLineOption(optionType, optionBundle); commandLineOptions.put(commandLineOption.getOptionType(), commandLineOption); state = NEW_OPTION; if (STARTED == state) { commandLineOption = new CommandLineOption( CommandLineOptionConstants.SOLE_INPUT, args); commandLineOptions.put(commandLineOption.getOptionType(), commandLineOption); return commandLineOptions; commandLineOption = new CommandLineOption(optionType, optionBundle); commandLineOptions.put(commandLineOption.getOptionType(), commandLineOption); return commandLineOptions;
new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION, getStringArray(wsdlFile))); new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.OUTPUT_LOCATION_OPTION, getStringArray(outputDirectory.getPath()))); new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.DATA_BINDING_TYPE_OPTION, getStringArray(databindingName))); String key = CommandLineOptionConstants.WSDL2JavaConstants.EXTRA_OPTIONTYPE_PREFIX + org.apache.axis2.wsdl.codegen.extension.JiBXExtension.BINDING_PATH_OPTION; optionMap.put(key, new CommandLineOption(key, getStringArray(jibxBindingFile))); new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_ASYNC_ONLY_OPTION, new String[0])); new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.CODEGEN_SYNC_ONLY_OPTION, new String[0])); new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.PACKAGE_OPTION, getStringArray(packageName))); new CommandLineOption(
/** * For Axis2 * * @param key * @param value * @param configurationMap * @return */ public static String getConfiguratonElement(String key, CommandLineOption value, Map configurationMap, Map defaultValueMap) { String s = (String) configurationMap.get(key); if (s == null) { return ""; } String stringValue = null; if (value.getOptionValue() == null) { if (defaultValueMap.containsKey(key)) { stringValue = (String) defaultValueMap.get(key); } else { stringValue = "true"; } } else { stringValue = value.getOptionValue(); } return "<" + s + ">" + stringValue + "</" + s + ">"; }
public boolean isInvalid(CommandLineOption option) { String optionType = option.getOptionType(); return !("repo".equalsIgnoreCase(optionType) || "conf" .equalsIgnoreCase(optionType)); } });
new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.WSDL_LOCATION_URI_OPTION, getStringArray(wsdlFileName))); optionMap.put( CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_OPTION, getStringArray(wsdlVersion))); optionMap.put( CommandLineOptionConstants.WSDL2JavaConstants.REPOSITORY_PATH_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.REPOSITORY_PATH_OPTION, getStringArray(repositoryPath))); optionMap.put( CommandLineOptionConstants.WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.EXTERNAL_MAPPING_OPTION, getStringArray(externalMapping))); optionMap.put( CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION, new CommandLineOption( CommandLineOptionConstants.WSDL2JavaConstants.SOURCE_FOLDER_NAME_OPTION, getStringArray(targetSourceFolderLocation))); optionMap.put(
/** * @param type */ public CommandLineOption(String type, ArrayList values) { setOptionType(type); if (null != values) { this.optionValues = values; } }
userName = userOption.getOptionValue(); password = passwordOption.getOptionValue(); url = new URL(urlOption.getOptionValue()); } catch (MalformedURLException e) { return;
public boolean isInvalid(CommandLineOption option) { String optionType = option.getOptionType(); return !("repo".equalsIgnoreCase(optionType) || "conf" .equalsIgnoreCase(optionType)); } });
public CommandLineOption(String type, String[] values) { setOptionType(type); ArrayList arrayList = new ArrayList(values.length); for (int i = 0; i < values.length; i++) { if (values[i] != null) { values[i] = values[i].trim(); } arrayList.add(values[i]); } this.optionValues = arrayList; }
repoLocation = repoOption.getOptionValue(); log.info("[SimpleAxisServer] Using the Axis2 Repository" + new File(repoLocation).getAbsolutePath()); confLocation = confOption.getOptionValue(); System.out .println("[SimpleAxisServer] Using the Axis2 Configuration File"
public boolean isInvalid(CommandLineOption option) { String optionType = option.getOptionType(); return !("repo".equalsIgnoreCase(optionType) || "conf" .equalsIgnoreCase(optionType)); } });
public CommandLineOption(String type, String[] values) { setOptionType(type); ArrayList arrayList = new ArrayList(values.length); for (int i = 0; i < values.length; i++) { if (values[i] != null) { values[i] = values[i].trim(); } arrayList.add(values[i]); } this.optionValues = arrayList; }
repoLocation = repoOption.getOptionValue(); log.info("[SimpleAxisServer] Using the Axis2 Repository" + new File(repoLocation).getAbsolutePath()); confLocation = confOption.getOptionValue(); System.out .println("[SimpleAxisServer] Using the Axis2 Configuration File"