Package org.jayasoft.woj.common.model

Examples of org.jayasoft.woj.common.model.Group


    return gSend;
  }

  public void addLicense(User user, Long groupId, String type, int nbLicense, ProductList prodList) throws ServiceException {
    try {
      Group group = (Group) DaoFactory.getGroupDao().find(groupId);
      Collection lics = prodList.getLicenses();
      if (lics.size() < nbLicense) {
          throw new ServiceException(RessourceBundleApplicationMessage.error("woj.page.admin.user.group.administrated.error.too.many.license", new Object[] {new Integer(nbLicense), new Integer(lics.size())}));
      }
      Iterator it = lics.iterator();
View Full Code Here


    }
  }

    public void addLicense(Long groupID, Long licenseID) throws ServiceException {
        try {
            Group g = (Group)DaoFactory.getGroupDao().find(groupID);
            License l = (License)DaoFactory.getLicenseDao().find(licenseID);
            addLicense(g, l);
        } catch (DaoException e) {
            LOGGER.warn("failed to retrieve group:" + groupID + " or license:" + licenseID);
            throw new ServiceException(RessourceBundleApplicationMessage.error("woj.page.admin.user.group.administrated.error.affect", null));         
View Full Code Here

        updateSpace(group);
    }
 
  public void removeLicense(Long groupId, Long licenseId) throws ServiceException {
    try {
      Group group = (Group) DaoFactory.getGroupDao().find(groupId);
      License license = (License) DaoFactory.getLicenseDao().find(licenseId);
      license.setGroup(null);
            license.setInvitedMail(null);
      DaoFactory.getLicenseDao().save(license);
            updateSpace(group);
View Full Code Here

          }
      }
     
      try {
          for (Iterator iter = groups.iterator(); iter.hasNext();) {
              Group group = (Group)iter.next();
              updateSpace(group);
          }
      } catch (DaoException e) {
          throw new ServiceException("failed to update space for groups of "+buyer, e);           
      }
View Full Code Here

TOP

Related Classes of org.jayasoft.woj.common.model.Group

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.