Package org.mifosplatform.portfolio.loanproduct.productmix.data

Examples of org.mifosplatform.portfolio.loanproduct.productmix.data.ProductMixData


    @Produces({ MediaType.APPLICATION_JSON })
    public String retrieveTemplate(@PathParam("productId") final Long productId, @Context final UriInfo uriInfo) {

        this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);

        ProductMixData productMixData = this.productMixReadPlatformService.retrieveLoanProductMixDetails(productId);

        final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
        if (settings.isTemplate()) {
            final Collection<LoanProductData> productOptions = this.loanProductReadPlatformService.retrieveAvailableLoanProductsForMix();
            productMixData = ProductMixData.withTemplateOptions(productMixData, productOptions);
View Full Code Here


            if (!rs.next()) {
                final Collection<LoanProductData> restrictedProducts = this.loanProductReadPlatformService
                        .retrieveRestrictedProductsForMix(this.productId);
                final Collection<LoanProductData> allowedProducts = this.loanProductReadPlatformService
                        .retrieveAllowedProductsForMix(this.productId);
                final ProductMixData productMixData = ProductMixData.withRestrictedOptions(restrictedProducts, allowedProducts);
                extractedData.put(this.productId, productMixData);
                return extractedData;
            }
            /* move the cursor to starting of resultset */
            rs.beforeFirst();
            while (rs.next()) {
                final Long productId = rs.getLong("productId");
                final String name = rs.getString("name");
                final Collection<LoanProductData> restrictedProducts = this.loanProductReadPlatformService
                        .retrieveRestrictedProductsForMix(productId);
                final Collection<LoanProductData> allowedProducts = this.loanProductReadPlatformService
                        .retrieveAllowedProductsForMix(productId);
                final ProductMixData productMixData = ProductMixData.withDetails(productId, name, restrictedProducts, allowedProducts);
                extractedData.put(productId, productMixData);
            }
            return extractedData;
        }
View Full Code Here

        if (isProductMixTemplate) {
            this.context.authenticatedUser().validateHasReadPermission("PRODUCTMIX");

            final Collection<LoanProductData> productOptions = this.loanProductReadPlatformService.retrieveAvailableLoanProductsForMix();
            final ProductMixData productMixData = ProductMixData.template(productOptions);
            return this.productMixDataApiJsonSerializer.serialize(settings, productMixData, this.PRODUCT_MIX_DATA_PARAMETERS);
        }

        LoanProductData loanProduct = this.loanProductReadPlatformService.retrieveNewLoanProductDetails();
        loanProduct = handleTemplate(loanProduct);
View Full Code Here

TOP

Related Classes of org.mifosplatform.portfolio.loanproduct.productmix.data.ProductMixData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.