Examples of User


Examples of org.apache.mina.avro.generated.User

    }

    @Override
    public List<User> getObjects() {
        List<User> genericRecordList = new ArrayList<User>(1);
        User user1 = new User("Red User", 11, "Red");
        genericRecordList.add(user1);

        return genericRecordList;
    }
View Full Code Here

Examples of org.apache.openejb.assembler.util.User

            if (this.context == null) {
                throw new UserNotAuthenticated();
            }

            try {
                final User user = (User) this.context.lookup("openejb/UserBusinessRemote");
                user.adminOnly();
            } catch (Exception e) {
                throw new UserNotAuthenticated(e);
            }
        }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.user.User

    try {
      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);
      if (AuthLevelUtil.checkUserLevel(user_level)) {

        User user = userManager.getUserById(users_id);
        long language_id = (user == null) ? 1 : user.getLanguage_id();
        List<AppointmentReminderTyps> res = appointmentReminderTypDao
            .getAppointmentReminderTypList(language_id);

        if (res == null || res.size() < 1) {
          log.debug("no remindertyps found!");
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.user.User

      currentClient.setUsercolor(colorObj);

      // Inject externalUserId if nothing is set yet
      if (currentClient.getExternalUserId() == null) {
        if (currentClient.getUser_id() != null) {
          User us = usersDao.get(currentClient.getUser_id());
          if (us != null) {
            currentClient.setExternalUserId(us.getExternalUserId());
            currentClient.setExternalUserType(us.getExternalUserType());
          }
        }
      }

      // This can be set without checking for Moderation Flag
View Full Code Here

Examples of org.apache.photark.security.authorization.User

            userId = GUEST;
        }
        if (!initialised) {
            init();
        }
        User user = null;
        try {
            Session session = repositoryManager.getSession();
            // //to delete userStore
            // Node root = session.getRootNode();
            // Node userStoreT= root.getNode("userStore");
            // userStoreT.remove();
            // session.save();
            // //
            Node allUsers = (Node)session.getItem("/" + USER_STORE + "/" + ALL_USERS);
            Node userNode;
            if (allUsers != null && allUsers.hasNode(JCREncoder.toJCRFormat(userId))) {
                userNode = allUsers.getNode(JCREncoder.toJCRFormat(userId));
                user = new User(JCREncoder.toNormalFormat(userNode.getName()));
                UserInfo userInfo =
                    new UserInfo(JCREncoder.toNormalFormat(userNode.getProperty(USER_DISPLAY_NAME).getValue()
                        .getString()), JCREncoder.toNormalFormat(userNode.getProperty(USER_EMAIL).getValue()
                        .getString()), JCREncoder.toNormalFormat(userNode.getProperty(USER_REAL_NAME).getValue()
                        .getString()), JCREncoder.toNormalFormat(userNode.getProperty(USER_WEBSITE).getValue()
                        .getString()));
                user.setUserInfo(userInfo);
            }
        } catch (Exception e) {
            // FIXME: ignore for now
            e.printStackTrace();
        }
View Full Code Here

Examples of org.apache.qpid.server.model.User

        final Map<String, Object> childAttrs = new HashMap<String, Object>();

        childAttrs.put(User.NAME, getTestName());
        childAttrs.put(User.PASSWORD, "password");
        User user = _authManager.addChild(User.class, childAttrs);
        assertNotNull("User should be created but addChild returned null", user);
        assertEquals(getTestName(), user.getName());
        // password shouldn't actually be the given string, but instead salt and the hashed value
        assertFalse("Password shouldn't actually be the given string, but instead salt and the hashed value", "password".equals(user.getPassword()));

        AuthenticationResult authResult =
                _authManager.authenticate(getTestName(), "password");

        assertEquals("User should authenticate with given password", AuthenticationResult.AuthenticationStatus.SUCCESS, authResult.getStatus());

        assertEquals("Manager should have exactly one user child",1, _authManager.getChildren(User.class).size());
        assertEquals("Manager should have exactly one user child",1, _authManager.getUsers().size());


        user.delete();

        assertEquals("No users should be present after child deletion", 0, _authManager.getChildren(User.class).size());


        authResult = _authManager.authenticate(getTestName(), "password");
View Full Code Here

Examples of org.apache.rave.model.User

        assertThat(converter.convert(template), is(sameInstance(template)));
    }

    @Test
    public void nullConversion() {
        User template = null;
        assertThat(converter.convert(template), is(nullValue()));
    }
