Stages an appengine-web.xml based project for deployment. Calls out to appcfg to execute this
staging.

@param config Specifies source config and staging destination
@throws AppEngineException When staging fails
330219
public void stageStandard(AppEngineWebXmlProjectStageConfiguration config)
      throws AppEngineException {
    Preconditions.checkNotNull(config);
    Preconditions.checkNotNull(config.getSourceDirectory());
    Preconditions.checkNotNull(config.getStagingDirectory());

    List<String> arguments = new ArrayList<>();

    arguments.addAll(AppCfgArgs.get("enable_quickstart", config.getEnableQuickstart()));
    arguments.addAll(AppCfgArgs.get("disable_update_check", config.getDisableUpdateCheck()));
    arguments.addAll(AppCfgArgs.get("enable_jar_splitting", config.getEnableJarSplitting()));
    arguments.addAll(AppCfgArgs.get("jar_splitting_excludes", config.getJarSplittingExcludes()));
    arguments.addAll(AppCfgArgs.get("compile_encoding", config.getCompileEncoding()));
    arguments.addAll(AppCfgArgs.get("delete_jsps", config.getDeleteJsps()));
    arguments.addAll(AppCfgArgs.get("enable_jar_classes", config.getEnableJarClasses()));
    arguments.addAll(AppCfgArgs.get("disable_jar_jsps", config.getDisableJarJsps()));
    if (config.getRuntime() != null) {
      // currently only java7 is allowed without --allow_any_runtime
      arguments.addAll(AppCfgArgs.get("allow_any_runtime", true));
      arguments.addAll(AppCfgArgs.get("runtime", config.getRuntime()));
    }
    arguments.add("stage");
    arguments.add(config.getSourceDirectory().toString());
    arguments.add(config.getStagingDirectory().toString());

    Path dockerfile = config.getDockerfile();

    try {

      if (dockerfile != null && Files.exists(dockerfile)) {
        Files.copy(
            dockerfile,
            config.getSourceDirectory().resolve(dockerfile.getFileName()),
            StandardCopyOption.REPLACE_EXISTING);
      }

      runner.run(arguments);

      // TODO : Move this fix up the chain (appcfg)
      if (config.getRuntime() != null && config.getRuntime().equals("java")) {
        Path appYaml = config.getStagingDirectory().resolve("app.yaml");
        Files.write(
            appYaml,
            "\nruntime_config:\n  jdk: openjdk8\n".getBytes(StandardCharsets.UTF_8),
            StandardOpenOption.APPEND);
      }

    } catch (IOException | ProcessHandlerException e) {
      throw new AppEngineException(e);
    }
  }
949212
public void configure(Configuration config) throws ConfigurationException
    {
        LoggingConfiguration lc = (LoggingConfiguration) config;
        String levelName = lc.getLogLevel(name);
        setLevel(levelName);
    }
143765
@Override
	public void applyConfig(final ConfigSettings config)
	{

		Object o = config.getConfigParameter(ConfigurationKeys.MODE_OUTPUT);
		if ((OutputType) o == OutputType.DATABASE) {
			controller.setEnableSQLDatabaseOutput(true);
		}

		o = config.getConfigParameter(ConfigurationKeys.SQL_HOST);
		if (o != null) {
			this.sqlHostField.setText((String) o);
		}
		else {
			this.sqlHostField.setText("");
		}

		o = config.getConfigParameter(ConfigurationKeys.SQL_DATABASE);
		if (o != null) {
			this.sqlDatabaseField.setText((String) o);
		}
		else {
			this.sqlDatabaseField.setText("");
		}

		o = config.getConfigParameter(ConfigurationKeys.SQL_USERNAME);
		if (o != null) {
			this.sqlUserField.setText((String) o);
		}
		else {
			this.sqlUserField.setText("");
		}

		o = config.getConfigParameter(ConfigurationKeys.SQL_PASSWORD);
		if (o != null) {
			this.sqlPasswordField.setText((String) o);
		}
		else {
			this.sqlPasswordField.setText("");
		}

		o = config
				.getConfigParameter(ConfigurationKeys.MODE_ZIP_COMPRESSION_ENABLED);
		if (o != null) {
			controller.setEnableZipCompression((Boolean) o);
		}
		else {
			controller.setEnableZipCompression(false);
		}
	}
