Package com.mossle.api.user

Examples of com.mossle.api.user.UserDTO


        String receiver = bpmConfNotice.getReceiver();
        BpmMailTemplate bpmMailTemplate = bpmConfNotice.getBpmMailTemplate();
        ExpressionManager expressionManager = Context
                .getProcessEngineConfiguration().getExpressionManager();
        UserDTO userDto = null;

        if ("任务接收人".equals(receiver)) {
            userDto = userConnector.findById(delegateTask.getAssignee());
        } else if ("流程发起人".equals(receiver)) {
            userDto = userConnector.findById((String) delegateTask
View Full Code Here


            dest = msgInfo;

            String userId = SpringSecurityUtils.getCurrentUserId();
            dest.setSenderId(userId);

            UserDTO userDto = userConnector.findByUsername(username, "1");

            if (userDto == null) {
                throw new IllegalStateException("user not exists : " + username);
            }

            dest.setReceiverId(userDto.getId());
            dest.setCreateTime(new Date());
            dest.setStatus(0);
        }

        msgInfoManager.save(dest);
View Full Code Here

            return null;
        }

        logger.debug("{}", map);

        UserDTO userDTO = new UserDTO();
        userDTO.setId(convertString(map.get("id")));
        userDTO.setUsername(convertString(map.get("username")));
        userDTO.setDisplayName(convertString(map.get("nick_name")));
        userDTO.setEmail(convertString(map.get("email")));
        userDTO.setMobile(convertString(map.get("mobile")));
        userDTO.setUserRepoRef(convertString(map.get("user_repo_ref")));
        userDTO.setStatus(convertInt(map.get("status"), 1));

        return userDTO;
    }
View Full Code Here

public class UserConnectorWrapper implements UserConnector {
    private UserConnector userConnector;
    private UserCache userCache;

    public UserDTO findById(String id) {
        UserDTO userDto = userCache.findById(id);

        if (userDto == null) {
            synchronized (userCache) {
                userDto = userCache.findById(id);
View Full Code Here

        return userDto;
    }

    public UserDTO findByUsername(String username, String userRepoRef) {
        UserDTO userDto = userCache.findByUsername(username, userRepoRef);

        if (userDto == null) {
            synchronized (userCache) {
                userDto = userCache.findByUsername(username, userRepoRef);
View Full Code Here

        return userDto;
    }

    public UserDTO findByRef(String ref, String userRepoRef) {
        UserDTO userDto = userCache.findByRef(ref, userRepoRef);

        if (userDto == null) {
            synchronized (userCache) {
                userDto = userCache.findByRef(ref, userRepoRef);
View Full Code Here

    private ScopeConnector scopeConnector;
    private UserAuthConnector userAuthConnector;

    public void handleMessage(String message) {
        try {
            UserDTO userDto = jsonMapper.fromJson(message, UserDTO.class);

            userCache.removeUser(userDto);

            for (ScopeDTO scopeDto : scopeConnector.findAll()) {
                UserAuthDTO userAuthDto = userAuthConnector.findByUsername(
                        userDto.getUsername(), scopeDto.getId());
                userAuthCache.removeUserAuth(userAuthDto);
            }

            logger.info("remove user : {}", message);
        } catch (IOException ex) {
View Full Code Here

    private static Logger logger = LoggerFactory
            .getLogger(MockUserConnector.class);
    private UserDTO userDto;

    public MockUserConnector() {
        userDto = new UserDTO();
        userDto.setId("1");
        userDto.setUsername("lingo");
        userDto.setDisplayName("lingo");
        userDto.setEmail("lingo.mossle@gmail.com");
        userDto.setMobile("13800138000");
View Full Code Here

    private ScopeConnector scopeConnector;
    private UserAuthConnector userAuthConnector;

    public void handleMessage(String message) {
        try {
            UserDTO userDto = jsonMapper.fromJson(message, UserDTO.class);

            userCache.updateUser(userDto);

            for (ScopeDTO scopeDto : scopeConnector.findAll()) {
                UserAuthDTO userAuthDto = userAuthConnector.findByUsername(
                        userDto.getUsername(), scopeDto.getId());
                userAuthCache.updateUserAuth(userAuthDto);
            }

            logger.info("update user : {}", message);
        } catch (IOException ex) {
View Full Code Here

            + " where us.id=ur.user_status_id and ur.role_id=r.id"
            + " and us.ref=? and us.scope_id=?";

    public UserAuthDTO findByUsername(String username, String scopeId) {
        ScopeDTO scopeDto = scopeConnector.findById(scopeId);
        UserDTO userDto = userConnector.findByUsername(username,
                scopeDto.getUserRepoRef());
        Assert.notNull(userDto, "cannot find user by (" + username + ","
                + scopeId + ")");

        return process(userDto, scopeDto, true);
View Full Code Here

TOP

Related Classes of com.mossle.api.user.UserDTO

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.