-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95e393b
commit f14fa05
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
dotCMS/src/main/java/com/dotcms/rest/api/v1/contentImport/ContentImportForm.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 + | ||
'}'; | ||
} | ||
} |