Package org.jayasoft.woj.portal.actions.util

Examples of org.jayasoft.woj.portal.actions.util.ProductList


        Collection unGroupedLincense = ServiceFactory.getLicenseService().getLicenseWithoutGroupBuyedBy(u, false);
        Map code2ProdList = new HashMap();
        for (Iterator iter = unGroupedLincense.iterator(); iter.hasNext();) {
            License license = (License) iter.next();
            if (ServiceFactory.getLicenseService().isGroupable(license)) {
                ProductList prodList = null;
                if (license.getOwner()!=null) {
                    // The license is in use by a user
                    prodList = new ProductList(license.getProductCode());
                    prodList.setOwner(license.getOwner().getLogin());
                    code2ProdList.put(license.getProductCode() + license.getOwner().getId(), prodList);
                } else {
                    String code = license.getProductCode();
                    prodList = (ProductList) code2ProdList.get(code);
                    if (prodList == null) {
                        prodList = new ProductList(code);
                        code2ProdList.put(code, prodList);
                    }
                }
                prodList.addLicense(license);
                prodList.increaseProductCount();
            }
        }
       
        request.getSession().setAttribute(Params.USER_GROUP.SHOW.SESSION.PROD_LIST, code2ProdList);
    }
View Full Code Here


                            addWOJMessages(request, RessourceBundleApplicationMessage.warning("woj.page.admin.user.group.nogroup.selected", null));
                        } else if (nbLicense == null || nbLicense.intValue() < 1 ){
                            addWOJMessages(request, RessourceBundleApplicationMessage.warning("woj.page.admin.user.group.no.license.number", null));
                        } else {
                            Map prods = (Map)request.getSession().getAttribute(Params.USER_GROUP.SHOW.SESSION.PROD_LIST);
                            ProductList prodList = (ProductList)prods.get(prodListCode);
                            try {
                                ServiceFactory.getGroupService().addLicense(userLogged, groupId, type, nbLicense.intValue(), prodList);
                            } catch (ServiceException se) {
                                addWOJMessages(request, Arrays.asList(se.getErrors()));
                            }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.portal.actions.util.ProductList

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.