tidy up data classes in prep for deletion of project.
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@ import java.util.Map;
|
||||
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
|
||||
import org.mifosng.data.AdditionalFieldsSet;
|
||||
import org.mifosng.data.reports.GenericResultset;
|
||||
import org.mifosng.platform.api.data.AdditionalFieldsSet;
|
||||
import org.mifosng.platform.api.data.GenericResultset;
|
||||
|
||||
public interface ReadExtraDataAndReportingService {
|
||||
|
||||
|
||||
+4
-4
@@ -16,10 +16,10 @@ import java.util.Set;
|
||||
import javax.sql.DataSource;
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
|
||||
import org.mifosng.data.AdditionalFieldsSet;
|
||||
import org.mifosng.data.reports.GenericResultset;
|
||||
import org.mifosng.data.reports.ResultsetColumnHeader;
|
||||
import org.mifosng.data.reports.ResultsetDataRow;
|
||||
import org.mifosng.platform.api.data.AdditionalFieldsSet;
|
||||
import org.mifosng.platform.api.data.GenericResultset;
|
||||
import org.mifosng.platform.api.data.ResultsetColumnHeader;
|
||||
import org.mifosng.platform.api.data.ResultsetDataRow;
|
||||
import org.mifosng.platform.exceptions.AdditionalFieldsNotFoundException;
|
||||
import org.mifosng.platform.exceptions.PlatformDataIntegrityException;
|
||||
import org.mifosng.platform.exceptions.ReportNotFoundException;
|
||||
|
||||
+2
-2
@@ -22,12 +22,12 @@ import javax.ws.rs.core.UriInfo;
|
||||
import org.codehaus.jettison.json.JSONArray;
|
||||
import org.codehaus.jettison.json.JSONException;
|
||||
import org.codehaus.jettison.json.JSONObject;
|
||||
import org.mifosng.data.AdditionalFieldsSet;
|
||||
import org.mifosng.data.reports.GenericResultset;
|
||||
import org.mifosng.platform.InvalidSqlException;
|
||||
import org.mifosng.platform.ReadExtraDataAndReportingService;
|
||||
import org.mifosng.platform.api.data.AdditionalFieldsSet;
|
||||
import org.mifosng.platform.api.data.ApiParameterError;
|
||||
import org.mifosng.platform.api.data.EntityIdentifier;
|
||||
import org.mifosng.platform.api.data.GenericResultset;
|
||||
import org.mifosng.platform.api.infrastructure.ApiJSONFormattingService;
|
||||
import org.mifosng.platform.exceptions.PlatformApiDataValidationException;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
import org.mifosng.data.AuthenticatedUserData;
|
||||
import org.mifosng.platform.api.data.AuthenticatedUserData;
|
||||
import org.mifosng.platform.user.domain.AppUser;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
||||
@@ -16,8 +16,8 @@ import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
||||
import org.mifosng.data.reports.GenericResultset;
|
||||
import org.mifosng.platform.ReadExtraDataAndReportingService;
|
||||
import org.mifosng.platform.api.data.GenericResultset;
|
||||
import org.mifosng.platform.api.infrastructure.ApiJSONFormattingService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.mifosng.platform.api.data;
|
||||
|
||||
import org.codehaus.jackson.map.annotate.JsonFilter;
|
||||
|
||||
@JsonFilter("myFilter")
|
||||
public class AdditionalFieldsSet {
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String type;
|
||||
protected AdditionalFieldsSet() {
|
||||
//
|
||||
}
|
||||
|
||||
public AdditionalFieldsSet(final Integer id, final String name, final String type) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
package org.mifosng.platform.api.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AuthenticatedUserData {
|
||||
|
||||
private String username;
|
||||
private Long userId;
|
||||
private String base64EncodedAuthenticationKey;
|
||||
private boolean authenticated = false;
|
||||
private Collection<String> permissions = new ArrayList<String>();
|
||||
|
||||
protected AuthenticatedUserData() {
|
||||
//
|
||||
}
|
||||
|
||||
public AuthenticatedUserData(final Collection<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
public Collection<String> getPermissions() {
|
||||
return this.permissions;
|
||||
}
|
||||
|
||||
public void setPermissions(final Collection<String> permissions) {
|
||||
this.permissions = permissions;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public boolean isAuthenticated() {
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
public void setAuthenticated(boolean authenticated) {
|
||||
this.authenticated = authenticated;
|
||||
}
|
||||
|
||||
public String getBase64EncodedAuthenticationKey() {
|
||||
return base64EncodedAuthenticationKey;
|
||||
}
|
||||
|
||||
public void setBase64EncodedAuthenticationKey(
|
||||
String base64EncodedAuthenticationKey) {
|
||||
this.base64EncodedAuthenticationKey = base64EncodedAuthenticationKey;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.mifosng.platform.api.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class GenericResultset {
|
||||
|
||||
private List<ResultsetColumnHeader> columnHeaders = new ArrayList<ResultsetColumnHeader>();
|
||||
private List<ResultsetDataRow> data = new ArrayList<ResultsetDataRow>();
|
||||
|
||||
public GenericResultset() {
|
||||
|
||||
}
|
||||
|
||||
public List<ResultsetColumnHeader> getColumnHeaders() {
|
||||
return columnHeaders;
|
||||
}
|
||||
|
||||
public void setColumnHeaders(List<ResultsetColumnHeader> columnHeaders) {
|
||||
this.columnHeaders = columnHeaders;
|
||||
}
|
||||
|
||||
public List<ResultsetDataRow> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(List<ResultsetDataRow> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package org.mifosng.platform.api.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ResultsetColumnHeader {
|
||||
|
||||
private String columnName;
|
||||
private String columnType;
|
||||
private Integer columnLength;
|
||||
private String columnDisplayType;
|
||||
private List<String> columnValues = new ArrayList<String>();
|
||||
|
||||
public ResultsetColumnHeader() {
|
||||
|
||||
}
|
||||
|
||||
public List<String> getColumnValues() {
|
||||
return columnValues;
|
||||
}
|
||||
|
||||
public void setColumnValues(List<String> columnValues) {
|
||||
this.columnValues = columnValues;
|
||||
}
|
||||
|
||||
public String getColumnName() {
|
||||
return columnName;
|
||||
}
|
||||
|
||||
public void setColumnName(String columnName) {
|
||||
this.columnName = columnName;
|
||||
}
|
||||
|
||||
public String getColumnType() {
|
||||
return columnType;
|
||||
}
|
||||
|
||||
public void setColumnType(String columnType) {
|
||||
this.columnType = columnType;
|
||||
}
|
||||
|
||||
public Integer getColumnLength() {
|
||||
return columnLength;
|
||||
}
|
||||
|
||||
public void setColumnLength(Integer columnLength) {
|
||||
this.columnLength = columnLength;
|
||||
}
|
||||
|
||||
public String getColumnDisplayType() {
|
||||
return columnDisplayType;
|
||||
}
|
||||
|
||||
public void setColumnDisplayType(String columnDisplayType) {
|
||||
this.columnDisplayType = columnDisplayType;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.mifosng.platform.api.data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ResultsetDataRow {
|
||||
|
||||
private List<String> row = new ArrayList<String>();
|
||||
|
||||
public ResultsetDataRow() {
|
||||
|
||||
}
|
||||
|
||||
public List<String> getRow() {
|
||||
return row;
|
||||
}
|
||||
|
||||
public void setRow(List<String> row) {
|
||||
this.row = row;
|
||||
}
|
||||
}
|
||||
-39
@@ -114,45 +114,6 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService {
|
||||
realLoan.isWaitingForDisbursal());
|
||||
|
||||
return new LoanAccountData(realLoan.getId(), basicDetails, loanData, permissions);
|
||||
|
||||
// return new LoanAccountData(realLoan.isClosed(), realLoan.isOpen(),
|
||||
// realLoan.isOpenWithRepaymentMade(), interestRebateOutstanding,
|
||||
// realLoan.isSubmittedAndPendingApproval(),
|
||||
// realLoan.isWaitingForDisbursal(), undoDisbursalAllowed,
|
||||
// makeRepaymentAllowed, rejectAllowed,
|
||||
// withdrawnByApplicantAllowed, undoApprovalAllowed,
|
||||
// disbursalAllowed, realLoan.getLoanStatusDisplayName(),
|
||||
// loanStatusDate, realLoan.getId(), realLoan.getExternalId(),
|
||||
// realLoan.getLoanProduct().getName(),
|
||||
// realLoan.getClosedOnDate(), realLoan.getSubmittedOnDate(),
|
||||
// realLoan.getApprovedOnDate(), expectedDisbursementDate,
|
||||
// realLoan.getDisbursedOnDate(),
|
||||
// realLoan.getExpectedMaturityDate(),
|
||||
// realLoan.getExpectedFirstRepaymentOnDate(),
|
||||
// realLoan.getInterestCalculatedFromDate(), principal, realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getAnnualNominalInterestRate(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getNominalInterestRatePerPeriod(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getInterestPeriodFrequencyType().getValue(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getInterestPeriodFrequencyType().toString(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail().getInterestMethod()
|
||||
// .getValue(), realLoan.getLoanRepaymentScheduleDetail()
|
||||
// .getInterestMethod().toString(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getAmortizationMethod().getValue(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getAmortizationMethod().toString(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getNumberOfRepayments(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail().getRepayEvery(),
|
||||
// realLoan.getLoanRepaymentScheduleDetail()
|
||||
// .getRepaymentPeriodFrequencyType().getValue(), realLoan
|
||||
// .getLoanRepaymentScheduleDetail()
|
||||
// .getRepaymentPeriodFrequencyType().toString(),
|
||||
// tolerance, loanData, waiveAllowed, interestRebateOwed);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user