wip: documentation stubs prior to refactoring
This commit is contained in:
+1025
-12
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -39,7 +39,7 @@ import org.springframework.stereotype.Component;
|
||||
@Scope("singleton")
|
||||
public class GuarantorsApiResource {
|
||||
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<String>(Arrays.asList("guarantorTypeId", "entityId",
|
||||
private static final Set<String> RESPONSE_DATA_PARAMETERS = new HashSet<String>(Arrays.asList("guarantorType", "entityId",
|
||||
"firstname", "lastname", "addressLine1", "addressLine2", "city", "state", "zip", "country", "mobileNumber", "housePhoneNumber",
|
||||
"comment", "dob"));
|
||||
|
||||
|
||||
+1
-5
@@ -17,7 +17,6 @@ import org.mifosplatform.portfolio.loanaccount.guarantor.domain.GuarantorType;
|
||||
public class GuarantorCommand {
|
||||
|
||||
/*** Fields for current customers serving as guarantors **/
|
||||
private final Long loanId;
|
||||
private final Integer guarantorTypeId;
|
||||
private final Long entityId;
|
||||
|
||||
@@ -35,11 +34,10 @@ public class GuarantorCommand {
|
||||
private final String comment;
|
||||
private final LocalDate dob;
|
||||
|
||||
public GuarantorCommand(final Long loanId, final Integer guarantorTypeId, final Long entityId, final String firstname,
|
||||
public GuarantorCommand(final Integer guarantorTypeId, final Long entityId, final String firstname,
|
||||
final String lastname, final String addressLine1, final String addressLine2, final String city, final String state,
|
||||
final String zip, final String country, final String mobileNumber, final String housePhoneNumber, final String comment,
|
||||
final LocalDate dob) {
|
||||
this.loanId = loanId;
|
||||
/*** Fields for current entities serving as guarantors **/
|
||||
this.guarantorTypeId = guarantorTypeId;
|
||||
this.entityId = entityId;
|
||||
@@ -73,8 +71,6 @@ public class GuarantorCommand {
|
||||
|
||||
DataValidatorBuilder baseDataValidator = getDataValidator(dataValidationErrors);
|
||||
|
||||
baseDataValidator.reset().parameter(GUARANTOR_JSON_INPUT_PARAMS.LOAN_ID.getValue()).value(this.loanId).notNull()
|
||||
.integerGreaterThanZero();
|
||||
baseDataValidator.reset().parameter(GUARANTOR_JSON_INPUT_PARAMS.GUARANTOR_TYPE_ID.getValue()).value(this.guarantorTypeId).notNull()
|
||||
.inMinMaxRange(GuarantorType.getMinValue(), GuarantorType.getMaxValue());
|
||||
|
||||
|
||||
+1
-2
@@ -44,7 +44,6 @@ public final class GuarantorCommandFromApiJsonDeserializer extends AbstractFromA
|
||||
|
||||
final JsonElement element = fromApiJsonHelper.parse(json);
|
||||
|
||||
Long loanId = fromApiJsonHelper.extractLongNamed(GUARANTOR_JSON_INPUT_PARAMS.LOAN_ID.getValue(), element);
|
||||
Integer guarantorTypeId = fromApiJsonHelper.extractIntegerSansLocaleNamed(GUARANTOR_JSON_INPUT_PARAMS.GUARANTOR_TYPE_ID.getValue(),
|
||||
element);
|
||||
Long entityId = fromApiJsonHelper.extractLongNamed(GUARANTOR_JSON_INPUT_PARAMS.ENTITY_ID.getValue(), element);
|
||||
@@ -61,7 +60,7 @@ public final class GuarantorCommandFromApiJsonDeserializer extends AbstractFromA
|
||||
String comment = fromApiJsonHelper.extractStringNamed(GUARANTOR_JSON_INPUT_PARAMS.COMMENT.getValue(), element);
|
||||
LocalDate dob = fromApiJsonHelper.extractLocalDateNamed(GUARANTOR_JSON_INPUT_PARAMS.DATE_OF_BIRTH.getValue(), element);
|
||||
|
||||
return new GuarantorCommand(loanId, guarantorTypeId, entityId, firstname, lastname, addressLine1, addressLine2, city, state, zip,
|
||||
return new GuarantorCommand(guarantorTypeId, entityId, firstname, lastname, addressLine1, addressLine2, city, state, zip,
|
||||
country, mobileNumber, housePhoneNumber, comment, dob);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user