Pull request #337: RED-3616: Added autoHideSkipped to Entities

Merge in RED/persistence-service from RED-3616 to master

* commit 'ab3f4a27fa860441672bead17b8316d14e53a9b9':
  RED-3616: Added autoHideSkipped to Entities
This commit is contained in:
Dominique Eiflaender 2022-04-05 12:12:13 +02:00
commit 1c7c60f651
8 changed files with 23 additions and 5 deletions

View File

@ -35,6 +35,7 @@ public class Type {
private List<DictionaryEntry> falseRecommendationEntries = new ArrayList<>();
private boolean hasDictionary;
private boolean systemManaged;
private boolean autoHideSkipped;
// For auto-mappers

View File

@ -62,6 +62,8 @@ public class TypeEntity {
private boolean hasDictionary;
@Column
private boolean systemManaged;
@Column
private boolean autoHideSkipped;
@Fetch(FetchMode.SUBSELECT)
@BatchSize(size = 500)

View File

@ -141,7 +141,7 @@ public class DossierTemplateCloneService {
List<TypeEntity> clonedTypes = new ArrayList<>();
var types = dictionaryPersistenceService.getAllTypesForDossierTemplate(dossierTemplateId);
for (TypeEntity t : types) {
TypeEntity te = dictionaryPersistenceService.addType(t.getType(), clonedDossierTemplateId, t.getHexColor(), t.getRecommendationHexColor(), t.getRank(), t.isHint(), t.isCaseInsensitive(), t.isRecommendation(), t.getDescription(), t.isAddToDictionaryAction(), t.getLabel(), null, t.isHasDictionary(), t.isSystemManaged());
TypeEntity te = dictionaryPersistenceService.addType(t.getType(), clonedDossierTemplateId, t.getHexColor(), t.getRecommendationHexColor(), t.getRank(), t.isHint(), t.isCaseInsensitive(), t.isRecommendation(), t.getDescription(), t.isAddToDictionaryAction(), t.getLabel(), null, t.isHasDictionary(), t.isSystemManaged(), t.isAutoHideSkipped());
te.setDossierTemplateId(clonedDossierTemplateId);
clonedTypes.add(te);
for (DictionaryEntryType det : DictionaryEntryType.values()) {

View File

@ -37,7 +37,7 @@ public class DictionaryPersistenceService {
public TypeEntity addType(String type, String dossierTemplateId, String hexColor, String recommendationHexColor, int rank, boolean isHint, boolean caseInsensitive,
boolean isRecommendation, String description, boolean addToDictionaryAction, String label, String dossierId, boolean hasDictionary,
boolean systemManaged) {
boolean systemManaged, boolean autoHideSkipped) {
checkRankAlreadyExists(type, dossierTemplateId, rank, dossierId);
@ -58,6 +58,7 @@ public class DictionaryPersistenceService {
.version(1)
.hasDictionary(hasDictionary)
.systemManaged(systemManaged)
.autoHideSkipped(autoHideSkipped)
.build();
return typeRepository.save(t);

View File

@ -208,7 +208,7 @@ public class DictionaryController implements DictionaryResource {
}
String color = typeRequest.getHexColor();
validateColor(color);
return convert(dictionaryPersistenceService.addType(typeRequest.getType(), typeRequest.getDossierTemplateId(), color, typeRequest.getRecommendationHexColor(), typeRequest.getRank(), typeRequest.isHint(), typeRequest.isCaseInsensitive(), typeRequest.isRecommendation(), typeRequest.getDescription(), typeRequest.isAddToDictionaryAction(), typeRequest.getLabel(), typeRequest.getDossierId(), typeRequest.isHasDictionary(), typeRequest.isSystemManaged()), Type.class);
return convert(dictionaryPersistenceService.addType(typeRequest.getType(), typeRequest.getDossierTemplateId(), color, typeRequest.getRecommendationHexColor(), typeRequest.getRank(), typeRequest.isHint(), typeRequest.isCaseInsensitive(), typeRequest.isRecommendation(), typeRequest.getDescription(), typeRequest.isAddToDictionaryAction(), typeRequest.getLabel(), typeRequest.getDossierId(), typeRequest.isHasDictionary(), typeRequest.isSystemManaged(), typeRequest.isAutoHideSkipped()), Type.class);
}

View File

@ -0,0 +1,12 @@
databaseChangeLog:
- changeSet:
id: add-auto-hide-skipped
author: dom
changes:
- addColumn:
columns:
- column:
name: auto_hide_skipped
type: BOOLEAN
defaultValue: false
tableName: entity

View File

@ -46,4 +46,6 @@ databaseChangeLog:
- include:
file: db/changelog/19-added-has-highlights-to-file.changelog.yaml
- include:
file: db/changelog/20-add-index-information-table.yaml
file: db/changelog/20-add-index-information-table.yaml
- include:
file: db/changelog/21-added-auto-hide-skipped-to-entities.changelog.yaml

View File

@ -25,7 +25,7 @@
</modules>
<properties>
<redaction-service.version>3.90.0</redaction-service.version>
<redaction-service.version>3.93.0</redaction-service.version>
<search-service.version>2.26.0</search-service.version>
<pdftron-redaction-service.version>3.59.0</pdftron-redaction-service.version>
<redaction-report-service.version>3.19.0</redaction-report-service.version>