@Override
 public void validate(
     @NotNull final ActionParametersMap params, @NotNull final ErrorCollection errorCollection) {
   super.validate(params, errorCollection);
   enforceFieldRequiredness(params, errorCollection);
   encryptApiKey(params);
 }
 @Override
 public void populateContextForView(
     @NotNull final Map<String, Object> context, @NotNull final TaskDefinition taskDefinition) {
   super.populateContextForView(context, taskDefinition);
   taskConfiguratorHelper.populateContextWithConfiguration(
       context, taskDefinition, getFieldsToCopy());
 }
  public void populateContextForCreate(final Map<String, Object> context) {
    super.populateContextForCreate(context);

    context.put("zs_url", "http://HOSTNAME:10081");
    context.put("api_key", "");
    context.put("api_secret", "");
    context.put("base_url", "");
    context.put("app_name", "myApp");
    context.put("zsversion", "6.3");
    context.put("custom_options", "");
    context.put("retry", "3");
    context.put("waittime", "10");
  }
  public void populateContextForView(
      final Map<String, Object> context, final TaskDefinition taskDefinition) {
    super.populateContextForView(context, taskDefinition);

    context.put("zs_url", taskDefinition.getConfiguration().get("zs_url"));
    context.put("api_key", taskDefinition.getConfiguration().get("api_key"));
    context.put("api_secret", taskDefinition.getConfiguration().get("api_secret"));
    context.put("base_url", taskDefinition.getConfiguration().get("base_url"));
    context.put("app_name", taskDefinition.getConfiguration().get("app_name"));
    context.put("zsversion", taskDefinition.getConfiguration().get("zsversion"));
    context.put("custom_options", taskDefinition.getConfiguration().get("custom_options"));
    context.put("retry", taskDefinition.getConfiguration().get("retry"));
    context.put("waittime", taskDefinition.getConfiguration().get("waittime"));
  }
  public void validate(final ActionParametersMap params, final ErrorCollection errorCollection) {
    super.validate(params, errorCollection);

    this.validator.params = params;
    this.validator.errorCollection = errorCollection;
    this.errorCollection = errorCollection;

    validator.validateZsUrl();
    validator.validateApiKey();
    validator.validateApiSecret();
    validator.validateAppName();
    validator.validateBaseUrl();
    validator.validateZsVersion();
    validateRetry(params.getString("retry"));
    validateWaittime(params.getString("waittime"));
  }
 @Override
 public void populateContextForCreate(@NotNull final Map<String, Object> context) {
   super.populateContextForCreate(context);
 }