Package com.streamreduce.core.model

Examples of com.streamreduce.core.model.User$Builder


        return userList;
    }

    @Override
    public User getUserById(ObjectId userId, Account account) throws UserNotFoundException {
        User u = userDAO.get(userId);
        User user = userDAO.findUserForUsername(account, u.getUsername());
        if (user == null) {
            throw new UserNotFoundException(u.getUsername());
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
View Full Code Here


        return user;
    }

    @Override
    public User getUserByAuthenticationToken(String authToken) throws UserNotFoundException {
        User user = userDAO.findByAuthToken(authToken);
        if (user == null) {
            throw new UserNotFoundException(authToken);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, user, null);
View Full Code Here

        return user;
    }

    @Override
    public User getUser(String username, Account account) throws UserNotFoundException {
        User u = userDAO.findUserForUsername(account, username);
        if (u == null) {
            throw new UserNotFoundException(username);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
View Full Code Here

        return u;
    }

    @Override
    public User getUser(String username) throws UserNotFoundException {
        User u = userDAO.findUser(username);
        if (u == null) {
            throw new UserNotFoundException(username);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
View Full Code Here

        return u;
    }

    @Override
    public User getTargetUser(Account account, String name) throws UserNotFoundException {
        User u = userDAO.findUserInAccount(account, name);
        if (u == null) {
            throw new UserNotFoundException(name);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
View Full Code Here

    @Override
    public void deleteAccount(ObjectId accountId) {
        try {
            // you can't delete the super user account
            User superUser = getSuperUser();
            if (superUser.getAccount().getId().equals(accountId)) {
                logger.error("You can not delete the Nodeable account");
                return;
            }
            Account toBeDeleted = getAccount(accountId);
            // Create the event stream entry
View Full Code Here

        userDAO.deleteById(user.getId());
    }

    @Override
    public User getUserFromInvite(String inviteKey, String accountId) throws UserNotFoundException {
        User u = userDAO.findInvitedUser(inviteKey, accountId);
        if (u == null) {
            throw new UserNotFoundException(inviteKey + "+" + accountId);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
View Full Code Here

        return u;
    }

    @Override
    public User getUserFromSignupKey(String signupKey, String userId) throws UserNotFoundException {
        User u = userDAO.findUser(signupKey, userId);
        if (u == null) {
            throw new UserNotFoundException(signupKey + "+" + userId);
        }
        // Create the event stream entry
        eventService.createEvent(EventId.READ, u, null);
View Full Code Here

     * @return A copy of the SuperUser object
     */
    @Override
    public User getSuperUser() {
        try {
            User cachedSuperUser = superUserCache.get("superuser", new Callable<User>() {
                @Override
                public User call() throws Exception {
                    return userDAO.findUser(Constants.NODEABLE_SUPER_USERNAME);
                }
            });
View Full Code Here

TOP

Related Classes of com.streamreduce.core.model.User$Builder

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.