/** * Constructor for the TaskLaunchRequest. * @param uri the URI to the task artifact to be launched. * @param commandlineArguments list of commandlineArguments to be used by the task * @param environmentProperties are the environment variables for this task. * @param deploymentProperties are the variables used to setup task on the platform. * @param applicationName name to be applied to the launched task. If set * to null then the launched task name will be "Task-`hash code of the * TaskLaunchRequest`. */ public TaskLaunchRequest(String uri, List<String> commandlineArguments, Map<String, String> environmentProperties, Map<String, String> deploymentProperties, String applicationName) { Assert.hasText(uri, "uri must not be empty nor null."); this.uri = uri; this.commandlineArguments = (commandlineArguments == null) ? new ArrayList<String>() : commandlineArguments; this.environmentProperties = environmentProperties == null ? new HashMap<String, String>() : environmentProperties; this.deploymentProperties = deploymentProperties == null ? new HashMap<String, String>() : deploymentProperties; setApplicationName(applicationName); }