method2testcases
stringlengths
118
6.63k
### Question: IndentUtil { public static String calcXmlIndent(String[] lines, int row, int column) { Preconditions.checkNotNull(lines, "The parameter 'lines' cannot be null"); Preconditions.checkArgument(lines.length > row && row >= 0, "The parameter 'row' overflows."); final String line = lines[row]; Preconditions.che...
### Question: AnnotationHandlerImpl implements AnnotationHandler { @Override public Set<Method> findFunctions(final List<URL> urls) { return new Reflections( new ConfigurationBuilder() .addUrls(urls) .setScanners(new MethodAnnotationsScanner()) .addClassLoader(getClassLoader(urls))) .getMethodsAnnotatedWith(FunctionNam...
### Question: MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File zipPackage = createZipPackage(); final CloudStorageAccount storageAccount = FunctionArtifactHelper.getCloudStorageAccount(target); final String blo...
### Question: MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected File createZipPackage() throws AzureExecutionException { Log.prompt(""); Log.prompt(CREATE_ZIP_START); final File zipPackage = FunctionArtifactHelper.createFunctionArtifact(stagingDirectoryPath); Log.prompt(CREATE_ZIP_DONE + stagingDirect...
### Question: MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected String uploadPackageToAzureStorage(final File zipPackage, final CloudStorageAccount storageAccount, final String blobName) throws AzureExecutionException { Log.prompt(UPLOAD_PACKAGE_START); final CloudBlockBlob blob = AzureStorageHelper.u...
### Question: MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deployWithPackageUri(final DeployTarget target, final String packageUri, Runnable onDeployFinish) { try { Log.prompt(DEPLOY_PACKAGE_START); target.msDeploy(packageUri, false); Log.prompt(DEPLOY_PACKAGE_DONE); } finally { onDeployFini...
### Question: MSDeployArtifactHandlerImpl extends ArtifactHandlerBase { protected void deletePackageFromAzureStorage(final CloudStorageAccount storageAccount, final String blobName) { try { Log.prompt(DELETE_PACKAGE_START); AzureStorageHelper.deleteBlob(storageAccount, DEPLOYMENT_PACKAGE_CONTAINER, blobName); Log.promp...
### Question: FunctionArtifactHelper { public static CloudStorageAccount getCloudStorageAccount(final DeployTarget target) throws AzureExecutionException { final Map<String, AppSetting> settingsMap = target.getAppSettings(); if (settingsMap != null) { final AppSetting setting = settingsMap.get(INTERNAL_STORAGE_KEY); if...
### Question: DeployMojo extends AbstractFunctionMojo { protected FunctionApp updateFunctionApp(final FunctionApp app, final FunctionRuntimeHandler runtimeHandler) throws AzureAuthFailureException, AzureExecutionException { Log.info(FUNCTION_APP_UPDATE); runtimeHandler.updateAppServicePlan(app); final Update update = r...
### Question: FunctionArtifactHelper { public static void updateAppSetting(final DeployTarget deployTarget, final String key, final String value) throws AzureExecutionException { final WebAppBase targetApp = deployTarget.getApp(); if (targetApp instanceof FunctionApp) { ((FunctionApp) targetApp).update().withAppSetting...
### Question: FunctionArtifactHelper { public static File createFunctionArtifact(final String stagingDirectoryPath) throws AzureExecutionException { final File stageDirectory = new File(stagingDirectoryPath); final File zipPackage = new File(stagingDirectoryPath.concat(Constants.ZIP_EXT)); if (!stageDirectory.exists() ...
### Question: FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { @Override public void installExtension(File stagingDirectory, File basedir) throws AzureExecutionException { assureRequirementAddressed(); installFunctionExtension(stagingDirectory, basedir); } FunctionCoreToolsHandlerImpl(final CommandHan...
### Question: FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected String getLocalFunctionCoreToolsVersion() { try { final String localVersion = commandHandler.runCommandAndGetOutput( GET_LOCAL_VERSION_CMD, false, null ); Version.valueOf(localVersion); return localVersion; } catch (Exception e) ...
### Question: FunctionCoreToolsHandlerImpl implements FunctionCoreToolsHandler { protected void installFunctionExtension(File stagingDirector, File basedir) throws AzureExecutionException { commandHandler.runCommandWithReturnCodeCheck( String.format(FUNC_EXTENSIONS_INSTALL_TEMPLATE, basedir.getAbsolutePath()), true, st...
### Question: CommandHandlerImpl implements CommandHandler { protected static String[] buildCommand(final String command) { return CommandUtils.isWindows() ? new String[]{"cmd.exe", "/c", command} : new String[]{"sh", "-c", command}; } @Override void runCommandWithReturnCodeCheck(final String command, ...
### Question: CommandHandlerImpl implements CommandHandler { protected static ProcessBuilder.Redirect getStdoutRedirect(boolean showStdout) { return showStdout ? ProcessBuilder.Redirect.INHERIT : ProcessBuilder.Redirect.PIPE; } @Override void runCommandWithReturnCodeCheck(final String command, ...
### Question: DeployMojo extends AbstractFunctionMojo { protected void configureAppSettings(final Consumer<Map> withAppSettings, final Map appSettings) { if (appSettings != null && !appSettings.isEmpty()) { withAppSettings.accept(appSettings); } } @Override DeploymentType getDeploymentType(); }### Answer: @Test publi...
### Question: CommandHandlerImpl implements CommandHandler { protected void handleExitValue(int exitValue, final List<Long> validReturnCodes, final String errorMessage, final InputStream inputStream) throws AzureExecutionException, IOException { Log.debug("Process exit value: " + exitValue); if (!validReturnCodes.conta...
### Question: CommandUtils { public static boolean isWindows() { return SystemUtils.IS_OS_WINDOWS; } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }### Answer: @Test public void isWindows() { assertEquals(SystemUtils.IS_OS_WINDOWS, CommandUtils.is...
### Question: CommandUtils { public static List<Long> getDefaultValidReturnCodes() { return Arrays.asList(0L); } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }### Answer: @Test public void getDefaultValidReturnCodes() throws Exception { assertEqu...
### Question: CommandUtils { public static List<Long> getValidReturnCodes() { return isWindows() ? Arrays.asList(0L, 3221225786L) : Arrays.asList(0L, 130L); } static boolean isWindows(); static List<Long> getDefaultValidReturnCodes(); static List<Long> getValidReturnCodes(); }### Answer: @Test public void getValidRet...
### Question: FTPUploader { public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws AzureExecutionException { int retryCount = 0; while (retryCount < maxRetryCount) { retryCou...
### Question: FTPUploader { protected boolean uploadDirectory(final String ftpServer, final String username, final String password, final String sourceDirectoryPath, final String targetDirectoryPath) { Log.debug("FTP username: " + username); try { final FTPClient ftpClient = getFTPClient(ftpServer, username, password);...
### Question: FTPUploader { protected FTPClient getFTPClient(final String ftpServer, final String username, final String password) throws IOException { final FTPClient ftpClient = new FTPClient(); ftpClient.connect(ftpServer); ftpClient.login(username, password); ftpClient.setFileType(FTP.BINARY_FILE_TYPE); ftpClient.e...
### Question: Utils { public static OperatingSystemEnum parseOperationSystem(final String os) throws AzureExecutionException { if (StringUtils.isEmpty(os)) { throw new AzureExecutionException("The value of 'os' is empty, please specify it in 'runtime' configuration."); } switch (os.toLowerCase(Locale.ENGLISH)) { case "...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenProject getProject() { return project; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override ...
### Question: DeployMojo extends AbstractFunctionMojo { protected ArtifactHandler getArtifactHandler() throws AzureExecutionException { final ArtifactHandlerBase.Builder builder; final DeploymentType deploymentType = getDeploymentType(); getTelemetryProxy().addDefaultProperty(DEPLOYMENT_TYPE_KEY, deploymentType.toStrin...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenSession getSession() { return session; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @Override ...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public MavenResourcesFiltering getMavenResourcesFiltering() { return mavenResourcesFiltering; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFilteri...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public String getBuildDirectoryAbsolutePath() { return buildDirectory.getAbsolutePath(); } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering ge...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public AuthenticationSetting getAuthenticationSetting() { return authentication; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering ...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public Azure getAzureClient() throws AzureAuthFailureException { if (azure == null) { if (this.authentication != null && (this.authentication.getFile() != null || StringUtils.isNotBlank(authentication.getServerId...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Settings getSettings() { return settings; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); @O...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public String getSubscriptionId() { return subscriptionId; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFilte...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public TelemetryProxy getTelemetryProxy() { if (telemetryProxy == null) { initTelemetry(); } return telemetryProxy; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath();...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { public boolean isTelemetryAllowed() { return allowTelemetry; } MavenProject getProject(); MavenSession getSession(); String getBuildDirectoryAbsolutePath(); MavenResourcesFiltering getMavenResourcesFiltering(); ...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public void execute() throws MojoExecutionException { try { Thread.setDefaultUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler()); final Properties prop = new Properties(); if (isFirstRun(pro...
### Question: DeployMojo extends AbstractFunctionMojo { protected DeploymentType getDeploymentTypeByRuntime() throws AzureExecutionException { final OperatingSystemEnum operatingSystemEnum = getOsEnum(); switch (operatingSystemEnum) { case Docker: return DOCKER; case Linux: return isDedicatedPricingTier() ? RUN_FROM_ZI...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { protected void handleException(final Exception exception) throws MojoExecutionException { String message = exception.getMessage(); if (StringUtils.isEmpty(message)) { message = exception.toString(); } trackMojoFa...
### Question: AbstractAzureMojo extends AbstractMojo implements TelemetryConfiguration, AuthConfiguration { @Override public Map<String, String> getTelemetryProperties() { final Map<String, String> map = new HashMap<>(); map.put(INSTALLATION_ID_KEY, getInstallationId()); map.put(PLUGIN_NAME_KEY, getPluginName()); map.p...
### Question: SettingsHandlerImpl implements SettingsHandler { @Override public void processSettings(WithCreate withCreate) throws AzureExecutionException { final Map appSettings = mojo.getAppSettings(); if (appSettings != null && !appSettings.isEmpty()) { withCreate.withAppSettings(appSettings); } } SettingsHandlerImp...
### Question: DeploymentSlotHandler { public void createDeploymentSlotIfNotExist() throws AzureExecutionException, AzureAuthFailureException { final DeploymentSlotSetting slotSetting = this.mojo.getDeploymentSlotSetting(); assureValidSlotSetting(slotSetting); final WebApp app = this.mojo.getWebApp(); final String slotN...
### Question: DeploymentSlotHandler { protected void createDeploymentSlot(final WebApp app, final String slotName, final String configurationSource) throws AzureExecutionException { assureValidSlotName(slotName); final DeploymentSlot.DefinitionStages.Blank definedSlot = app.deploymentSlots().define(slotName); final Con...
### Question: DeploymentSlotHandler { protected void assureValidSlotName(final String slotName) throws AzureExecutionException { final Pattern pattern = Pattern.compile(SLOT_NAME_PATTERN, Pattern.CASE_INSENSITIVE); if (StringUtils.isEmpty(slotName) || !pattern.matcher(slotName).matches()) { throw new AzureExecutionExce...
### Question: DeployMojo extends AbstractFunctionMojo { protected FunctionDeploymentSlot createDeploymentSlot(final FunctionApp functionApp, final FunctionRuntimeHandler runtimeHandler) throws AzureExecutionException, AzureAuthFailureException { Log.info(FUNCTION_SLOT_CREATE_START); final DeploymentSlotSetting slotSett...
### Question: LinuxRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withBuiltInImage(runtime); } private LinuxRuntimeHandlerImpl(final Builder builder); @Override WebApp.Defini...
### Question: PublicDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update().withPublicDockerHubImage(image); } private PublicDockerHubRuntimeHandlerImpl(final Pu...
### Question: NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public WithCreate defineAppWithRuntime() throws AzureExecutionException { throw new AzureExecutionException(NO_RUNTIME_CONFIG); } @Override WithCreate defineAppWithRuntime(); @Override Update updateAppRuntime(final WebApp app); @Overrid...
### Question: NullRuntimeHandlerImpl implements RuntimeHandler<WebApp> { @Override public Update updateAppRuntime(final WebApp app) { return null; } @Override WithCreate defineAppWithRuntime(); @Override Update updateAppRuntime(final WebApp app); @Override AppServicePlan updateAppServicePlan(final WebApp app); static ...
### Question: PrivateRegistryRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateRegistryImage(image, registryUrl) .withCredentials(dockerCredentialProvide...
### Question: WindowsRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureWindowsWebApp(app); final Update update = app.update(); update.withJavaVersion(javaVersion).withWebContainer(webContainer); return update; ...
### Question: PackageMojo extends AbstractFunctionMojo { @Override protected void doExecute() throws AzureExecutionException { promptCompileInfo(); final AnnotationHandler annotationHandler = getAnnotationHandler(); Set<Method> methods = null; try { methods = findAnnotatedMethods(annotationHandler); } catch (MalformedU...
### Question: PrivateDockerHubRuntimeHandlerImpl extends WebAppRuntimeHandler { @Override public WebApp.Update updateAppRuntime(final WebApp app) throws AzureExecutionException { WebAppUtils.assureLinuxWebApp(app); return app.update() .withPrivateDockerHubImage(image) .withCredentials(dockerCredentialProvider.getUserna...
### Question: ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaWarDeploy(final DeployTarget target, final String stagingDirectoryPath, final List<File> warArtifacts) throws AzureExecutionException { if (warArtifacts == null || warArtifacts.size() == 0) { throw new AzureExecutionExce...
### Question: ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected void publishArtifactsViaZipDeploy(final DeployTarget target, final String stagingDirectoryPath) throws AzureExecutionException { if (isJavaSERuntime()) { prepareJavaSERuntime(getAllArtifacts(stagingDirectoryPath)); } final File stagingDirectory...
### Question: ArtifactHandlerImplV2 extends ArtifactHandlerBase { protected boolean isJavaSERuntime() { final boolean isJarProject = project != null && project.isJarProject(); if (runtimeSetting == null || runtimeSetting.isEmpty() || isJarProject) { return isJarProject; } final String webContainer = runtimeSetting.getO...
### Question: ArtifactHandlerImplV2 extends ArtifactHandlerBase { public void publishWarArtifact(final DeployTarget target, final File warArtifact, final String contextPath) throws AzureExecutionException { final Runnable executor = getRealWarDeployExecutor(target, warArtifact, contextPath); Log.info(String.format("Dep...
### Question: WarArtifactHandlerImpl extends ArtifactHandlerBase { @Override public void publish(final DeployTarget target) throws AzureExecutionException { final File war = getWarFile(); assureWarFileExisted(war); final Runnable warDeployExecutor = ArtifactHandlerUtils.getRealWarDeployExecutor(target, war, getContextP...
### Question: WarArtifactHandlerImpl extends ArtifactHandlerBase { protected String getContextPath() { String path = contextPath.trim(); if (path.charAt(0) == '/') { path = path.substring(1); } return path; } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); @Override void publish(final D...
### Question: PackageMojo extends AbstractFunctionMojo { protected AnnotationHandler getAnnotationHandler() { return new AnnotationHandlerImpl(); } @Override List<Resource> getResources(); static final String SEARCH_FUNCTIONS; static final String FOUND_FUNCTIONS; static final String NO_FUNCTIONS; static final String G...
### Question: WarArtifactHandlerImpl extends ArtifactHandlerBase { protected File getWarFile() { return StringUtils.isNotEmpty(warFile) ? new File(warFile) : new File(project.getArtifactFile().toString()); } protected WarArtifactHandlerImpl(final WarArtifactHandlerImpl.Builder builder); @Override void publish(final De...
### Question: WarArtifactHandlerImpl extends ArtifactHandlerBase { protected void assureWarFileExisted(final File war) throws AzureExecutionException { if (!Files.getFileExtension(war.getName()).equalsIgnoreCase("war")) { throw new AzureExecutionException(FILE_IS_NOT_WAR); } if (!war.exists() || !war.isFile()) { throw ...
### Question: JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { @Override public void publish(DeployTarget deployTarget) throws AzureExecutionException { final File jar = getJarFile(); assureJarFileExisted(jar); try { prepareDeploymentFiles(jar); } catch (IOException e) { throw new AzureExecutionException( String...
### Question: JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void prepareDeploymentFiles(File jar) throws IOException { final File parent = new File(stagingDirectoryPath); parent.mkdirs(); Files.copy(jar, new File(parent, DEFAULT_APP_SERVICE_JAR_NAME)); } protected JarArtifactHandlerImpl(final Build...
### Question: JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected File getJarFile() { final String jarFilePath = StringUtils.isNotEmpty(jarFile) ? jarFile : project.getArtifactFile().toString(); return new File(jarFilePath); } protected JarArtifactHandlerImpl(final Builder builder); @Override void publis...
### Question: JarArtifactHandlerImpl extends ZIPArtifactHandlerImpl { protected void assureJarFileExisted(File jar) throws AzureExecutionException { if (!Files.getFileExtension(jar.getName()).equalsIgnoreCase("jar")) { throw new AzureExecutionException(FILE_IS_NOT_JAR); } if (!jar.exists() || !jar.isFile()) { throw new...
### Question: PackageMojo extends AbstractFunctionMojo { protected String getScriptFilePath() { return new StringBuilder() .append("..") .append("/") .append(getFinalName()) .append(".jar") .toString(); } @Override List<Resource> getResources(); static final String SEARCH_FUNCTIONS; static final String FOUND_FUNCTIONS...
### Question: HandlerFactoryImpl extends HandlerFactory { @Override public RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient) throws AzureExecutionException { if (config.getOs() == null) { return new NullRuntimeHandlerImpl(); } final WebAppRuntimeHandler.Builder builder; switch ...
### Question: HandlerFactoryImpl extends HandlerFactory { @Override public SettingsHandler getSettingsHandler(final AbstractWebAppMojo mojo) { return new SettingsHandlerImpl(mojo); } @Override RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient); @Override SettingsHandler getSett...
### Question: HandlerFactoryImpl extends HandlerFactory { @Override public ArtifactHandler getArtifactHandler(final AbstractWebAppMojo mojo) throws AzureExecutionException { switch (SchemaVersion.fromString(mojo.getSchemaVersion())) { case V1: return getV1ArtifactHandler(mojo); case V2: return getV2ArtifactHandler(mojo...
### Question: HandlerFactoryImpl extends HandlerFactory { @Override public DeploymentSlotHandler getDeploymentSlotHandler(AbstractWebAppMojo mojo) { return new DeploymentSlotHandler(mojo); } @Override RuntimeHandler getRuntimeHandler(final WebAppConfiguration config, final Azure azureClient); @Override SettingsHandler...
### Question: HandlerFactoryImpl extends HandlerFactory { protected ArtifactHandlerBase.Builder getArtifactHandlerBuilderFromPackaging(final AbstractWebAppMojo mojo) throws AzureExecutionException { String packaging = mojo.getProject().getPackaging(); if (StringUtils.isEmpty(packaging)) { throw new AzureExecutionExcept...
### Question: PackageMojo extends AbstractFunctionMojo { protected void writeFunctionJsonFile(final ObjectWriter objectWriter, final String functionName, final FunctionConfiguration config) throws IOException { Log.info(SAVE_FUNCTION_JSON + functionName); final File functionJsonFile = Paths.get(getDeploymentStagingDire...
### Question: RuntimeStackUtils { public static RuntimeStack getRuntimeStack(String javaVersion) { for (final RuntimeStack runtimeStack : getValidRuntimeStacks()) { if (runtimeStack.stack().equals("JAVA") && getJavaVersionFromRuntimeStack(runtimeStack).equalsIgnoreCase(javaVersion)) { return runtimeStack; } } return nu...
### Question: RuntimeStackUtils { public static String getWebContainerFromRuntimeStack(RuntimeStack runtimeStack) { final String stack = runtimeStack.stack(); final String version = runtimeStack.version(); return stack.equalsIgnoreCase("JAVA") ? version.split("-")[1] : stack + " " + version.split("-")[0]; } static Str...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final RuntimeSetting runtime = mojo.getRuntime(); final String os = runtime.getOs(); if (runtime.isEmpty()) { return null; } switch (os.toL...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); final String region = mojo.getRegion(); return Region.fromName(region); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationVa...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null || runtime.isEmpty()) { return null; } return runtime.ge...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected String getImage() throws AzureExecutionException { validate(validator.validateImage()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getImage(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfiguratio...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected String getServerId() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getServerId(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); ...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected String getRegistryUrl() { final RuntimeSetting runtime = mojo.getRuntime(); if (runtime == null) { return null; } return runtime.getRegistryUrl(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validat...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getWebContainer(); } V2ConfigurationParser(AbstractWebAppMojo...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); final RuntimeSetting runtime = mojo.getRuntime(); return runtime.getJavaVersion(); } V2ConfigurationParser(AbstractWebAppMojo moj...
### Question: AzureServicePrincipleAuthHelper { static AzureTokenCredentials getAzureServicePrincipleCredentials(AuthConfiguration config) throws InvalidConfigurationException, IOException { if (StringUtils.isBlank(config.getClient())) { throw new IllegalArgumentException("'Client Id' of your service principal is not c...
### Question: V2ConfigurationParser extends ConfigurationParser { @Override protected List<Resource> getResources() { final Deployment deployment = mojo.getDeployment(); return deployment == null ? null : deployment.getResources(); } V2ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validato...
### Question: ConfigurationParser { protected String getAppName() throws AzureExecutionException { validate(validator.validateAppName()); return mojo.getAppName(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); WebAppConfiguration getWebAppConfiguration(...
### Question: ConfigurationParser { protected String getResourceGroup() throws AzureExecutionException { validate(validator.validateResourceGroup()); return mojo.getResourceGroup(); } protected ConfigurationParser(final AbstractWebAppMojo mojo, final AbstractConfigurationValidator validator); WebAppConfiguration getWe...
### Question: ConfigurationParser { public WebAppConfiguration getWebAppConfiguration() throws AzureExecutionException { WebAppConfiguration.Builder builder = new WebAppConfiguration.Builder(); final OperatingSystemEnum os = getOs(); if (os == null) { Log.debug("No runtime related config is specified. " + "It will caus...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public OperatingSystemEnum getOs() throws AzureExecutionException { validate(validator.validateOs()); final String linuxRuntime = mojo.getLinuxRuntime(); final String javaVersion = mojo.getJavaVersion(); final ContainerSetting containerSetting ...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override protected Region getRegion() throws AzureExecutionException { validate(validator.validateRegion()); if (StringUtils.isEmpty(mojo.getRegion())) { return Region.EUROPE_WEST; } return Region.fromName(mojo.getRegion()); } V1ConfigurationParser(Abst...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public RuntimeStack getRuntimeStack() throws AzureExecutionException { validate(validator.validateRuntimeStack()); final String linuxRuntime = mojo.getLinuxRuntime(); final RuntimeStack javaSERuntimeStack = RuntimeStackUtils.getRuntimeStack(lin...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public String getImage() throws AzureExecutionException { validate(validator.validateImage()); final ContainerSetting containerSetting = mojo.getContainerSettings(); return containerSetting.getImageName(); } V1ConfigurationParser(AbstractWebApp...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public String getServerId() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getServerId(); } V1ConfigurationParser(AbstractWebAppMojo mojo, Abstract...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public String getRegistryUrl() { final ContainerSetting containerSetting = mojo.getContainerSettings(); if (containerSetting == null) { return null; } return containerSetting.getRegistryUrl(); } V1ConfigurationParser(AbstractWebAppMojo mojo, Ab...
### Question: AzureServicePrincipleAuthHelper { static AzureTokenCredentials getCredentialFromAzureCliWithServicePrincipal() throws InvalidConfigurationException, IOException { final JsonObject subscription = getDefaultSubscriptionObject(); final String servicePrincipalName = subscription == null ? null : subscription....
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public WebContainer getWebContainer() throws AzureExecutionException { validate(validator.validateWebContainer()); return mojo.getJavaWebContainer(); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidator validator); @O...
### Question: V1ConfigurationParser extends ConfigurationParser { @Override public JavaVersion getJavaVersion() throws AzureExecutionException { validate(validator.validateJavaVersion()); return JavaVersion.fromString(mojo.getJavaVersion()); } V1ConfigurationParser(AbstractWebAppMojo mojo, AbstractConfigurationValidato...
### Question: AuthConfiguration { public void setClient(String client) { this.client = client; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCe...
### Question: AuthConfiguration { public void setTenant(String tenant) { this.tenant = tenant; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCe...
### Question: AuthConfiguration { public void setKey(String key) { this.key = key; } String getClient(); void setClient(String client); String getTenant(); void setTenant(String tenant); String getKey(); void setKey(String key); String getCertificate(); void setCertificate(String certificate); String getCertificatePas...