1075724
@VisibleForTesting
  void deployConfig(String filename, DeployProjectConfigurationConfiguration configuration)
      throws AppEngineException {
    Preconditions.checkNotNull(configuration);
    Preconditions.checkNotNull(configuration.getAppEngineDirectory());

    Path deployable = configuration.getAppEngineDirectory().resolve(filename);
    Preconditions.checkArgument(
        Files.isRegularFile(deployable), deployable.toString() + " does not exist.");

    List<String> arguments = new ArrayList<>();
    arguments.add("app");
    arguments.add("deploy");
    arguments.add(deployable.toAbsolutePath().toString());
    arguments.addAll(GcloudArgs.get("server", configuration.getServer()));
    arguments.addAll(GcloudArgs.get("project", configuration.getProjectId()));

    try {
      runner.run(arguments, null);
    } catch (ProcessHandlerException | IOException ex) {
      throw new AppEngineException(ex);
    }
  }
610664
@Override
	public void applyConfig(final ConfigSettings config)
	{

		Object o = config
				.getConfigParameter(ConfigurationKeys.WIKIPEDIA_ENCODING);
		if (o != null) {
			encodingField.setText((String) o);
		}
		else {
			encodingField.setText("");
		}

		o = config.getConfigParameter(ConfigurationKeys.MODE_SURROGATES);
		if (o != null) {
			controller.setSurrogates((SurrogateModes) o);
		}
		else {
			controller.setSurrogates(SurrogateModes.DISCARD_REVISION);
		}
	}
545434
public function handle(Config $config)
    {
        $sampleOption = $this->option('sample');

        $type = 'empty';
        if( $sampleOption )
        {
            $type = 'sample';
        }

        $from = __DIR__ . '/../../resources/'.$type.'_schema.xml';
        $to = $config->get('propel.propel.paths.schemaDir') . '/' . $config->get('propel.propel.generator.schema.basename') . '.xml';

        if( ! copy($from, $to) )
        {
            throw new \Exception('Failed to copy a file "' . $from . '" to "' . $to . '"');
        }

        $content = file_get_contents($to);

        $name = $config->get('propel.propel.generator.defaultConnection');
        $content = str_replace('**NAME**', $name, $content);

        $nameSpace = $this->laravel->getNamespace() . str_replace(app_path().DIRECTORY_SEPARATOR, '', $config->get('propel.propel.paths.phpDir'));
        $content = str_replace('**NAMESPACE**', $nameSpace, $content);

        file_put_contents($to, $content);

        $this->comment(PHP_EOL . 'Create ' . $to . PHP_EOL);
    }
1233671
public void setConfiguration(VirtualHost config) {
        this.config = config;
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "setConfiguration", "config set ->"+ this.config);
        }
    }
838729
@Override
    public void config(String msg) {
        if (isLoggable(Level.CONFIG)) {
            log(Level.CONFIG, msg);
        }
    }
1241652
public void deployCron() throws MojoExecutionException {
    stager.stage();
    try {
      deployMojo
          .getAppEngineFactory()
          .deployment()
          .deployCron(
              configBuilder.buildDeployProjectConfigurationConfiguration(appengineDirectory));
    } catch (AppEngineException ex) {
      throw new MojoExecutionException("Failed to deploy", ex);
    }
  }
1193518
public CentralDogmaBeanConfigBuilder merge(CentralDogmaBeanConfig config) {
        config.project().ifPresent(this::project);
        config.repository().ifPresent(this::repository);
        config.path().ifPresent(this::path);
        config.jsonPath().ifPresent(this::jsonPath);
        return this;
    }
585811
public void setDeploymentApplicationConfigs(java.util.Collection<DeploymentApplicationConfig> deploymentApplicationConfigs) {
        if (deploymentApplicationConfigs == null) {
            this.deploymentApplicationConfigs = null;
            return;
        }

        this.deploymentApplicationConfigs = new java.util.ArrayList<DeploymentApplicationConfig>(deploymentApplicationConfigs);
    }
