Examples of GroupDAO


Examples of org.jdesktop.wonderland.modules.securitygroups.weblib.db.GroupDAO

    public Response get(@QueryParam("pattern") String patternParam,
                        @QueryParam("members") String membersParam,
                        @QueryParam("user") String userParam)
    {
        List<GroupEntity> res;
        GroupDAO groups = new GroupDAO(emf);

        // whether or not to include members
        boolean members = true;
        if (membersParam != null) {
            members = Boolean.parseBoolean(membersParam);
        }

        // fdin the group by user, pattern or all groups
        if (userParam != null) {
            // if a user was specified, find all that user's groups
            res = groups.findGroupsForMember(userParam);
        } else if (patternParam == null) {
            // if no user or pattern was specified, get all groups
            res = groups.getGroups();
        } else {
            // if a pattern was specified, search by pattern
            try {
                patternParam = URLDecoder.decode(patternParam, "UTF-8");
                patternParam = patternParam.replace('*', '%');
                res = groups.findGroups(patternParam);
            } catch (UnsupportedEncodingException uee) {
                uee.printStackTrace();
                return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build();
            }
        }
View Full Code Here

Examples of ru.org.linux.group.GroupDao

  public void prepareMessageTest() {
    ImmutableList<String> tags = ImmutableList.of("one", "two");
    Topic message = mock(Topic.class);

    PollDao pollDao = mock(PollDao.class);
    GroupDao groupDao = mock(GroupDao.class);
    UserDao userDao = mock(UserDao.class);
    SectionDao sectionDao = mock(SectionDaoImpl.class);
    DeleteInfoDao deleteInfoDao = mock(DeleteInfoDao.class);
    TopicDao messageDao = mock(TopicDao.class);
    UserAgentDao userAgentDao = mock(UserAgentDao.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.