-
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.
#30882 First commit for the ImportUtil refactor to improve responses.
- Loading branch information
1 parent
85e5c2d
commit 0070d98
Showing
4 changed files
with
118 additions
and
21 deletions.
There are no files selected for viewing
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
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
37 changes: 37 additions & 0 deletions
37
dotCMS/src/main/java/com/dotmarketing/util/importer/AbstractSpecialHeaderInfo.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,37 @@ | ||
package com.dotmarketing.util.importer; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import java.io.Serializable; | ||
import org.immutables.value.Value; | ||
|
||
/** | ||
* Contains information about special header types (Identifier, Workflow Action) and their column | ||
* positions in the CSV file. | ||
*/ | ||
@Value.Style(typeImmutable = "*", typeAbstract = "Abstract*") | ||
@Value.Immutable | ||
@JsonDeserialize(as = SpecialHeaderInfo.class) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public interface AbstractSpecialHeaderInfo extends Serializable { | ||
|
||
/** | ||
* @return The header type found (Identifier, Workflow Action, etc) | ||
*/ | ||
SpecialHeaderType type(); | ||
|
||
/** | ||
* @return Column index where this special header was found | ||
*/ | ||
int columnIndex(); | ||
|
||
/** | ||
* Special header types supported in import | ||
*/ | ||
enum SpecialHeaderType { | ||
IDENTIFIER, | ||
WORKFLOW_ACTION, | ||
NONE | ||
} | ||
|
||
} |
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