refactor: add lombok to hooks module
This commit is contained in:
committed by
Arnold Gálovics
parent
5d1d20e577
commit
5b935eb1ff
+6
@@ -21,11 +21,17 @@ package org.apache.fineract.infrastructure.hooks.data;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class Entity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
private List<String> actions;
|
||||
}
|
||||
|
||||
+11
-8
@@ -19,18 +19,21 @@
|
||||
package org.apache.fineract.infrastructure.hooks.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@Getter
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public final class Event implements Serializable {
|
||||
|
||||
private final String actionName;
|
||||
private final String entityName;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String actionName;
|
||||
private String entityName;
|
||||
|
||||
public static Event instance(final String actionName, final String entityName) {
|
||||
return new Event(actionName, entityName);
|
||||
return new Event().setActionName(actionName).setEntityName(entityName);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-12
@@ -19,26 +19,29 @@
|
||||
package org.apache.fineract.infrastructure.hooks.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@Getter
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public final class Field implements Serializable {
|
||||
|
||||
private final String fieldName;
|
||||
private final String fieldValue;
|
||||
private final String fieldType;
|
||||
private final Boolean optional;
|
||||
private final String placeholder;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String fieldName;
|
||||
private String fieldValue;
|
||||
private String fieldType;
|
||||
private Boolean optional;
|
||||
private String placeholder;
|
||||
|
||||
public static Field fromConfig(final String fieldName, final String fieldValue) {
|
||||
return new Field(fieldName, fieldValue, null, null, null);
|
||||
return new Field().setFieldName(fieldName).setFieldValue(fieldValue);
|
||||
}
|
||||
|
||||
public static Field fromSchema(final String fieldType, final String fieldName, final Boolean optional, final String placeholder) {
|
||||
return new Field(fieldName, null, fieldType, optional, placeholder);
|
||||
return new Field().setFieldName(fieldName).setFieldType(fieldType).setOptional(optional).setPlaceholder(placeholder);
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -21,11 +21,17 @@ package org.apache.fineract.infrastructure.hooks.data;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class Grouping implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
private List<Entity> entities;
|
||||
}
|
||||
|
||||
+27
-22
@@ -21,45 +21,50 @@ package org.apache.fineract.infrastructure.hooks.data;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@Getter
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public final class HookData implements Serializable {
|
||||
|
||||
private final Long id;
|
||||
private final String name;
|
||||
private final String displayName;
|
||||
private final Boolean isActive;
|
||||
private final LocalDate createdAt;
|
||||
private final LocalDate updatedAt;
|
||||
private final Long templateId;
|
||||
private final String templateName;
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Long id;
|
||||
private String name;
|
||||
private String displayName;
|
||||
private Boolean isActive;
|
||||
private LocalDate createdAt;
|
||||
private LocalDate updatedAt;
|
||||
private Long templateId;
|
||||
private String templateName;
|
||||
|
||||
// associations
|
||||
private final List<Event> events;
|
||||
private final List<Field> config;
|
||||
private List<Event> events;
|
||||
private List<Field> config;
|
||||
|
||||
// template data
|
||||
private final List<HookTemplateData> templates;
|
||||
private final List<Grouping> groupings;
|
||||
private List<HookTemplateData> templates;
|
||||
private List<Grouping> groupings;
|
||||
|
||||
public static HookData instance(final Long id, final String name, final String displayName, final boolean isActive,
|
||||
final LocalDate createdAt, final LocalDate updatedAt, final Long templateId, final List<Event> registeredEvents,
|
||||
final List<Field> config, final String templateName) {
|
||||
return new HookData(id, name, displayName, isActive, createdAt, updatedAt, templateId, templateName, registeredEvents, config, null,
|
||||
null);
|
||||
return new HookData().setId(id).setName(name).setDisplayName(displayName).setIsActive(isActive).setCreatedAt(createdAt)
|
||||
.setUpdatedAt(updatedAt).setTemplateId(templateId).setTemplateName(templateName).setEvents(registeredEvents)
|
||||
.setConfig(config);
|
||||
}
|
||||
|
||||
public static HookData template(final List<HookTemplateData> templates, final List<Grouping> groupings) {
|
||||
return new HookData(null, null, null, null, null, null, null, null, null, null, templates, groupings);
|
||||
return new HookData().setTemplates(templates).setGroupings(groupings);
|
||||
}
|
||||
|
||||
public static HookData templateExisting(final HookData hookData, final List<HookTemplateData> templates,
|
||||
final List<Grouping> groupings) {
|
||||
return new HookData(hookData.id, hookData.name, hookData.displayName, hookData.isActive, hookData.createdAt, hookData.updatedAt,
|
||||
hookData.templateId, hookData.templateName, hookData.events, hookData.config, templates, groupings);
|
||||
return new HookData().setId(hookData.id).setName(hookData.name).setDisplayName(hookData.displayName).setIsActive(hookData.isActive)
|
||||
.setCreatedAt(hookData.createdAt).setUpdatedAt(hookData.updatedAt).setTemplateId(hookData.templateId)
|
||||
.setTemplateName(hookData.templateName).setEvents(hookData.events).setConfig(hookData.config).setTemplates(templates)
|
||||
.setGroupings(groupings);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-11
@@ -20,25 +20,26 @@ package org.apache.fineract.infrastructure.hooks.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public final class HookTemplateData implements Serializable {
|
||||
|
||||
private final Long id;
|
||||
private final String name;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
// associations
|
||||
private final List<Field> schema;
|
||||
private List<Field> schema;
|
||||
|
||||
public static HookTemplateData instance(final Long id, final String name, final List<Field> schema) {
|
||||
return new HookTemplateData(id, name, schema);
|
||||
}
|
||||
|
||||
public Long getServiceId() {
|
||||
return id;
|
||||
return new HookTemplateData().setId(id).setName(name).setSchema(schema);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+11
-21
@@ -38,6 +38,10 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom;
|
||||
@@ -46,7 +50,11 @@ import org.springframework.util.CollectionUtils;
|
||||
|
||||
@Entity
|
||||
@Table(name = "m_hook")
|
||||
public class Hook extends AbstractAuditableCustom {
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public final class Hook extends AbstractAuditableCustom {
|
||||
|
||||
@Column(name = "name", nullable = false, length = 100)
|
||||
private String name;
|
||||
@@ -68,8 +76,6 @@ public class Hook extends AbstractAuditableCustom {
|
||||
@JoinColumn(name = "ugd_template_id", referencedColumnName = "id", nullable = true)
|
||||
private Template ugdTemplate;
|
||||
|
||||
protected Hook() {}
|
||||
|
||||
public static Hook fromJson(final JsonCommand command, final HookTemplate template, final Set<HookConfiguration> config,
|
||||
final Set<HookResource> events, final Template ugdTemplate) {
|
||||
final String displayName = command.stringValueOfParameterNamed(displayNameParamName);
|
||||
@@ -103,26 +109,18 @@ public class Hook extends AbstractAuditableCustom {
|
||||
|
||||
private Set<HookConfiguration> associateConfigWithThisHook(final Set<HookConfiguration> config) {
|
||||
for (final HookConfiguration hookConfiguration : config) {
|
||||
hookConfiguration.update(this);
|
||||
hookConfiguration.setHook(this);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
private Set<HookResource> associateEventsWithThisHook(final Set<HookResource> events) {
|
||||
for (final HookResource hookResource : events) {
|
||||
hookResource.update(this);
|
||||
hookResource.setHook(this);
|
||||
}
|
||||
return events;
|
||||
}
|
||||
|
||||
public HookTemplate getHookTemplate() {
|
||||
return this.template;
|
||||
}
|
||||
|
||||
public Template getUgdTemplate() {
|
||||
return this.ugdTemplate;
|
||||
}
|
||||
|
||||
public Long getUgdTemplateId() {
|
||||
Long templateId = null;
|
||||
if (this.ugdTemplate != null) {
|
||||
@@ -131,10 +129,6 @@ public class Hook extends AbstractAuditableCustom {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
public Set<HookConfiguration> getHookConfig() {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
public Map<String, Object> update(final JsonCommand command) {
|
||||
|
||||
final Map<String, Object> actualChanges = new LinkedHashMap<>(5);
|
||||
@@ -201,8 +195,4 @@ public class Hook extends AbstractAuditableCustom {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void updateUgdTemplate(final Template ugdTemplate) {
|
||||
this.ugdTemplate = ugdTemplate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
-29
@@ -23,10 +23,18 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
|
||||
@Entity
|
||||
@Table(name = "m_hook_configuration")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class HookConfiguration extends AbstractPersistableCustom {
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
@@ -43,38 +51,11 @@ public class HookConfiguration extends AbstractPersistableCustom {
|
||||
private String fieldValue;
|
||||
|
||||
public static HookConfiguration createNewWithoutHook(final String fieldType, final String fieldName, final String fieldValue) {
|
||||
return new HookConfiguration(null, fieldType, fieldName, fieldValue);
|
||||
return new HookConfiguration().setFieldType(fieldType).setFieldName(fieldName).setFieldValue(fieldValue);
|
||||
}
|
||||
|
||||
public static HookConfiguration createNew(final Hook hook, final String fieldType, final String fieldName, final String fieldValue) {
|
||||
return new HookConfiguration(hook, fieldType, fieldName, fieldValue);
|
||||
}
|
||||
|
||||
protected HookConfiguration() {
|
||||
//
|
||||
}
|
||||
|
||||
private HookConfiguration(final Hook hook, final String fieldType, final String fieldName, final String fieldValue) {
|
||||
this.hook = hook;
|
||||
this.fieldType = fieldType;
|
||||
this.fieldName = fieldName;
|
||||
this.fieldValue = fieldValue;
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
return this.fieldName;
|
||||
}
|
||||
|
||||
public String getFieldType() {
|
||||
return this.fieldType;
|
||||
}
|
||||
|
||||
public String getFieldValue() {
|
||||
return this.fieldValue;
|
||||
}
|
||||
|
||||
public void update(final Hook hook) {
|
||||
this.hook = hook;
|
||||
return new HookConfiguration().setHook(hook).setFieldType(fieldType).setFieldName(fieldName).setFieldValue(fieldValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
-15
@@ -23,10 +23,18 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
|
||||
@Entity
|
||||
@Table(name = "m_hook_registered_events")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class HookResource extends AbstractPersistableCustom {
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
@@ -39,21 +47,7 @@ public class HookResource extends AbstractPersistableCustom {
|
||||
@Column(name = "action_name", nullable = false, length = 45)
|
||||
private String actionName;
|
||||
|
||||
protected HookResource() {
|
||||
//
|
||||
}
|
||||
|
||||
public static HookResource createNewWithoutHook(final String entityName, final String actionName) {
|
||||
return new HookResource(null, entityName, actionName);
|
||||
}
|
||||
|
||||
private HookResource(final Hook hook, final String entityName, final String actionName) {
|
||||
this.hook = hook;
|
||||
this.entityName = entityName;
|
||||
this.actionName = actionName;
|
||||
}
|
||||
|
||||
public void update(final Hook hook) {
|
||||
this.hook = hook;
|
||||
return new HookResource().setEntityName(entityName).setActionName(actionName);
|
||||
}
|
||||
}
|
||||
|
||||
+9
-13
@@ -28,13 +28,21 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
|
||||
@Entity
|
||||
@Table(name = "m_hook_templates")
|
||||
public class HookTemplate extends AbstractPersistableCustom {
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public final class HookTemplate extends AbstractPersistableCustom {
|
||||
|
||||
@Column(name = "name", nullable = false, length = 100)
|
||||
private String name;
|
||||
@@ -51,20 +59,8 @@ public class HookTemplate extends AbstractPersistableCustom {
|
||||
}
|
||||
}
|
||||
|
||||
protected HookTemplate() {
|
||||
|
||||
}
|
||||
|
||||
public static HookTemplate fromJson(final JsonCommand command) {
|
||||
final String name = command.stringValueOfParameterNamed(nameParamName);
|
||||
return new HookTemplate(name);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public Set<Schema> getSchema() {
|
||||
return this.fields;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-16
@@ -23,10 +23,18 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom;
|
||||
|
||||
@Entity
|
||||
@Table(name = "m_hook_schema")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class Schema extends AbstractPersistableCustom {
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
@@ -45,20 +53,4 @@ public class Schema extends AbstractPersistableCustom {
|
||||
@Column(name = "optional", nullable = false)
|
||||
private boolean optional = false;
|
||||
|
||||
public Schema() {
|
||||
//
|
||||
}
|
||||
|
||||
public String getFieldName() {
|
||||
return this.fieldName;
|
||||
}
|
||||
|
||||
public String getFieldType() {
|
||||
return this.fieldType;
|
||||
}
|
||||
|
||||
public boolean isOptional() {
|
||||
return this.optional;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ public class ElasticSearchHookProcessor implements HookProcessor {
|
||||
public void process(final Hook hook, final String payload, final String entityName, final String actionName,
|
||||
final FineractContext context) {
|
||||
|
||||
final Set<HookConfiguration> config = hook.getHookConfig();
|
||||
final Set<HookConfiguration> config = hook.getConfig();
|
||||
|
||||
String url = "";
|
||||
String contentType = "";
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ public class HookProcessorProvider implements ApplicationContextAware {
|
||||
|
||||
public HookProcessor getProcessor(final Hook hook) {
|
||||
HookProcessor processor;
|
||||
final String templateName = hook.getHookTemplate().getName();
|
||||
final String templateName = hook.getTemplate().getName();
|
||||
if (templateName.equalsIgnoreCase(smsTemplateName)) {
|
||||
processor = this.applicationContext.getBean("twilioHookProcessor", TwilioHookProcessor.class);
|
||||
} else if (templateName.equals(webTemplateName)) {
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class MessageGatewayHookProcessor implements HookProcessor {
|
||||
public void process(final Hook hook, final String payload, final String entityName, final String actionName,
|
||||
final FineractContext context) throws IOException {
|
||||
|
||||
final Set<HookConfiguration> config = hook.getHookConfig();
|
||||
final Set<HookConfiguration> config = hook.getConfig();
|
||||
|
||||
Integer SMSProviderId = null;
|
||||
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class TwilioHookProcessor implements HookProcessor {
|
||||
public void process(final Hook hook, final String payload, final String entityName, final String actionName,
|
||||
final FineractContext context) throws IOException {
|
||||
|
||||
final SmsProviderData smsProviderData = new SmsProviderData(hook.getHookConfig());
|
||||
final SmsProviderData smsProviderData = new SmsProviderData(hook.getConfig());
|
||||
|
||||
sendRequest(smsProviderData, payload, entityName, actionName, hook, context);
|
||||
}
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class WebHookProcessor implements HookProcessor {
|
||||
public void process(final Hook hook, final String payload, final String entityName, final String actionName,
|
||||
final FineractContext context) {
|
||||
|
||||
final Set<HookConfiguration> config = hook.getHookConfig();
|
||||
final Set<HookConfiguration> config = hook.getConfig();
|
||||
|
||||
String url = "";
|
||||
String contentType = "";
|
||||
|
||||
+4
-4
@@ -130,7 +130,7 @@ public class HookWritePlatformServiceJpaRepositoryImpl implements HookWritePlatf
|
||||
this.fromApiJsonDeserializer.validateForUpdate(command.json());
|
||||
|
||||
final Hook hook = retrieveHookBy(hookId);
|
||||
final HookTemplate template = hook.getHookTemplate();
|
||||
final HookTemplate template = hook.getTemplate();
|
||||
final Map<String, Object> changes = hook.update(command);
|
||||
|
||||
if (!changes.isEmpty()) {
|
||||
@@ -142,7 +142,7 @@ public class HookWritePlatformServiceJpaRepositoryImpl implements HookWritePlatf
|
||||
changes.remove(templateIdParamName);
|
||||
throw new TemplateNotFoundException(ugdTemplateId);
|
||||
}
|
||||
hook.updateUgdTemplate(ugdTemplate);
|
||||
hook.setUgdTemplate(ugdTemplate);
|
||||
}
|
||||
|
||||
if (changes.containsKey(eventsParamName)) {
|
||||
@@ -211,7 +211,7 @@ public class HookWritePlatformServiceJpaRepositoryImpl implements HookWritePlatf
|
||||
private Set<HookConfiguration> assembleConfig(final Map<String, String> hookConfig, final HookTemplate template) {
|
||||
|
||||
final Set<HookConfiguration> configuration = new HashSet<>();
|
||||
final Set<Schema> fields = template.getSchema();
|
||||
final Set<Schema> fields = template.getFields();
|
||||
|
||||
for (final Map.Entry<String, String> configEntry : hookConfig.entrySet()) {
|
||||
for (final Schema field : fields) {
|
||||
@@ -282,7 +282,7 @@ public class HookWritePlatformServiceJpaRepositoryImpl implements HookWritePlatf
|
||||
baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode(errorMessage);
|
||||
}
|
||||
|
||||
final Set<Schema> fields = template.getSchema();
|
||||
final Set<Schema> fields = template.getFields();
|
||||
for (final Schema field : fields) {
|
||||
if (!field.isOptional()) {
|
||||
boolean found = false;
|
||||
|
||||
Reference in New Issue
Block a user