Skip to content

Commit

Permalink
#30669 add ContentImportForm
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinogiardino committed Nov 19, 2024
1 parent 95e393b commit f14fa05
Showing 1 changed file with 63 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package com.dotcms.rest.api.v1.contentImport;

import com.dotcms.repackage.javax.validation.constraints.NotNull;
import com.dotcms.rest.api.Validated;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* Form object that represents the JSON parameters for content import operations.
*/
public class ContentImportForm extends Validated {

@NotNull(message = "Content Type is required")
private final String contentType;

private final String language;

@NotNull(message = "Workflow Action ID is required")
private final String workflowActionId;

private final List<String> fields;

@JsonCreator
public ContentImportForm(
@JsonProperty("contentType") final String contentType,
@JsonProperty("language") final String language,
@JsonProperty("workflowActionId") final String workflowActionId,
@JsonProperty("fields") final List<String> fields) {
super();
this.contentType = contentType;
this.language = language;
this.workflowActionId = workflowActionId;
this.fields = fields;
}

public String getContentType() {
return contentType;
}

public String getLanguage() {
return language;
}

public String getWorkflowActionId() {
return workflowActionId;
}

public List<String> getFields() {
return fields;
}

@Override
public String toString() {
return "ContentImportForm{" +
"contentType='" + contentType + '\'' +
", language='" + language + '\'' +
", workflowActionId='" + workflowActionId + '\'' +
", fields=" + fields +
'}';
}
}

0 comments on commit f14fa05

Please sign in to comment.