Merge branch 'dmp-refactoring' of https://code-repo.d4science.org/MaDgiK-CITE/argos into dmp-refactoring
# Conflicts: # dmp-backend/Dockerfile # dmp-backend/Dockerfile.CI
This commit is contained in:
commit
a5099d8d5d
|
@ -14,7 +14,7 @@ COPY annotation /build/annotation/
|
||||||
COPY annotation-web /build/annotation-web/
|
COPY annotation-web /build/annotation-web/
|
||||||
COPY settings.xml /root/.m2/settings.xml
|
COPY settings.xml /root/.m2/settings.xml
|
||||||
RUN rm -f /build/annotation-web/src/main/resources/config/app.env
|
RUN rm -f /build/annotation-web/src/main/resources/config/app.env
|
||||||
RUN rm -f /build/annotation-web/src/main/resources/config/*-dev.yml
|
RUN rm -f /build/annotation-web/src/main/resources/config/*-devel.yml
|
||||||
RUN rm -f /build/annotation-web/src/main/resources/logging/*.xml
|
RUN rm -f /build/annotation-web/src/main/resources/logging/*.xml
|
||||||
RUN rm -f /build/annotation-web/src/main/resources/certificates/*.crt
|
RUN rm -f /build/annotation-web/src/main/resources/certificates/*.crt
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class AnnotationEntitiesTouchedIntegrationEventHandlerImpl implements Ann
|
||||||
data.setCreatedAt(Instant.now());
|
data.setCreatedAt(Instant.now());
|
||||||
data.setUpdatedAt(Instant.now());
|
data.setUpdatedAt(Instant.now());
|
||||||
data.setIsActive(IsActive.Active);
|
data.setIsActive(IsActive.Active);
|
||||||
|
tenantEntityManager.persist(data);
|
||||||
}
|
}
|
||||||
updatedCreatedIds.add(data.getId());
|
updatedCreatedIds.add(data.getId());
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,19 +180,6 @@
|
||||||
</property>
|
</property>
|
||||||
</activation>
|
</activation>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
|
||||||
<id>cite-dev</id>
|
|
||||||
<repositories>
|
|
||||||
<repository>
|
|
||||||
<id>cite-maven</id>
|
|
||||||
<name>CITE Maven Repository</name>
|
|
||||||
<url>https://crepo.cite.gr/repository/cite-maven/</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
|
||||||
<activation>
|
|
||||||
<activeByDefault>true</activeByDefault>
|
|
||||||
</activation>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
|
@ -14,7 +14,7 @@ COPY core /build/core/
|
||||||
COPY web /build/web/
|
COPY web /build/web/
|
||||||
COPY settings.xml /root/.m2/settings.xml
|
COPY settings.xml /root/.m2/settings.xml
|
||||||
RUN rm -f /build/web/src/main/resources/config/*-devel.yml
|
RUN rm -f /build/web/src/main/resources/config/*-devel.yml
|
||||||
RUN rm -f /build/annotation-web/src/main/resources/logging/*.xml
|
RUN rm -f /build/web/src/main/resources/logging/*.xml
|
||||||
|
|
||||||
WORKDIR /build/
|
WORKDIR /build/
|
||||||
|
|
||||||
|
@ -34,6 +34,6 @@ ARG REVISION
|
||||||
ENV SERVER_PORT=8080
|
ENV SERVER_PORT=8080
|
||||||
EXPOSE ${SERVER_PORT}
|
EXPOSE ${SERVER_PORT}
|
||||||
|
|
||||||
COPY --from=build-stage /build/web/target/web-${REVISION}.jar /app.jar
|
COPY --from=build-stage /build/web/target/web-${REVISION}.jar /app/app.jar
|
||||||
|
|
||||||
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=${PROFILE}", "-Dspring.config.additional-location=/files/config/", "-cp", "/app/app.jar"]
|
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-Dspring.profiles.active=${PROFILE}", "-Dspring.config.additional-location=file:/config/", "-jar", "/app/app.jar"]
|
|
@ -3,6 +3,10 @@
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>core</artifactId>
|
||||||
|
<version>${revision}</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>eu.eudat</groupId>
|
<groupId>eu.eudat</groupId>
|
||||||
<artifactId>dmp-backend</artifactId>
|
<artifactId>dmp-backend</artifactId>
|
||||||
|
@ -10,13 +14,9 @@
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>eu.eudat</groupId>
|
|
||||||
<artifactId>core</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
<packaging>${packaging.type}</packaging>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
|
<maven.compiler.release>21</maven.compiler.release>
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
|
@ -28,8 +28,6 @@ public class SectionEntity{
|
||||||
@XmlElementWrapper(name = "fieldSets")
|
@XmlElementWrapper(name = "fieldSets")
|
||||||
@XmlElement(name = "fieldSet")
|
@XmlElement(name = "fieldSet")
|
||||||
private List<FieldSetEntity> fieldSets;
|
private List<FieldSetEntity> fieldSets;
|
||||||
@XmlAttribute(name="multiplicity")
|
|
||||||
private Boolean multiplicity;
|
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -103,14 +101,6 @@ public class SectionEntity{
|
||||||
this.numbering = numbering;
|
this.numbering = numbering;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getMultiplicity() {
|
|
||||||
return multiplicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMultiplicity(Boolean multiplicity) {
|
|
||||||
this.multiplicity = multiplicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<FieldEntity> getAllField(){
|
public List<FieldEntity> getAllField(){
|
||||||
List<FieldEntity> fieldEntities = new ArrayList<>();
|
List<FieldEntity> fieldEntities = new ArrayList<>();
|
||||||
if (this.getFieldSets() != null){
|
if (this.getFieldSets() != null){
|
||||||
|
|
|
@ -53,7 +53,6 @@ public class SectionCommonModelBuilder extends BaseCommonModelBuilder<SectionMod
|
||||||
m.setDescription(d.getDescription());
|
m.setDescription(d.getDescription());
|
||||||
m.setOrdinal(d.getOrdinal());
|
m.setOrdinal(d.getOrdinal());
|
||||||
m.setDefaultVisibility(d.isDefaultVisibility());
|
m.setDefaultVisibility(d.isDefaultVisibility());
|
||||||
m.setMultiplicity(d.getMultiplicity());
|
|
||||||
m.setNumbering(d.getNumbering());
|
m.setNumbering(d.getNumbering());
|
||||||
m.setTitle(d.getTitle());
|
m.setTitle(d.getTitle());
|
||||||
m.setExtendedDescription(d.getExtendedDescription());
|
m.setExtendedDescription(d.getExtendedDescription());
|
||||||
|
|
|
@ -54,7 +54,6 @@ public class SectionBuilder extends BaseBuilder<Section, SectionEntity> {
|
||||||
if (fields.hasField(this.asIndexer(Section._description))) m.setDescription(d.getDescription());
|
if (fields.hasField(this.asIndexer(Section._description))) m.setDescription(d.getDescription());
|
||||||
if (fields.hasField(this.asIndexer(Section._ordinal))) m.setOrdinal(d.getOrdinal());
|
if (fields.hasField(this.asIndexer(Section._ordinal))) m.setOrdinal(d.getOrdinal());
|
||||||
if (fields.hasField(this.asIndexer(Section._defaultVisibility))) m.setDefaultVisibility(d.isDefaultVisibility());
|
if (fields.hasField(this.asIndexer(Section._defaultVisibility))) m.setDefaultVisibility(d.isDefaultVisibility());
|
||||||
if (fields.hasField(this.asIndexer(Section._multiplicity))) m.setMultiplicity(d.getMultiplicity());
|
|
||||||
if (fields.hasField(this.asIndexer(Section._numbering))) m.setNumbering(d.getNumbering());
|
if (fields.hasField(this.asIndexer(Section._numbering))) m.setNumbering(d.getNumbering());
|
||||||
if (fields.hasField(this.asIndexer(Section._title))) m.setTitle(d.getTitle());
|
if (fields.hasField(this.asIndexer(Section._title))) m.setTitle(d.getTitle());
|
||||||
if (fields.hasField(this.asIndexer(Section._extendedDescription))) m.setExtendedDescription(d.getExtendedDescription());
|
if (fields.hasField(this.asIndexer(Section._extendedDescription))) m.setExtendedDescription(d.getExtendedDescription());
|
||||||
|
|
|
@ -14,9 +14,6 @@ public class Section {
|
||||||
public final static String _defaultVisibility = "defaultVisibility";
|
public final static String _defaultVisibility = "defaultVisibility";
|
||||||
private Boolean defaultVisibility;
|
private Boolean defaultVisibility;
|
||||||
|
|
||||||
public final static String _multiplicity = "multiplicity";
|
|
||||||
private Boolean multiplicity;
|
|
||||||
|
|
||||||
public final static String _numbering = "numbering";
|
public final static String _numbering = "numbering";
|
||||||
private String numbering; //TODO maybe remove
|
private String numbering; //TODO maybe remove
|
||||||
|
|
||||||
|
@ -59,14 +56,6 @@ public class Section {
|
||||||
this.defaultVisibility = defaultVisibility;
|
this.defaultVisibility = defaultVisibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getMultiplicity() {
|
|
||||||
return multiplicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMultiplicity(Boolean multiplicity) {
|
|
||||||
this.multiplicity = multiplicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNumbering() {
|
public String getNumbering() {
|
||||||
return numbering;
|
return numbering;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ public class DescriptionSectionToDatasetSectionMapper {
|
||||||
model.setOrdinal(section.getOrdinal());
|
model.setOrdinal(section.getOrdinal());
|
||||||
model.setTitle(section.getTitle());
|
model.setTitle(section.getTitle());
|
||||||
model.setSections(section.getSections().stream().map(x-> this.toPublicModel(x, page)).toList());
|
model.setSections(section.getSections().stream().map(x-> this.toPublicModel(x, page)).toList());
|
||||||
model.setMultiplicity(section.getMultiplicity());
|
|
||||||
model.setDefaultVisibility(section.getDefaultVisibility());
|
model.setDefaultVisibility(section.getDefaultVisibility());
|
||||||
model.setNumbering(section.getNumbering());
|
model.setNumbering(section.getNumbering());
|
||||||
model.setPage("page_" + page);
|
model.setPage("page_" + page);
|
||||||
|
|
|
@ -232,14 +232,6 @@ public class ReferencePersist {
|
||||||
@Override
|
@Override
|
||||||
protected List<Specification> specifications(ReferencePersist item) {
|
protected List<Specification> specifications(ReferencePersist item) {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
this.spec()
|
|
||||||
.iff(() -> this.isValidGuid(item.getId()))
|
|
||||||
.must(() -> this.isValidHash(item.getHash()))
|
|
||||||
.failOn(ReferencePersist._hash).failWith(messageSource.getMessage("Validation_Required", new Object[]{ReferencePersist._hash}, LocaleContextHolder.getLocale())),
|
|
||||||
this.spec()
|
|
||||||
.iff(() -> !this.isValidGuid(item.getId()))
|
|
||||||
.must(() -> !this.isValidHash(item.getHash()))
|
|
||||||
.failOn(ReferencePersist._hash).failWith(messageSource.getMessage("Validation_OverPosting", new Object[]{}, LocaleContextHolder.getLocale())),
|
|
||||||
this.spec()
|
this.spec()
|
||||||
.must(() -> !this.isEmpty(item.getLabel()))
|
.must(() -> !this.isEmpty(item.getLabel()))
|
||||||
.failOn(ReferencePersist._label).failWith(messageSource.getMessage("Validation_Required", new Object[]{ReferencePersist._label}, LocaleContextHolder.getLocale())),
|
.failOn(ReferencePersist._label).failWith(messageSource.getMessage("Validation_Required", new Object[]{ReferencePersist._label}, LocaleContextHolder.getLocale())),
|
||||||
|
|
|
@ -28,10 +28,6 @@ public class SectionPersist {
|
||||||
|
|
||||||
public static final String _defaultVisibility = "defaultVisibility";
|
public static final String _defaultVisibility = "defaultVisibility";
|
||||||
|
|
||||||
private Boolean multiplicity = null;
|
|
||||||
|
|
||||||
public static final String _multiplicity = "multiplicity";
|
|
||||||
|
|
||||||
private String title = null;
|
private String title = null;
|
||||||
|
|
||||||
public static final String _title = "title";
|
public static final String _title = "title";
|
||||||
|
@ -72,13 +68,6 @@ public class SectionPersist {
|
||||||
this.defaultVisibility = defaultVisibility;
|
this.defaultVisibility = defaultVisibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getMultiplicity() {
|
|
||||||
return multiplicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMultiplicity(Boolean multiplicity) {
|
|
||||||
this.multiplicity = multiplicity;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
|
@ -145,9 +134,6 @@ public class SectionPersist {
|
||||||
this.spec()
|
this.spec()
|
||||||
.must(() -> !this.isNull(item.getDefaultVisibility()))
|
.must(() -> !this.isNull(item.getDefaultVisibility()))
|
||||||
.failOn(SectionPersist._defaultVisibility).failWith(messageSource.getMessage("Validation_Required", new Object[]{SectionPersist._defaultVisibility}, LocaleContextHolder.getLocale())),
|
.failOn(SectionPersist._defaultVisibility).failWith(messageSource.getMessage("Validation_Required", new Object[]{SectionPersist._defaultVisibility}, LocaleContextHolder.getLocale())),
|
||||||
this.spec()
|
|
||||||
.must(() -> !this.isNull(item.getMultiplicity()))
|
|
||||||
.failOn(SectionPersist._multiplicity).failWith(messageSource.getMessage("Validation_Required", new Object[]{SectionPersist._multiplicity}, LocaleContextHolder.getLocale())),
|
|
||||||
this.spec()
|
this.spec()
|
||||||
.must(() -> !this.isEmpty(item.getTitle()))
|
.must(() -> !this.isEmpty(item.getTitle()))
|
||||||
.failOn(SectionPersist._title).failWith(messageSource.getMessage("Validation_Required", new Object[]{SectionPersist._title}, LocaleContextHolder.getLocale())),
|
.failOn(SectionPersist._title).failWith(messageSource.getMessage("Validation_Required", new Object[]{SectionPersist._title}, LocaleContextHolder.getLocale())),
|
||||||
|
|
|
@ -560,6 +560,7 @@ public class DescriptionServiceImpl implements DescriptionService {
|
||||||
if (referenceEntity == null){
|
if (referenceEntity == null){
|
||||||
referenceEntity = new ReferenceEntity();
|
referenceEntity = new ReferenceEntity();
|
||||||
referenceEntity.setId(UUID.randomUUID());
|
referenceEntity.setId(UUID.randomUUID());
|
||||||
|
referenceEntity.setLabel(referencePersist.getLabel());
|
||||||
referenceEntity.setIsActive(IsActive.Active);
|
referenceEntity.setIsActive(IsActive.Active);
|
||||||
referenceEntity.setCreatedAt(Instant.now());
|
referenceEntity.setCreatedAt(Instant.now());
|
||||||
referenceEntity.setTypeId(fieldEntity.getReferenceTypeId());
|
referenceEntity.setTypeId(fieldEntity.getReferenceTypeId());
|
||||||
|
|
|
@ -316,7 +316,6 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
data.setDescription(persist.getDescription());
|
data.setDescription(persist.getDescription());
|
||||||
data.setOrdinal(persist.getOrdinal());
|
data.setOrdinal(persist.getOrdinal());
|
||||||
data.setDefaultVisibility(persist.getDefaultVisibility());
|
data.setDefaultVisibility(persist.getDefaultVisibility());
|
||||||
data.setMultiplicity(persist.getMultiplicity());
|
|
||||||
data.setTitle(persist.getTitle());
|
data.setTitle(persist.getTitle());
|
||||||
|
|
||||||
if (!this.conventionService.isListNullOrEmpty(persist.getSections())) {
|
if (!this.conventionService.isListNullOrEmpty(persist.getSections())) {
|
||||||
|
@ -329,14 +328,14 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
if (!this.conventionService.isListNullOrEmpty(persist.getFieldSets())) {
|
if (!this.conventionService.isListNullOrEmpty(persist.getFieldSets())) {
|
||||||
data.setFieldSets(new ArrayList<>());
|
data.setFieldSets(new ArrayList<>());
|
||||||
for (FieldSetPersist fieldSetPersist : persist.getFieldSets()) {
|
for (FieldSetPersist fieldSetPersist : persist.getFieldSets()) {
|
||||||
data.getFieldSets().add(this.buildFieldSetEntity(fieldSetPersist, persist.getMultiplicity()));
|
data.getFieldSets().add(this.buildFieldSetEntity(fieldSetPersist));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private @NotNull FieldSetEntity buildFieldSetEntity(FieldSetPersist persist, Boolean multiplicity) throws InvalidApplicationException {
|
private @NotNull FieldSetEntity buildFieldSetEntity(FieldSetPersist persist) throws InvalidApplicationException {
|
||||||
FieldSetEntity data = new FieldSetEntity();
|
FieldSetEntity data = new FieldSetEntity();
|
||||||
if (persist == null)
|
if (persist == null)
|
||||||
return data;
|
return data;
|
||||||
|
@ -348,7 +347,7 @@ public class DescriptionTemplateServiceImpl implements DescriptionTemplateServic
|
||||||
data.setNumbering(persist.getNumbering());
|
data.setNumbering(persist.getNumbering());
|
||||||
data.setAdditionalInformation(persist.getAdditionalInformation());
|
data.setAdditionalInformation(persist.getAdditionalInformation());
|
||||||
data.setExtendedDescription(persist.getExtendedDescription());
|
data.setExtendedDescription(persist.getExtendedDescription());
|
||||||
if (persist.getMultiplicity() != null && multiplicity)
|
if (persist.getMultiplicity() != null)
|
||||||
data.setMultiplicity(this.buildMultiplicityEntity(persist.getMultiplicity()));
|
data.setMultiplicity(this.buildMultiplicityEntity(persist.getMultiplicity()));
|
||||||
data.setHasCommentField(persist.getHasCommentField());
|
data.setHasCommentField(persist.getHasCommentField());
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>eu.eudat</groupId>
|
<groupId>eu.eudat</groupId>
|
||||||
<artifactId>dmp-backend</artifactId>
|
<artifactId>dmp-backend</artifactId>
|
||||||
|
<name>OpenDMP Backend Parent</name>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
@ -14,8 +15,8 @@
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>web</module>
|
|
||||||
<module>core</module>
|
<module>core</module>
|
||||||
|
<module>web</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>dmp-backend</groupId>
|
|
||||||
<artifactId>web</artifactId>
|
<artifactId>web</artifactId>
|
||||||
<version>${revision}</version>
|
<version>${revision}</version>
|
||||||
<packaging>${packaging.type}</packaging>
|
<packaging>${packaging.type}</packaging>
|
||||||
|
@ -22,6 +21,7 @@
|
||||||
<maven.compiler.source>21</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
<maven.compiler.target>21</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<revision>1.0.0-SNAPSHOT</revision>
|
<revision>1.0.0-SNAPSHOT</revision>
|
||||||
|
<packaging.type>jar</packaging.type>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -166,7 +166,6 @@ public class PublicDatasetsDescriptionDocumentation {
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._description),
|
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._description),
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._extendedDescription),
|
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._extendedDescription),
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._title),
|
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._title),
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._multiplicity),
|
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._numbering),
|
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._numbering),
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._ordinal),
|
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._ordinal),
|
||||||
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._sections),
|
String.join(".", Description._descriptionTemplate, DescriptionTemplate._definition, Definition._pages, Page._sections, Section._sections),
|
||||||
|
|
|
@ -124,8 +124,9 @@ export class ReferenceService {
|
||||||
filterFn: (searchQuery: string, data?: any) => this.searchWithDefinition(this.buildAutocompleteSearchLookup(typeId, searchQuery)).pipe(map(x => x)),
|
filterFn: (searchQuery: string, data?: any) => this.searchWithDefinition(this.buildAutocompleteSearchLookup(typeId, searchQuery)).pipe(map(x => x)),
|
||||||
getSelectedItem: (selectedItem: any) => this.query(this.buildAutocompleteSearchSelectedItemsLookup([typeId], null, null, null, [selectedItem])).pipe(map(x => x.items[0])),
|
getSelectedItem: (selectedItem: any) => this.query(this.buildAutocompleteSearchSelectedItemsLookup([typeId], null, null, null, [selectedItem])).pipe(map(x => x.items[0])),
|
||||||
displayFn: (item: Reference) => item.label,
|
displayFn: (item: Reference) => item.label,
|
||||||
|
subtitleFn: (item: Reference) => item?.sourceType === ReferenceSourceType.External ? this.language.instant('REFERENCE-FIELD-COMPONENT.EXTERNAL-SOURCE') + ': ' + item.source : this.language.instant('REFERENCE-FIELD-COMPONENT.INTERNAL-SOURCE'),
|
||||||
titleFn: (item: Reference) => item.label,
|
titleFn: (item: Reference) => item.label,
|
||||||
valueAssign: (item: Reference) => item.id,
|
valueAssign: (item: Reference) => item,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
|
|
||||||
isNew = true;
|
isNew = true;
|
||||||
isDeleted = false;
|
isDeleted = false;
|
||||||
goToNextStep = true;
|
|
||||||
item: Dmp;
|
item: Dmp;
|
||||||
selectedBlueprint: DmpBlueprint;
|
selectedBlueprint: DmpBlueprint;
|
||||||
step: number = 0;
|
step: number = 0;
|
||||||
|
@ -224,10 +223,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) {
|
if (this.editorModel.status == DmpStatus.Finalized || this.isDeleted) {
|
||||||
this.formGroup.disable();
|
this.formGroup.disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.item != null && this.goToNextStep) {
|
|
||||||
this.nextStep();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshData(): void {
|
refreshData(): void {
|
||||||
|
@ -346,11 +341,14 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
this.formGroup.get('blueprint').setValue(this.selectedBlueprint.id);
|
this.formGroup.get('blueprint').setValue(this.selectedBlueprint.id);
|
||||||
|
|
||||||
const goToNextStep: boolean = this.formGroup.get('label').valid && this.formGroup.get('description').valid;
|
const goToNextStep: boolean = this.formGroup.get('label').valid && this.formGroup.get('description').valid;
|
||||||
this.buildFormAfterBlueprintSelection(goToNextStep);
|
if (goToNextStep) {
|
||||||
|
this.buildFormAfterBlueprintSelection();
|
||||||
|
this.nextStep();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildFormAfterBlueprintSelection(goToNextStep: boolean = true) {
|
private buildFormAfterBlueprintSelection() {
|
||||||
const dmp: Dmp = {
|
const dmp: Dmp = {
|
||||||
label: this.formGroup.get('label').value,
|
label: this.formGroup.get('label').value,
|
||||||
description: this.formGroup.get('description').value,
|
description: this.formGroup.get('description').value,
|
||||||
|
@ -359,7 +357,6 @@ export class DmpEditorComponent extends BaseEditor<DmpEditorModel, Dmp> implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
this.prepareForm(dmp);
|
this.prepareForm(dmp);
|
||||||
this.goToNextStep = true; //reset
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -14,7 +14,7 @@ COPY notification /build/notification/
|
||||||
COPY notification-web /build/notification-web/
|
COPY notification-web /build/notification-web/
|
||||||
COPY settings.xml /root/.m2/settings.xml
|
COPY settings.xml /root/.m2/settings.xml
|
||||||
RUN rm -f /build/notification-web/src/main/resources/config/app.env
|
RUN rm -f /build/notification-web/src/main/resources/config/app.env
|
||||||
RUN rm -f /build/notification-web/src/main/resources/config/*-dev.yml
|
RUN rm -f /build/notification-web/src/main/resources/config/*-devel.yml
|
||||||
RUN rm -f /build/notification-web/src/main/resources/logging/*.xml
|
RUN rm -f /build/notification-web/src/main/resources/logging/*.xml
|
||||||
RUN rm -f /build/notification-web/src/main/resources/certificates/*.crt
|
RUN rm -f /build/notification-web/src/main/resources/certificates/*.crt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue