-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #3737 [API] Add support to export faceted search result with te…
…mplate file (#3739)
- Loading branch information
1 parent
65a1587
commit 18ff88c
Showing
19 changed files
with
990 additions
and
35 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
39 changes: 39 additions & 0 deletions
39
api/src/main/java/com/epam/pipeline/entity/search/SearchTemplateExportColumnData.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,39 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems, Inc. (https://www.epam.com/) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.pipeline.entity.search; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@Builder | ||
public class SearchTemplateExportColumnData { | ||
/** | ||
* Literal column index: 'A' -> 0 'Z' -> 25 'AA' -> 26 | ||
*/ | ||
private String columnStringIndex; | ||
/** | ||
* 0-based row start | ||
*/ | ||
private int rowStartIndex; | ||
/** | ||
* Resolved column values | ||
*/ | ||
private String[] columnValues; | ||
} |
36 changes: 36 additions & 0 deletions
36
api/src/main/java/com/epam/pipeline/entity/search/SearchTemplateExportConfig.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,36 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems, Inc. (https://www.epam.com/) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.pipeline.entity.search; | ||
|
||
import com.epam.pipeline.entity.user.SidImpl; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class SearchTemplateExportConfig { | ||
@JsonProperty("friendly_name") | ||
private String friendlyName; | ||
@JsonProperty("template_path") | ||
private String templatePath; | ||
private Map<String, List<SearchTemplateExportSheetMapping>> mapping; | ||
private List<SidImpl> permissions; | ||
@JsonProperty("save_to") | ||
private String saveTo; | ||
} |
30 changes: 30 additions & 0 deletions
30
api/src/main/java/com/epam/pipeline/entity/search/SearchTemplateExportInfo.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,30 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems, Inc. (https://www.epam.com/) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.pipeline.entity.search; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@Builder | ||
public class SearchTemplateExportInfo { | ||
private String fullPath; | ||
private String storagePath; | ||
private Long storageId; | ||
} |
49 changes: 49 additions & 0 deletions
49
api/src/main/java/com/epam/pipeline/entity/search/SearchTemplateExportSheetMapping.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,49 @@ | ||
/* | ||
* Copyright 2024 EPAM Systems, Inc. (https://www.epam.com/) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.epam.pipeline.entity.search; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@Builder | ||
public class SearchTemplateExportSheetMapping { | ||
private String column; | ||
/** | ||
* 1-based row start | ||
*/ | ||
@JsonProperty("start_row") | ||
private Integer startRow; | ||
/** | ||
* String with placeholders | ||
*/ | ||
private String value; | ||
private boolean unique; | ||
/** | ||
* Some items may not contain values for requested placeholders. | ||
* If so and this flag enabled placeholders shall not be resolved. | ||
* CASE: keep_unresolved=true | ||
* {Placeholder1}/{Placeholder2} -> ResolvedValue/{Placeholder2} | ||
* CASE: keep_unresolved=false | ||
* {Placeholder1}/{Placeholder2} -> ResolvedValue/ | ||
*/ | ||
@JsonProperty("keep_unresolved") | ||
private boolean keepUnresolved; | ||
} |
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
Oops, something went wrong.