361823
async def set_config(self, config):
        
        app_facade = client.ApplicationFacade.from_connection(self.connection)

        log.debug(
            'Setting config for %s: %s', self.name, config)

        return await app_facade.Set(self.name, config)
16788
function (config) {
    config = config || {};
    Appender.call(this, config);

    /**
     * True to log strings instead of objects
     */
    this.appendStrings = (typeof config.appendStrings !== 'undefined') ?
      config.appendStrings :
      true;
  }
912538
private void loadEngines(final JBakeConfiguration config, final ContentStore db) {
        try {
            ClassLoader cl = TemplateEngines.class.getClassLoader();
            Enumeration<URL> resources = cl.getResources("META-INF/org.jbake.parser.TemplateEngines.properties");
            while (resources.hasMoreElements()) {
                URL url = resources.nextElement();
                Properties props = new Properties();
                props.load(url.openStream());
                for (Map.Entry<Object, Object> entry : props.entrySet()) {
                    String className = (String) entry.getKey();
                    String[] extensions = ((String) entry.getValue()).split(",");
                    registerEngine(config, db, className, extensions);
                }
            }
        } catch (IOException e) {
            LOGGER.error("Error loading engines", e);
        }
    }
995968
public void setEndpointConfig(CommonConfig config)
   {
      if (this.config == null)
      {
         this.config = config;
         //setup using provided configuration
         Map<String, String> epConfProps = config.getProperties();
         if (!epConfProps.isEmpty())
         {
            final Map<String, Object> propMap = getProperties();
            if (propMap == null)
            {
               setProperties(new HashMap<String, Object>(epConfProps));
            }
            else
            {
               propMap.putAll(epConfProps);
            }
            InterceptorUtils.addInterceptors(this, epConfProps);
            FeatureUtils.addFeatures(this, getBus(), epConfProps);
         }
         //handlers config is done later, as when this methods is called getBinding() can't
         //be used without messing with the servlet destinations due to the endpoint address
         //not having been rewritten yet.
      }
   }
313703
public void configureCoreProperties(
      Project project,
      AppEngineCoreExtensionProperties appEngineCoreExtensionProperties,
      String taskGroup,
      boolean requiresAppEngineJava) {
    project
        .getLogger()
        .warn(
            "WARNING: You are a using release candidate "
                + getClass().getPackage().getImplementationVersion()
                + ". Behavior of this plugin has changed since 1.3.5. Please see release notes at: "
                + "https://github.com/GoogleCloudPlatform/app-gradle-plugin.");
    project
        .getLogger()
        .warn(
            "Missing a feature? Can't get it to work?, please file a bug at: "
                + "https://github.com/GoogleCloudPlatform/app-gradle-plugin/issues.");

    checkGradleVersion();

    this.project = project;
    this.taskGroup = taskGroup;
    this.toolsExtension = appEngineCoreExtensionProperties.getTools();
    this.deployExtension = appEngineCoreExtensionProperties.getDeploy();
    this.requiresAppEngineJava = requiresAppEngineJava;
    configureFactories();

    createDownloadCloudSdkTask();
    createCheckCloudSdkTask();
    createLoginTask();
    createDeployTask();
    createDeployCronTask();
    createDeployDispatchTask();
    createDeployDosTask();
    createDeployIndexTask();
    createDeployQueueTask();
    createDeployAllTask();
    createShowConfigurationTask();
  }
85653
public void start(VersionsSelectionConfiguration configuration) throws AppEngineException {
    Preconditions.checkNotNull(configuration);
    Preconditions.checkNotNull(configuration.getVersions());
    Preconditions.checkArgument(configuration.getVersions().size() > 0);

    List<String> arguments = new ArrayList<>();
    arguments.add("app");
    arguments.add("versions");
    arguments.add("start");
    arguments.addAll(commonVersionSelectionArgs(configuration));

    execute(arguments);
  }