align loan product data with field names used for create. return enumerations with extra information that describe it better.

This commit is contained in:
Keith Woodlock
2012-05-30 16:12:37 +01:00
parent cb0cf64a2b
commit 6a0f4b3f6f
59 changed files with 608 additions and 649 deletions
@@ -1,129 +0,0 @@
package org.mifosng.data;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonFilter;
@JsonIgnoreProperties({ "orgId" })
@JsonFilter("userFilter")
public class AppUserData {
private Long id;
private Long orgId;
private Long officeId;
private String officeName;
private String username;
private String firstname;
private String lastname;
private String email;
private List<OfficeLookup> allowedOffices = new ArrayList<OfficeLookup>();
private List<RoleData> availableRoles = new ArrayList<RoleData>();
private List<RoleData> selectedRoles = new ArrayList<RoleData>();
public AppUserData() {
//
}
public AppUserData(final Long id, final String username,
final String email, final Long orgId, final Long officeId,
final String officeName) {
this.id = id;
this.username = username;
this.email = email;
this.orgId = orgId;
this.officeId = officeId;
this.officeName = officeName;
}
public Long getId() {
return this.id;
}
public String getUsername() {
return this.username;
}
public String getEmail() {
return this.email;
}
public Long getOrgId() {
return this.orgId;
}
public Long getOfficeId() {
return this.officeId;
}
public String getOfficeName() {
return this.officeName;
}
public void setId(final Long id) {
this.id = id;
}
public void setUsername(final String username) {
this.username = username;
}
public void setEmail(final String email) {
this.email = email;
}
public void setOrgId(final Long orgId) {
this.orgId = orgId;
}
public void setOfficeId(final Long officeId) {
this.officeId = officeId;
}
public void setOfficeName(final String officeName) {
this.officeName = officeName;
}
public List<OfficeLookup> getAllowedOffices() {
return allowedOffices;
}
public void setAllowedOffices(List<OfficeLookup> allowedOffices) {
this.allowedOffices = allowedOffices;
}
public List<RoleData> getAvailableRoles() {
return availableRoles;
}
public void setAvailableRoles(List<RoleData> availableRoles) {
this.availableRoles = availableRoles;
}
public List<RoleData> getSelectedRoles() {
return selectedRoles;
}
public void setSelectedRoles(List<RoleData> selectedRoles) {
this.selectedRoles = selectedRoles;
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getLastname() {
return lastname;
}
public void setLastname(String lastname) {
this.lastname = lastname;
}
}
@@ -1,143 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonFilter;
import org.joda.time.DateTime;
import org.joda.time.Days;
import org.joda.time.LocalDate;
@JsonIgnoreProperties({ "organisationId","organisationName"})
@JsonFilter("myFilter")
public class ClientData implements Serializable {
private Long organisationId;
private String organisationName;
private Long officeId;
private String officeName;
private Long id;
private String firstname;
private String lastname;
private String displayName;
private String externalId;
private LocalDate joinedDate;
private List<OfficeLookup> allowedOffices = new ArrayList<OfficeLookup>();
public ClientData() {
//
}
public ClientData(final Long organisationId, final String organisationName,
final Long officeId, final String officeName, final Long id,
final String firstname, final String lastname,
final String externalId, final LocalDate joinedDate) {
this.organisationId = organisationId;
this.organisationName = organisationName;
this.officeId = officeId;
this.officeName = officeName;
this.id = id;
this.firstname = firstname;
this.lastname = lastname;
this.displayName = new StringBuilder(this.firstname).append(' ')
.append(this.lastname).toString();
this.externalId = externalId;
this.joinedDate = joinedDate;
}
public int getMaxJoinedOnOffsetFromToday() {
return Days.daysBetween(new DateTime(),
this.getJoinedDate().toDateMidnight().toDateTime()).getDays();
}
public Long getId() {
return this.id;
}
public String getFirstname() {
return this.firstname;
}
public String getLastname() {
return this.lastname;
}
public String getExternalId() {
return this.externalId;
}
public Long getOrganisationId() {
return this.organisationId;
}
public String getOrganisationName() {
return this.organisationName;
}
public Long getOfficeId() {
return this.officeId;
}
public String getOfficeName() {
return this.officeName;
}
public LocalDate getJoinedDate() {
return this.joinedDate;
}
public void setOrganisationId(final Long organisationId) {
this.organisationId = organisationId;
}
public void setOrganisationName(final String organisationName) {
this.organisationName = organisationName;
}
public void setOfficeId(final Long officeId) {
this.officeId = officeId;
}
public void setOfficeName(final String officeName) {
this.officeName = officeName;
}
public void setId(final Long id) {
this.id = id;
}
public void setFirstname(final String firstname) {
this.firstname = firstname;
}
public void setLastname(final String lastname) {
this.lastname = lastname;
}
public void setExternalId(final String externalId) {
this.externalId = externalId;
}
public void setJoinedDate(final LocalDate joinedDate) {
this.joinedDate = joinedDate;
}
public String getDisplayName() {
return this.displayName;
}
public void setDisplayName(final String displayName) {
this.displayName = displayName;
}
public List<OfficeLookup> getAllowedOffices() {
return allowedOffices;
}
public void setAllowedOffices(List<OfficeLookup> allowedOffices) {
this.allowedOffices = allowedOffices;
}
}
@@ -2,21 +2,20 @@ package org.mifosng.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "option")
public class EnumOptionData implements Serializable {
private Long id;
private String code;
private String value;
public EnumOptionData() {
protected EnumOptionData() {
//
}
public EnumOptionData(final String value, final Long id) {
this.value = value;
public EnumOptionData(final Long id, final String code, final String value) {
this.id = id;
this.code = code;
this.value = value;
}
public Long getId() {
@@ -34,4 +33,12 @@ public class EnumOptionData implements Serializable {
public void setValue(final String value) {
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
@@ -1,29 +0,0 @@
package org.mifosng.data;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class EnumOptionList {
private Collection<EnumOptionData> options = new ArrayList<EnumOptionData>();
protected EnumOptionList() {
//
}
public EnumOptionList(final List<EnumOptionData> options) {
this.options = options;
}
public Collection<EnumOptionData> getOptions() {
return this.options;
}
public void setOptions(final Collection<EnumOptionData> options) {
this.options = options;
}
}
@@ -1,259 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.map.annotate.JsonFilter;
import org.joda.time.DateTime;
@JsonFilter("myFilter")
public class LoanProductData implements Serializable {
private Long id;
private String name;
private String description;
private MoneyData principalMoney;
private BigDecimal interestRatePerPeriod = BigDecimal.ZERO;
private int interestRatePeriod;
private BigDecimal annualInterestRate = BigDecimal.ZERO;
private int interestMethod;
private int interestRateCalculatedInPeriod;
private Integer numberOfInterestFreePeriods = Integer.valueOf(0);
private Integer repaidEvery;
private int repaymentPeriodFrequency;
private Integer numberOfRepayments;
private int amortizationMethod;
private MoneyData inArrearsTolerance;
private DateTime createdOn;
private DateTime lastModifedOn;
private List<CurrencyData> possibleCurrencies = new ArrayList<CurrencyData>();
private List<EnumOptionData> possibleAmortizationOptions = new ArrayList<EnumOptionData>();
private List<EnumOptionData> possibleInterestOptions = new ArrayList<EnumOptionData>();
private List<EnumOptionData> possibleInterestRateCalculatedInPeriodOptions = new ArrayList<EnumOptionData>();
private List<EnumOptionData> repaymentFrequencyOptions = new ArrayList<EnumOptionData>();
private List<EnumOptionData> interestFrequencyOptions = new ArrayList<EnumOptionData>();
public LoanProductData() {
//
}
public LoanProductData(final Long id, final String name,
String description,
final MoneyData principalMoney,
final BigDecimal interestRatePerPeriod,
final int interestRatePeriod, final BigDecimal annualInterestRate,
final int interestMethod, final int interestCalculationInPeriodMethod,
final Integer repaidEvery,
final int repaymentPeriodFrequency, final Integer numberOfRepayments,
final int amortizationMethod, MoneyData inArrearsTolerance, DateTime createdOn, DateTime lastModifedOn) {
this.id = id;
this.name = name;
this.description = description;
this.principalMoney = principalMoney;
this.interestRatePerPeriod = interestRatePerPeriod;
this.interestRatePeriod = interestRatePeriod;
this.annualInterestRate = annualInterestRate;
this.interestMethod = interestMethod;
this.interestRateCalculatedInPeriod = interestCalculationInPeriodMethod;
this.numberOfRepayments = numberOfRepayments;
this.repaidEvery = repaidEvery;
this.repaymentPeriodFrequency = repaymentPeriodFrequency;
this.amortizationMethod = amortizationMethod;
this.inArrearsTolerance = inArrearsTolerance;
this.createdOn = createdOn;
this.lastModifedOn = lastModifedOn;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public MoneyData getPrincipalMoney() {
return principalMoney;
}
public void setPrincipalMoney(MoneyData principalMoney) {
this.principalMoney = principalMoney;
}
public BigDecimal getInterestRatePerPeriod() {
return interestRatePerPeriod;
}
public void setInterestRatePerPeriod(BigDecimal interestRatePerPeriod) {
this.interestRatePerPeriod = interestRatePerPeriod;
}
public int getInterestRatePeriod() {
return interestRatePeriod;
}
public void setInterestRatePeriod(int interestRatePeriod) {
this.interestRatePeriod = interestRatePeriod;
}
public BigDecimal getAnnualInterestRate() {
return annualInterestRate;
}
public void setAnnualInterestRate(BigDecimal annualInterestRate) {
this.annualInterestRate = annualInterestRate;
}
public int getInterestMethod() {
return interestMethod;
}
public void setInterestMethod(int interestMethod) {
this.interestMethod = interestMethod;
}
public Integer getRepaidEvery() {
return repaidEvery;
}
public void setRepaidEvery(Integer repaidEvery) {
this.repaidEvery = repaidEvery;
}
public int getRepaymentPeriodFrequency() {
return repaymentPeriodFrequency;
}
public void setRepaymentPeriodFrequency(int repaymentPeriodFrequency) {
this.repaymentPeriodFrequency = repaymentPeriodFrequency;
}
public Integer getNumberOfRepayments() {
return numberOfRepayments;
}
public void setNumberOfRepayments(Integer numberOfRepayments) {
this.numberOfRepayments = numberOfRepayments;
}
public int getAmortizationMethod() {
return amortizationMethod;
}
public void setAmortizationMethod(int amortizationMethod) {
this.amortizationMethod = amortizationMethod;
}
public MoneyData getInArrearsTolerance() {
return inArrearsTolerance;
}
public void setInArrearsTolerance(MoneyData inArrearsTolerance) {
this.inArrearsTolerance = inArrearsTolerance;
}
public DateTime getCreatedOn() {
return createdOn;
}
public void setCreatedOn(DateTime createdOn) {
this.createdOn = createdOn;
}
public DateTime getLastModifedOn() {
return lastModifedOn;
}
public void setLastModifedOn(DateTime lastModifedOn) {
this.lastModifedOn = lastModifedOn;
}
public List<CurrencyData> getPossibleCurrencies() {
return possibleCurrencies;
}
public void setPossibleCurrencies(List<CurrencyData> possibleCurrencies) {
this.possibleCurrencies = possibleCurrencies;
}
public List<EnumOptionData> getPossibleAmortizationOptions() {
return possibleAmortizationOptions;
}
public void setPossibleAmortizationOptions(
List<EnumOptionData> possibleAmortizationOptions) {
this.possibleAmortizationOptions = possibleAmortizationOptions;
}
public List<EnumOptionData> getPossibleInterestOptions() {
return possibleInterestOptions;
}
public void setPossibleInterestOptions(
List<EnumOptionData> possibleInterestOptions) {
this.possibleInterestOptions = possibleInterestOptions;
}
public List<EnumOptionData> getRepaymentFrequencyOptions() {
return repaymentFrequencyOptions;
}
public void setRepaymentFrequencyOptions(
List<EnumOptionData> repaymentFrequencyOptions) {
this.repaymentFrequencyOptions = repaymentFrequencyOptions;
}
public List<EnumOptionData> getInterestFrequencyOptions() {
return interestFrequencyOptions;
}
public void setInterestFrequencyOptions(
List<EnumOptionData> interestFrequencyOptions) {
this.interestFrequencyOptions = interestFrequencyOptions;
}
public Integer getNumberOfInterestFreePeriods() {
return numberOfInterestFreePeriods;
}
public void setNumberOfInterestFreePeriods(Integer numberOfInterestFreePeriods) {
this.numberOfInterestFreePeriods = numberOfInterestFreePeriods;
}
public int getInterestRateCalculatedInPeriod() {
return interestRateCalculatedInPeriod;
}
public void setInterestRateCalculatedInPeriod(int interestRateCalculatedInPeriod) {
this.interestRateCalculatedInPeriod = interestRateCalculatedInPeriod;
}
public List<EnumOptionData> getPossibleInterestRateCalculatedInPeriodOptions() {
return possibleInterestRateCalculatedInPeriodOptions;
}
public void setPossibleInterestRateCalculatedInPeriodOptions(
List<EnumOptionData> possibleInterestRateCalculatedInPeriodOptions) {
this.possibleInterestRateCalculatedInPeriodOptions = possibleInterestRateCalculatedInPeriodOptions;
}
}
@@ -29,7 +29,7 @@ public class LoanRepaymentPeriodData {
private static CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getCurrencyDigitsAfterDecimal();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
@@ -14,7 +14,7 @@ public class LoanSchedule implements Serializable {
private static CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getCurrencyDigitsAfterDecimal();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
@@ -10,7 +10,7 @@ import javax.xml.bind.annotation.XmlRootElement;
public class MoneyData implements Serializable, Comparable<MoneyData> {
private String currencyCode;
private Integer currencyDigitsAfterDecimal;
private Integer digitsAfterDecimal;
private BigDecimal amount;
private String defaultName;
private String nameCode;
@@ -33,12 +33,12 @@ public class MoneyData implements Serializable, Comparable<MoneyData> {
String defaultName, String nameCode, String displaySymbol,
final BigDecimal amount) {
this.currencyCode = currencyCode;
this.currencyDigitsAfterDecimal = currencyDigitsAfterDecimal;
this.digitsAfterDecimal = currencyDigitsAfterDecimal;
this.defaultName = defaultName;
this.nameCode = nameCode;
this.displaySymbol = displaySymbol;
BigDecimal amountStripped = amount.stripTrailingZeros();
this.amount = amountStripped.setScale(this.currencyDigitsAfterDecimal,
this.amount = amountStripped.setScale(this.digitsAfterDecimal,
RoundingMode.HALF_EVEN);
}
@@ -75,7 +75,7 @@ public class MoneyData implements Serializable, Comparable<MoneyData> {
private static CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getCurrencyDigitsAfterDecimal();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
@@ -96,10 +96,6 @@ public class MoneyData implements Serializable, Comparable<MoneyData> {
return this.currencyCode;
}
public Integer getCurrencyDigitsAfterDecimal() {
return this.currencyDigitsAfterDecimal;
}
public BigDecimal getAmount() {
return this.amount;
}
@@ -108,10 +104,6 @@ public class MoneyData implements Serializable, Comparable<MoneyData> {
this.currencyCode = currencyCode;
}
public void setCurrencyDigitsAfterDecimal(final Integer currencyDigitsAfterDecimal) {
this.currencyDigitsAfterDecimal = currencyDigitsAfterDecimal;
}
public void setAmount(final BigDecimal amount) {
this.amount = amount;
}
@@ -185,4 +177,12 @@ public class MoneyData implements Serializable, Comparable<MoneyData> {
public String getDisplaySymbolValue() {
return new StringBuilder().append(this.amount.toPlainString()).append(' ').append(this.displaySymbol).toString().trim();
}
public Integer getDigitsAfterDecimal() {
return digitsAfterDecimal;
}
public void setDigitsAfterDecimal(Integer digitsAfterDecimal) {
this.digitsAfterDecimal = digitsAfterDecimal;
}
}
@@ -1,204 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonFilter;
import org.joda.time.LocalDate;
@XmlRootElement(name = "newloanworkflow")
@JsonIgnoreProperties({ "organisationId", "organisationName" })
@JsonFilter("myFilter")
public class NewLoanWorkflowStepOneData implements Serializable {
private Long organisationId;
private String organisationName;
private Long clientId;
private String clientName;
private Long productId;
private String productName;
private List<LoanProductData> allowedProducts = new ArrayList<LoanProductData>();
// extra
private String dateFormat;
private String submittedOnDateFormatted;
private LocalDate submittedOnDate;
private String submittedOnNote = "";
private String expectedDisbursementDateFormatted;
private LocalDate expectedDisbursementDate = new LocalDate();
private String repaymentsStartingFromDateFormatted;
private LocalDate repaymentsStartingFromDate;
private String interestCalculatedFromDateFormatted;
private LocalDate interestCalculatedFromDate;
private LoanSchedule repaymentSchedule;
private LoanProductData selectedProduct;
public NewLoanWorkflowStepOneData() {
//
}
public Long getOrganisationId() {
return organisationId;
}
public void setOrganisationId(Long organisationId) {
this.organisationId = organisationId;
}
public String getOrganisationName() {
return organisationName;
}
public void setOrganisationName(String organisationName) {
this.organisationName = organisationName;
}
public Long getClientId() {
return clientId;
}
public void setClientId(Long clientId) {
this.clientId = clientId;
}
public String getClientName() {
return clientName;
}
public void setClientName(String clientName) {
this.clientName = clientName;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public List<LoanProductData> getAllowedProducts() {
return allowedProducts;
}
public void setAllowedProducts(List<LoanProductData> allowedProducts) {
this.allowedProducts = allowedProducts;
}
public LocalDate getSubmittedOnDate() {
return submittedOnDate;
}
public void setSubmittedOnDate(LocalDate submittedOnDate) {
this.submittedOnDate = submittedOnDate;
}
public String getSubmittedOnNote() {
return submittedOnNote;
}
public void setSubmittedOnNote(String submittedOnNote) {
this.submittedOnNote = submittedOnNote;
}
public LoanProductData getSelectedProduct() {
return selectedProduct;
}
public void setSelectedProduct(LoanProductData selectedProduct) {
this.selectedProduct = selectedProduct;
}
public LocalDate getExpectedDisbursementDate() {
return expectedDisbursementDate;
}
public void setExpectedDisbursementDate(LocalDate expectedDisbursementDate) {
this.expectedDisbursementDate = expectedDisbursementDate;
}
public LocalDate getRepaymentsStartingFromDate() {
return repaymentsStartingFromDate;
}
public void setRepaymentsStartingFromDate(LocalDate repaymentsStartingFromDate) {
this.repaymentsStartingFromDate = repaymentsStartingFromDate;
}
public LocalDate getInterestCalculatedFromDate() {
return interestCalculatedFromDate;
}
public void setInterestCalculatedFromDate(LocalDate interestCalculatedFromDate) {
this.interestCalculatedFromDate = interestCalculatedFromDate;
}
public LoanSchedule getRepaymentSchedule() {
return repaymentSchedule;
}
public void setRepaymentSchedule(LoanSchedule repaymentSchedule) {
this.repaymentSchedule = repaymentSchedule;
}
public String getDateFormat() {
return dateFormat;
}
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
}
public String getSubmittedOnDateFormatted() {
return submittedOnDateFormatted;
}
public void setSubmittedOnDateFormatted(String submittedOnDateFormatted) {
this.submittedOnDateFormatted = submittedOnDateFormatted;
}
public String getExpectedDisbursementDateFormatted() {
return expectedDisbursementDateFormatted;
}
public void setExpectedDisbursementDateFormatted(
String expectedDisbursementDateFormatted) {
this.expectedDisbursementDateFormatted = expectedDisbursementDateFormatted;
}
public String getRepaymentsStartingFromDateFormatted() {
return repaymentsStartingFromDateFormatted;
}
public void setRepaymentsStartingFromDateFormatted(
String repaymentsStartingFromDateFormatted) {
this.repaymentsStartingFromDateFormatted = repaymentsStartingFromDateFormatted;
}
public String getInterestCalculatedFromDateFormatted() {
return interestCalculatedFromDateFormatted;
}
public void setInterestCalculatedFromDateFormatted(
String interestCalculatedFromDateFormatted) {
this.interestCalculatedFromDateFormatted = interestCalculatedFromDateFormatted;
}
}
@@ -1,102 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.map.annotate.JsonFilter;
import org.joda.time.LocalDate;
@JsonFilter("myFilter")
public class OfficeData implements Serializable {
private Long id;
private String name;
private String externalId;
private LocalDate openingDate;
private String hierarchy;
private String parentName;
private Long parentId;
private List<OfficeLookup> allowedParents = new ArrayList<OfficeLookup>();
public OfficeData() {
//
}
public OfficeData(final Long id, final String name,
final String externalId, final LocalDate openingDate,
String hierarchy, final Long parentId, final String parentName) {
this.id = id;
this.name = name;
this.externalId = externalId;
this.openingDate = openingDate;
this.hierarchy = hierarchy;
this.parentName = parentName;
this.parentId = parentId;
}
public Long getId() {
return this.id;
}
public String getName() {
return this.name;
}
public String getExternalId() {
return this.externalId;
}
public LocalDate getOpeningDate() {
return this.openingDate;
}
public Long getParentId() {
return this.parentId;
}
public String getParentName() {
return this.parentName;
}
public void setId(final Long id) {
this.id = id;
}
public void setName(final String name) {
this.name = name;
}
public void setExternalId(final String externalId) {
this.externalId = externalId;
}
public void setOpeningDate(final LocalDate openingDate) {
this.openingDate = openingDate;
}
public void setParentName(final String parentName) {
this.parentName = parentName;
}
public void setParentId(final Long parentId) {
this.parentId = parentId;
}
public String getHierarchy() {
return hierarchy;
}
public void setHierarchy(String hierarchy) {
this.hierarchy = hierarchy;
}
public List<OfficeLookup> getAllowedParents() {
return allowedParents;
}
public void setAllowedParents(List<OfficeLookup> allowedParents) {
this.allowedParents = allowedParents;
}
}
@@ -1,30 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "officeLookup")
public class OfficeLookup implements Serializable {
private Long id;
private String name;
public OfficeLookup() {
//
}
public OfficeLookup(final Long id, final String name) {
this.id = id;
this.name = name;
}
public Long getId() {
return this.id;
}
public String getName() {
return this.name;
}
}
@@ -1,60 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;
import org.joda.time.LocalDate;
@XmlRootElement(name = "organisation")
public class OrganisationReadModel implements Serializable {
private Long id;
private String name;
private String contactName;
private LocalDate openingDate;
public OrganisationReadModel() {
//
}
public OrganisationReadModel(final Long id, final String name,
final String contactName, final LocalDate openingDate) {
this.id = id;
this.name = name;
this.contactName = contactName;
this.openingDate = openingDate;
}
public Long getId() {
return this.id;
}
public String getName() {
return this.name;
}
public String getContactName() {
return this.contactName;
}
public LocalDate getOpeningDate() {
return this.openingDate;
}
public void setId(final Long id) {
this.id = id;
}
public void setName(final String name) {
this.name = name;
}
public void setContactName(final String contactName) {
this.contactName = contactName;
}
public void setOpeningDate(final LocalDate openingDate) {
this.openingDate = openingDate;
}
}
@@ -1,91 +0,0 @@
package org.mifosng.data;
import java.io.Serializable;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonFilter;
@JsonIgnoreProperties({ "orgId", "groupType" })
@JsonFilter("permissionFilter")
public class PermissionData implements Serializable {
private Long id;
private Long orgId;
private String name;
private String description;
private String code;
private int groupType;
public PermissionData() {
//
}
public PermissionData(final Long id, final Long orgId, final String name,
final String description, final String code, int groupType) {
this.id = id;
this.orgId = orgId;
this.name = name;
this.description = description;
this.code = code;
this.groupType = groupType;
}
@Override
public boolean equals(Object obj) {
PermissionData data = (PermissionData) obj;
return this.code.equalsIgnoreCase(data.code);
}
@Override
public int hashCode() {
return this.code.hashCode();
}
public Long getId() {
return this.id;
}
public Long getOrgId() {
return this.orgId;
}
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
public String getCode() {
return this.code;
}
public void setId(final Long id) {
this.id = id;
}
public void setOrgId(final Long orgId) {
this.orgId = orgId;
}
public void setName(final String name) {
this.name = name;
}
public void setDescription(final String description) {
this.description = description;
}
public void setCode(final String code) {
this.code = code;
}
public int getGroupType() {
return groupType;
}
public void setGroupType(int groupType) {
this.groupType = groupType;
}
}
@@ -1,93 +0,0 @@
package org.mifosng.data;
import java.util.ArrayList;
import java.util.Collection;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonFilter;
@JsonIgnoreProperties({ "orgId" })
@JsonFilter("roleFilter")
public class RoleData {
private Long id;
private Long orgId;
private String name;
private String description;
private Collection<PermissionData> availablePermissions = new ArrayList<PermissionData>();
private Collection<PermissionData> selectedPermissions = new ArrayList<PermissionData>();
public RoleData() {
//
}
public RoleData(final Long id, final Long orgId, final String name,
final String description) {
this.id = id;
this.orgId = orgId;
this.name = name;
this.description = description;
}
@Override
public boolean equals(Object obj) {
RoleData role = (RoleData) obj;
return this.id.equals(role.getId());
}
@Override
public int hashCode() {
return this.id.hashCode();
}
public Long getId() {
return this.id;
}
public Long getOrgId() {
return this.orgId;
}
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
public void setId(final Long id) {
this.id = id;
}
public void setOrgId(final Long orgId) {
this.orgId = orgId;
}
public void setName(final String name) {
this.name = name;
}
public void setDescription(final String description) {
this.description = description;
}
public Collection<PermissionData> getAvailablePermissions() {
return availablePermissions;
}
public void setAvailablePermissions(
Collection<PermissionData> availablePermissions) {
this.availablePermissions = availablePermissions;
}
public Collection<PermissionData> getSelectedPermissions() {
return selectedPermissions;
}
public void setSelectedPermissions(
Collection<PermissionData> selectedPermissions) {
this.selectedPermissions = selectedPermissions;
}
}
@@ -63,7 +63,7 @@ public class ScheduledLoanInstallment implements Serializable {
private CurrencyData currencyData(MoneyData moneyData) {
String code = moneyData.getCurrencyCode();
String name = moneyData.getDefaultName();
int decimalPlaces = moneyData.getCurrencyDigitsAfterDecimal();
int decimalPlaces = moneyData.getDigitsAfterDecimal();
String displaySymbol = moneyData.getDisplaySymbol();
String nameCode = moneyData.getNameCode();
return new CurrencyData(code, name, decimalPlaces, displaySymbol, nameCode);
@@ -1,35 +0,0 @@
package org.mifosng.data.command;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class KeyValueInformation {
private String key;
private String value;
protected KeyValueInformation() {
//
}
public KeyValueInformation(String key, String value) {
this.key = key;
this.value = value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
@@ -1,40 +0,0 @@
package org.mifosng.data.command;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import org.mifosng.data.EntityIdentifier;
@XmlRootElement
public class UpdateClientInformationCommand {
private EntityIdentifier id;
private List<KeyValueInformation> fields = new ArrayList<KeyValueInformation>();
protected UpdateClientInformationCommand() {
//
}
public UpdateClientInformationCommand(EntityIdentifier id, List<KeyValueInformation> fields) {
this.id = id;
this.fields = fields;
}
public List<KeyValueInformation> getFields() {
return fields;
}
public void setFields(List<KeyValueInformation> fields) {
this.fields = fields;
}
public EntityIdentifier getId() {
return id;
}
public void setId(EntityIdentifier id) {
this.id = id;
}
}