code styles
This commit is contained in:
parent
1474eda8b9
commit
a591c66875
|
@ -1,14 +1,14 @@
|
|||
package org.opencdmp.commons.types.externalfetcher;
|
||||
|
||||
import org.opencdmp.service.externalfetcher.config.entities.ResultFieldsMappingConfiguration;
|
||||
import jakarta.xml.bind.annotation.XmlElement;
|
||||
import org.opencdmp.service.externalfetcher.config.entities.ResultFieldsMappingConfiguration;
|
||||
|
||||
public class ResultFieldsMappingConfigurationEntity implements ResultFieldsMappingConfiguration {
|
||||
private String code;
|
||||
private String responsePath;
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
return this.code;
|
||||
}
|
||||
|
||||
@XmlElement(name = "code")
|
||||
|
@ -17,7 +17,7 @@ public class ResultFieldsMappingConfigurationEntity implements ResultFieldsMappi
|
|||
}
|
||||
|
||||
public String getResponsePath() {
|
||||
return responsePath;
|
||||
return this.responsePath;
|
||||
}
|
||||
|
||||
@XmlElement(name = "responsePath")
|
||||
|
|
|
@ -38,7 +38,7 @@ public class FieldSet {
|
|||
private List<Field> fields;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
|
@ -46,7 +46,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public Integer getOrdinal() {
|
||||
return ordinal;
|
||||
return this.ordinal;
|
||||
}
|
||||
|
||||
public void setOrdinal(Integer ordinal) {
|
||||
|
@ -54,7 +54,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public String getNumbering() {
|
||||
return numbering;
|
||||
return this.numbering;
|
||||
}
|
||||
|
||||
public void setNumbering(String numbering) {
|
||||
|
@ -62,7 +62,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
|
@ -70,7 +70,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
|
@ -78,7 +78,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public String getExtendedDescription() {
|
||||
return extendedDescription;
|
||||
return this.extendedDescription;
|
||||
}
|
||||
|
||||
public void setExtendedDescription(String extendedDescription) {
|
||||
|
@ -86,7 +86,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public String getAdditionalInformation() {
|
||||
return additionalInformation;
|
||||
return this.additionalInformation;
|
||||
}
|
||||
|
||||
public void setAdditionalInformation(String additionalInformation) {
|
||||
|
@ -94,7 +94,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public Multiplicity getMultiplicity() {
|
||||
return multiplicity;
|
||||
return this.multiplicity;
|
||||
}
|
||||
|
||||
public void setMultiplicity(Multiplicity multiplicity) {
|
||||
|
@ -102,7 +102,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public Boolean getHasMultiplicity() {
|
||||
return hasMultiplicity;
|
||||
return this.hasMultiplicity;
|
||||
}
|
||||
|
||||
public void setHasMultiplicity(Boolean hasMultiplicity) {
|
||||
|
@ -110,7 +110,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public Boolean getHasCommentField() {
|
||||
return hasCommentField;
|
||||
return this.hasCommentField;
|
||||
}
|
||||
|
||||
public void setHasCommentField(Boolean hasCommentField) {
|
||||
|
@ -118,7 +118,7 @@ public class FieldSet {
|
|||
}
|
||||
|
||||
public List<Field> getFields() {
|
||||
return fields;
|
||||
return this.fields;
|
||||
}
|
||||
|
||||
public void setFields(List<Field> fields) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.opencdmp.model.persist.descriptiontemplatedefinition;
|
||||
|
||||
import org.opencdmp.commons.validation.BaseValidator;
|
||||
import gr.cite.tools.validation.ValidatorFactory;
|
||||
import gr.cite.tools.validation.specification.Specification;
|
||||
import org.opencdmp.commons.validation.BaseValidator;
|
||||
import org.opencdmp.convention.ConventionService;
|
||||
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
|
@ -16,47 +16,47 @@ import java.util.List;
|
|||
|
||||
public class FieldSetPersist {
|
||||
|
||||
private String id = null;
|
||||
private String id;
|
||||
|
||||
public static final String _id = "id";
|
||||
|
||||
private Integer ordinal = null;
|
||||
private Integer ordinal;
|
||||
|
||||
public static final String _ordinal = "ordinal";
|
||||
|
||||
private String numbering = null;
|
||||
private String numbering;
|
||||
|
||||
public static final String _numbering = "numbering";
|
||||
|
||||
private String title = null;
|
||||
private String title;
|
||||
|
||||
public static final String _title = "title";
|
||||
|
||||
private String description = null;
|
||||
private String description;
|
||||
|
||||
public static final String _description = "description";
|
||||
|
||||
private String extendedDescription = null;
|
||||
private String extendedDescription;
|
||||
public static final String _extendedDescription = "extendedDescription";
|
||||
|
||||
private String additionalInformation = null;
|
||||
private String additionalInformation;
|
||||
public static final String _additionalInformation = "additionalInformation";
|
||||
|
||||
private MultiplicityPersist multiplicity = null;
|
||||
private MultiplicityPersist multiplicity;
|
||||
public static final String _multiplicity = "multiplicity";
|
||||
|
||||
private Boolean hasMultiplicity;
|
||||
public static final String _hasMultiplicity = "hasMultiplicity";
|
||||
|
||||
|
||||
private Boolean hasCommentField = null;
|
||||
private Boolean hasCommentField;
|
||||
|
||||
private List<FieldPersist> fields = null;
|
||||
private List<FieldPersist> fields;
|
||||
|
||||
public static final String _fields = "fields";
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
|
@ -64,7 +64,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public Integer getOrdinal() {
|
||||
return ordinal;
|
||||
return this.ordinal;
|
||||
}
|
||||
|
||||
public void setOrdinal(Integer ordinal) {
|
||||
|
@ -72,7 +72,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public String getNumbering() {
|
||||
return numbering;
|
||||
return this.numbering;
|
||||
}
|
||||
|
||||
public void setNumbering(String numbering) {
|
||||
|
@ -80,7 +80,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
return this.title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
|
@ -88,7 +88,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
return this.description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
|
@ -96,7 +96,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public String getExtendedDescription() {
|
||||
return extendedDescription;
|
||||
return this.extendedDescription;
|
||||
}
|
||||
|
||||
public void setExtendedDescription(String extendedDescription) {
|
||||
|
@ -104,7 +104,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public String getAdditionalInformation() {
|
||||
return additionalInformation;
|
||||
return this.additionalInformation;
|
||||
}
|
||||
|
||||
public void setAdditionalInformation(String additionalInformation) {
|
||||
|
@ -112,7 +112,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public MultiplicityPersist getMultiplicity() {
|
||||
return multiplicity;
|
||||
return this.multiplicity;
|
||||
}
|
||||
|
||||
public void setMultiplicity(MultiplicityPersist multiplicity) {
|
||||
|
@ -120,7 +120,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public Boolean getHasCommentField() {
|
||||
return hasCommentField;
|
||||
return this.hasCommentField;
|
||||
}
|
||||
|
||||
public void setHasCommentField(Boolean hasCommentField) {
|
||||
|
@ -128,7 +128,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public List<FieldPersist> getFields() {
|
||||
return fields;
|
||||
return this.fields;
|
||||
}
|
||||
|
||||
public void setFields(List<FieldPersist> fields) {
|
||||
|
@ -136,7 +136,7 @@ public class FieldSetPersist {
|
|||
}
|
||||
|
||||
public Boolean getHasMultiplicity() {
|
||||
return hasMultiplicity;
|
||||
return this.hasMultiplicity;
|
||||
}
|
||||
|
||||
public void setHasMultiplicity(Boolean hasMultiplicity) {
|
||||
|
@ -169,19 +169,19 @@ public class FieldSetPersist {
|
|||
return Arrays.asList(
|
||||
this.spec()
|
||||
.must(() -> !this.isEmpty(item.getId()))
|
||||
.failOn(FieldSetPersist._id).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._id}, LocaleContextHolder.getLocale())),
|
||||
.failOn(FieldSetPersist._id).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._id}, LocaleContextHolder.getLocale())),
|
||||
this.spec()
|
||||
.must(() -> !this.isNull(item.getOrdinal()))
|
||||
.failOn(FieldSetPersist._ordinal).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._ordinal}, LocaleContextHolder.getLocale())),
|
||||
.failOn(FieldSetPersist._ordinal).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._ordinal}, LocaleContextHolder.getLocale())),
|
||||
this.spec()
|
||||
.must(() -> !this.isEmpty(item.getNumbering()))
|
||||
.failOn(FieldSetPersist._numbering).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._numbering}, LocaleContextHolder.getLocale())),
|
||||
.failOn(FieldSetPersist._numbering).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._numbering}, LocaleContextHolder.getLocale())),
|
||||
this.spec()
|
||||
.must(() -> !this.isNull(item.getHasMultiplicity()))
|
||||
.failOn(FieldSetPersist._hasMultiplicity).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._hasMultiplicity}, LocaleContextHolder.getLocale())),
|
||||
.failOn(FieldSetPersist._hasMultiplicity).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._hasMultiplicity}, LocaleContextHolder.getLocale())),
|
||||
this.spec()
|
||||
.must(() -> !this.isEmpty(item.getTitle()))
|
||||
.failOn(FieldSetPersist._title).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._title}, LocaleContextHolder.getLocale())),
|
||||
.failOn(FieldSetPersist._title).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{FieldSetPersist._title}, LocaleContextHolder.getLocale())),
|
||||
this.refSpec()
|
||||
.iff(() -> !this.isNull(item.getMultiplicity()))
|
||||
.on(FieldSetPersist._multiplicity)
|
||||
|
|
|
@ -2,9 +2,9 @@ package org.opencdmp.model.persist.descriptiontemplatedefinition.fielddata;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import gr.cite.tools.validation.specification.Specification;
|
||||
import org.opencdmp.commons.enums.FieldType;
|
||||
import org.opencdmp.commons.validation.BaseValidator;
|
||||
import gr.cite.tools.validation.specification.Specification;
|
||||
import org.opencdmp.convention.ConventionService;
|
||||
import org.opencdmp.errorcode.ErrorThesaurusProperties;
|
||||
import org.springframework.context.MessageSource;
|
||||
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
})
|
||||
public abstract class BaseFieldDataPersist {
|
||||
|
||||
private String label = null;
|
||||
private String label;
|
||||
|
||||
public static final String _label = "label";
|
||||
|
||||
|
@ -48,7 +48,7 @@ public abstract class BaseFieldDataPersist {
|
|||
public static final String _fieldType = "fieldType";
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
return this.label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
|
@ -56,7 +56,7 @@ public abstract class BaseFieldDataPersist {
|
|||
}
|
||||
|
||||
public FieldType getFieldType() {
|
||||
return fieldType;
|
||||
return this.fieldType;
|
||||
}
|
||||
|
||||
public void setFieldType(FieldType fieldType) {
|
||||
|
@ -73,13 +73,11 @@ public abstract class BaseFieldDataPersist {
|
|||
}
|
||||
|
||||
protected List<Specification> getBaseSpecifications(T item) {
|
||||
List<Specification> specifications = new ArrayList<>();
|
||||
specifications.addAll(Arrays.asList(
|
||||
this.spec()
|
||||
.must(() -> !this.isNull(item.getFieldType()))
|
||||
.failOn(BaseFieldDataPersist._fieldType).failWith(messageSource.getMessage("Validation_Required", new Object[]{BaseFieldDataPersist._fieldType}, LocaleContextHolder.getLocale()))
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
this.spec()
|
||||
.must(() -> !this.isNull(item.getFieldType()))
|
||||
.failOn(BaseFieldDataPersist._fieldType).failWith(this.messageSource.getMessage("Validation_Required", new Object[]{BaseFieldDataPersist._fieldType}, LocaleContextHolder.getLocale()))
|
||||
));
|
||||
return specifications;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue