FINERACT-821 Enforced Membername checkstyle(1)
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
1b8962fc81
commit
bd75a6c79b
+1
-1
@@ -40,7 +40,7 @@ public class JournalEntryDataValidator {
|
||||
|
||||
private final FromJsonHelper fromApiJsonHelper;
|
||||
|
||||
private final Set<String> RUNNING_BALANCE_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
|
||||
private static final Set<String> RUNNING_BALANCE_UPDATE_REQUEST_DATA_PARAMETERS = new HashSet<>(
|
||||
Arrays.asList(JournalEntryJsonInputParams.OFFICE_ID.getValue()));
|
||||
|
||||
@Autowired
|
||||
|
||||
+5
-5
@@ -58,8 +58,8 @@ public class AdHocApiResource {
|
||||
/**
|
||||
* The set of parameters that are supported in response for {@link AdhocData}
|
||||
*/
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "query", "tableName", "tableField",
|
||||
"isActive", "createdBy", "createdOn", "createdById", "updatedById", "updatedOn", "email"));
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "query", "tableName",
|
||||
"tableField", "isActive", "createdBy", "createdOn", "createdById", "updatedById", "updatedOn", "email"));
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
private final AdHocReadPlatformService adHocReadPlatformService;
|
||||
@@ -86,7 +86,7 @@ public class AdHocApiResource {
|
||||
this.context.authenticatedUser();
|
||||
final Collection<AdHocData> adhocs = this.adHocReadPlatformService.retrieveAllAdHocQuery();
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, adhocs, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, adhocs, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@GET
|
||||
@@ -97,7 +97,7 @@ public class AdHocApiResource {
|
||||
this.context.authenticatedUser();
|
||||
final AdHocData user = this.adHocReadPlatformService.retrieveNewAdHocDetails();
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, user, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, user, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@POST
|
||||
@@ -128,7 +128,7 @@ public class AdHocApiResource {
|
||||
|
||||
final AdHocData adhoc = this.adHocReadPlatformService.retrieveOne(adHocId);
|
||||
|
||||
return this.toApiJsonSerializer.serialize(settings, adhoc, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, adhoc, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@PUT
|
||||
|
||||
+4
-4
@@ -63,7 +63,7 @@ import org.springframework.stereotype.Component;
|
||||
+ "Data Scope: A user can only see audits that are within their data scope. However, 'head office' users can see all audits including those that aren't office/branch related e.g. Loan Product changes.\")")
|
||||
public class AuditsApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
"subresourceId", "maker", "madeOnDate", "checker", "checkedOnDate", "processingResult", "commandAsJson", "officeName",
|
||||
"groupLevelName", "groupName", "clientName", "loanAccountNo", "savingsAccountNo", "clientId", "loanId", "url"));
|
||||
|
||||
@@ -127,13 +127,13 @@ public class AuditsApiResource {
|
||||
if (parameters.isPaged()) {
|
||||
final Page<AuditData> auditEntries = this.auditReadPlatformService.retrievePaginatedAuditEntries(extraCriteria,
|
||||
settings.isIncludeJson(), parameters);
|
||||
return this.toApiJsonSerializer.serialize(settings, auditEntries, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, auditEntries, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
final Collection<AuditData> auditEntries = this.auditReadPlatformService.retrieveAuditEntries(extraCriteria,
|
||||
settings.isIncludeJson());
|
||||
|
||||
return this.toApiJsonSerializer.serialize(settings, auditEntries, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, auditEntries, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@GET
|
||||
@@ -152,7 +152,7 @@ public class AuditsApiResource {
|
||||
final AuditData auditEntry = this.auditReadPlatformService.retrieveAuditEntry(auditId);
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, auditEntry, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, auditEntry, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@GET
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ import org.springframework.stereotype.Component;
|
||||
@Tag(name = "Maker Checker (or 4-eye) functionality")
|
||||
public class MakercheckersApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId",
|
||||
"subresourceId", "maker", "madeOnDate", "checker", "checkedOnDate", "processingResult", "commandAsJson", "officeName",
|
||||
"groupLevelName", "groupName", "clientName", "loanAccountNo", "savingsAccountNo", "clientId", "loanId"));
|
||||
|
||||
@@ -115,7 +115,7 @@ public class MakercheckersApiResource {
|
||||
final Collection<AuditData> entries = this.readPlatformService.retrieveAllEntriesToBeChecked(extraCriteria,
|
||||
settings.isIncludeJson());
|
||||
|
||||
return this.toApiJsonSerializerAudit.serialize(settings, entries, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializerAudit.serialize(settings, entries, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@GET
|
||||
|
||||
+6
-6
@@ -52,7 +52,7 @@ public class ImportDocument extends AbstractPersistableCustom {
|
||||
private Boolean completed;
|
||||
|
||||
@Column(name = "entity_type")
|
||||
private Integer entity_type;
|
||||
private Integer entityType;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "createdby_id")
|
||||
@@ -71,7 +71,7 @@ public class ImportDocument extends AbstractPersistableCustom {
|
||||
|
||||
}
|
||||
|
||||
public static ImportDocument instance(final Document document, final LocalDateTime importTime, final Integer entity_type,
|
||||
public static ImportDocument instance(final Document document, final LocalDateTime importTime, final Integer entityType,
|
||||
final AppUser createdBy, final Integer totalRecords) {
|
||||
|
||||
final Boolean completed = Boolean.FALSE;
|
||||
@@ -79,18 +79,18 @@ public class ImportDocument extends AbstractPersistableCustom {
|
||||
final Integer failureCount = 0;
|
||||
final LocalDateTime endTime = LocalDateTime.now();
|
||||
|
||||
return new ImportDocument(document, importTime, endTime, completed, entity_type, createdBy, totalRecords, successCount,
|
||||
return new ImportDocument(document, importTime, endTime, completed, entityType, createdBy, totalRecords, successCount,
|
||||
failureCount);
|
||||
}
|
||||
|
||||
private ImportDocument(final Document document, final LocalDateTime importTime, final LocalDateTime endTime, Boolean completed,
|
||||
final Integer entity_type, final AppUser createdBy, final Integer totalRecords, final Integer successCount,
|
||||
final Integer entityType, final AppUser createdBy, final Integer totalRecords, final Integer successCount,
|
||||
final Integer failureCount) {
|
||||
this.document = document;
|
||||
this.importTime = importTime.toDate();
|
||||
this.endTime = endTime.toDate();
|
||||
this.completed = completed;
|
||||
this.entity_type = entity_type;
|
||||
this.entityType = entityType;
|
||||
this.createdBy = createdBy;
|
||||
this.totalRecords = totalRecords;
|
||||
this.successCount = successCount;
|
||||
@@ -110,7 +110,7 @@ public class ImportDocument extends AbstractPersistableCustom {
|
||||
}
|
||||
|
||||
public Integer getEntityType() {
|
||||
return this.entity_type;
|
||||
return this.entityType;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -64,7 +64,7 @@ import org.springframework.stereotype.Component;
|
||||
+ "By default caching is set to No Caching. Switching between caches results in the cache been clear e.g. from Single node to No cache and back again would clear down the single node cache.")
|
||||
public class CacheApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id"));
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id"));
|
||||
private final String resourceNameForPermissions = "CACHE";
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
@@ -97,7 +97,7 @@ public class CacheApiResource {
|
||||
final Collection<CacheData> codes = this.cacheService.retrieveAll();
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, codes, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, codes, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@PUT
|
||||
|
||||
+6
-5
@@ -69,9 +69,10 @@ public class CodeValuesApiResource {
|
||||
/**
|
||||
* The set of parameters that are supported in response for {@link CodeData}
|
||||
*/
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList(CodevalueJSONinputParams.CODEVALUE_ID.getValue(),
|
||||
CodevalueJSONinputParams.NAME.getValue(), CodevalueJSONinputParams.POSITION.getValue(),
|
||||
CodevalueJSONinputParams.IS_MANDATORY.getValue(), CodevalueJSONinputParams.DESCRIPTION.getValue()));
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(
|
||||
Arrays.asList(CodevalueJSONinputParams.CODEVALUE_ID.getValue(), CodevalueJSONinputParams.NAME.getValue(),
|
||||
CodevalueJSONinputParams.POSITION.getValue(), CodevalueJSONinputParams.IS_MANDATORY.getValue(),
|
||||
CodevalueJSONinputParams.DESCRIPTION.getValue()));
|
||||
private final String resourceNameForPermissions = "CODEVALUE";
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
@@ -106,7 +107,7 @@ public class CodeValuesApiResource {
|
||||
final Collection<CodeValueData> codeValues = this.readPlatformService.retrieveAllCodeValues(codeId);
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, codeValues, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, codeValues, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@GET
|
||||
@@ -125,7 +126,7 @@ public class CodeValuesApiResource {
|
||||
final CodeValueData codeValue = this.readPlatformService.retrieveCodeValue(codeValueId);
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, codeValue, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, codeValue, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@POST
|
||||
|
||||
+3
-3
@@ -67,7 +67,7 @@ public class CodesApiResource {
|
||||
/**
|
||||
* The set of parameters that are supported in response for {@link CodeData}
|
||||
*/
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "systemDefined"));
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "systemDefined"));
|
||||
private final String resourceNameForPermissions = "CODE";
|
||||
|
||||
private final PlatformSecurityContext context;
|
||||
@@ -100,7 +100,7 @@ public class CodesApiResource {
|
||||
final Collection<CodeData> codes = this.readPlatformService.retrieveAllCodes();
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, codes, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, codes, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@POST
|
||||
@@ -132,7 +132,7 @@ public class CodesApiResource {
|
||||
final CodeData code = this.readPlatformService.retrieveCode(codeId);
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, code, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, code, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@PUT
|
||||
|
||||
+3
-3
@@ -70,7 +70,7 @@ import org.springframework.stereotype.Component;
|
||||
+ "meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a meeting schedule belonging to either the parent group or Center.")
|
||||
public class GlobalConfigurationApiResource {
|
||||
|
||||
private final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("globalConfiguration"));
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("globalConfiguration"));
|
||||
|
||||
private final String resourceNameForPermissions = "CONFIGURATION";
|
||||
|
||||
@@ -112,7 +112,7 @@ public class GlobalConfigurationApiResource {
|
||||
final GlobalConfigurationData configurationData = this.readPlatformService.retrieveGlobalConfiguration(survey);
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.toApiJsonSerializer.serialize(settings, configurationData, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.toApiJsonSerializer.serialize(settings, configurationData, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@GET
|
||||
@@ -131,7 +131,7 @@ public class GlobalConfigurationApiResource {
|
||||
final GlobalConfigurationPropertyData configurationData = this.readPlatformService.retrieveGlobalConfiguration(configId);
|
||||
|
||||
final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
|
||||
return this.propertyDataJsonSerializer.serialize(settings, configurationData, this.RESPONSE_DATA_PARAMETERS);
|
||||
return this.propertyDataJsonSerializer.serialize(settings, configurationData, RESPONSE_DATA_PARAMETERS);
|
||||
}
|
||||
|
||||
@PUT
|
||||
|
||||
Reference in New Issue
Block a user