Package com.mossle.api.scope

Examples of com.mossle.api.scope.ScopeDTO


    private ScopeCache scopeCache;
    private String destinationName = "topic.scope.update";

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

            if (scopeDto.getName() == null) {
                scopeCache.removeScope(scopeDto);
                logger.info("remove scopeDto : {}", message);
            } else {
                scopeCache.updateScope(scopeDto);
                logger.info("update scopeDto : {}", message);
View Full Code Here


    private static Logger logger = LoggerFactory
            .getLogger(MockScopeConnector.class);
    private ScopeDTO scopeDto;

    public MockScopeConnector() {
        scopeDto = new ScopeDTO();
        scopeDto.setId("1");
        scopeDto.setCode("default");
        scopeDto.setName("default");
        scopeDto.setUserRepoRef("1");
        scopeDto.setShared(true);
View Full Code Here

        }

        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);

        for (Map<String, Object> map : list) {
            ScopeDTO scopeDto = new ScopeDTO();
            scopeDto.setId(map.get("scopeId").toString());
            scopeDto.setName(map.get("scopeName").toString());
            scopeDto.setCode(map.get("scopeCode").toString());
            scopeDto.setRef(map.get("scopeRef").toString());
            scopeDto.setShared(Integer.valueOf(1).equals(map.get("shared")));
            scopeDto.setUserRepoRef(map.get("userRepoRef").toString());

            scopeCache.updateScope(scopeDto);
        }
    }
View Full Code Here

            + " from AUTH_USER_STATUS us,AUTH_USER_ROLE ur,AUTH_ROLE r"
            + " 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

        return process(userDto, scopeDto, true);
    }

    public UserAuthDTO findByRef(String ref, String scopeId) {
        ScopeDTO scopeDto = scopeConnector.findById(scopeId);
        UserDTO userDto = userConnector.findByRef(ref,
                scopeDto.getUserRepoRef());

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

        return process(userDto, scopeDto, false);
    }

    public UserAuthDTO findById(String id, String scopeId) {
        ScopeDTO scopeDto = scopeConnector.findById(scopeId);
        UserDTO userDto = userConnector.findById(id);

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

TOP

Related Classes of com.mossle.api.scope.ScopeDTO

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.