Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.Group


    return groupVOList;
  }

    public GroupVO create(GroupVO groupVO) throws ConstraintException, SystemException
    {
        Group group = new GroupImpl();
        group.setValueObject(groupVO);
        group = (Group) createEntity(group);
        return group.getValueObject();
    }    
View Full Code Here


        return group.getValueObject();
    }    

    public Group create(GroupVO groupVO, Database db) throws ConstraintException, SystemException, Exception
    {
        Group group = new GroupImpl();
        group.setValueObject(groupVO);
        group = (Group) createEntity(group, db);
        return group;
    }    
View Full Code Here

        removeUsers(groupVO.getGroupName());
       
        Database db = CastorDatabaseService.getDatabase();
        ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

        Group group = null;

        beginTransaction(db);

        try
        {
            //add validation here if needed
      group = update(groupVO, userNamesSet, db);

            //If any of the validations or setMethods reported an error, we throw them up now before create.
            ceb.throwIfNotEmpty();
           
            commitTransaction(db);
        }
        catch(ConstraintException ce)
        {
            logger.warn("An error occurred so we should not complete the transaction:" + ce, ce);
            rollbackTransaction(db);
            throw ce;
        }
        catch(Exception e)
        {
            logger.error("An error occurred so we should not complete the transaction:" + e, e);
            rollbackTransaction(db);
            throw new SystemException(e.getMessage());
        }

        return group.getValueObject();
    }       
View Full Code Here

        return group.getValueObject();
    }       

    public Group update(GroupVO groupVO, Set<String> userNamesSet, Database db) throws ConstraintException, SystemException, Exception
    {
      Group group = getGroupWithId(groupVO.getGroupName(), db);
     
      if(userNamesSet != null)
      {
          for (String userName : userNamesSet)
          {
        addUser(groupVO.getGroupName(), userName, db);
          }
      }
     
        group.setValueObject(groupVO);

        return group;
    }       
View Full Code Here

         
          QueryResults results = oql.execute(Database.READONLY);
     
      while(results.hasMore())
            {
              Group group = (Group)results.next();
              groupVOList.add(group.getValueObject());
            }
     
      results.close();
      oql.close();
        }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.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.