View Full Code Here

Examples of org.apache.rave.portal.model.User

    }

    @Test(expected = SecurityException.class)
    public void deleteUserDetail_wrongToken() {
        ModelMap modelMap = new ExtendedModelMap();
        User user = new User(123L, "john.doe.sr");
        SessionStatus sessionStatus = createMock(SessionStatus.class);
        sessionStatus.setComplete();

        expectLastCall();
        replay(sessionStatus);
View Full Code Here

Examples of org.apache.rave.rest.model.User

    @Override
    public Response getUser(String id) {
        org.apache.rave.model.User user = userService.getUserById(id);
        if (user != null) {
            return Response.ok(new User(user)).build();
        } else {
            return Response.status(Response.Status.NOT_FOUND).build();
        }
    }
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.User

    public void testWeblogStats() throws Exception {
       
        WeblogManager wmgr = WebloggerFactory.getWeblogger().getWeblogManager();
        UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
       
        User user1 = TestUtils.setupUser("statuser1");
        Weblog blog1 = TestUtils.setupWeblog("statblog1", user1);
        Weblog blog2 = TestUtils.setupWeblog("statblog2", user1);

        Weblog blog3 = TestUtils.setupWeblog("statblog3", user1);
        blog3.setEnabled(Boolean. FALSE);
        umgr.saveWebsite(blog3);

        WeblogEntry entry1 = TestUtils.setupWeblogEntry("entry1",
                testWeblog.getDefaultCategory(), blog1, user1);
        WeblogEntry entry2 = TestUtils.setupWeblogEntry("entry2",
                testWeblog.getDefaultCategory(), blog1, user1);
       
        WeblogEntry entry3 = TestUtils.setupWeblogEntry("entry3",
                testWeblog.getDefaultCategory(), blog2, user1);
        WeblogEntry entry4 = TestUtils.setupWeblogEntry("entry4",
                testWeblog.getDefaultCategory(), blog2, user1);
        WeblogEntry entry5 = TestUtils.setupWeblogEntry("entry5",
                testWeblog.getDefaultCategory(), blog2, user1);
              
        WeblogEntryComment comment1 = TestUtils.setupComment("comment1", entry1);
        WeblogEntryComment comment2 = TestUtils.setupComment("comment2", entry1);
       
        WeblogEntryComment comment3 = TestUtils.setupComment("comment3", entry3);
        WeblogEntryComment comment4 = TestUtils.setupComment("comment4", entry3);
        WeblogEntryComment comment5 = TestUtils.setupComment("comment5", entry3);
        TestUtils.endSession(true);

        try {
            blog1 = umgr.getWebsite(blog1.getId());
            blog2 = umgr.getWebsite(blog2.getId());
           
            assertEquals(2L, blog1.getEntryCount());
            assertEquals(3L, blog2.getEntryCount());
            assertEquals(5L, wmgr.getEntryCount());

            assertEquals(2L, blog1.getCommentCount());
            assertEquals(3L, blog2.getCommentCount());
            assertEquals(5L, wmgr.getCommentCount());

            assertEquals(4L, umgr.getWeblogCount());
            assertEquals(2L, umgr.getUserCount());
           
        } finally {
           
            TestUtils.teardownComment(comment1.getId());
            TestUtils.teardownComment(comment2.getId());
            TestUtils.teardownComment(comment3.getId());
            TestUtils.teardownComment(comment4.getId());
            TestUtils.teardownComment(comment5.getId());

            TestUtils.teardownWeblogEntry(entry1.getId());
            TestUtils.teardownWeblogEntry(entry2.getId());
            TestUtils.teardownWeblogEntry(entry3.getId());
            TestUtils.teardownWeblogEntry(entry4.getId());
            TestUtils.teardownWeblogEntry(entry5.getId());

            TestUtils.teardownWeblog(blog1.getId());
            TestUtils.teardownWeblog(blog2.getId());
            TestUtils.teardownWeblog(blog3.getId());

            TestUtils.teardownUser(user1.getId());     
           
            TestUtils.endSession(true);
        }
    }
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.