Пример #1
0
  public com.googlecode.semrs.client.model.User getCurrentUser() {
    com.googlecode.semrs.client.model.User user = null;
    try {

      User currentUser = userService.getCurrentUser();
      genericService.fill(currentUser, "roles");

      user =
          (com.googlecode.semrs.client.model.User)
              BeanMapping.convert(clientMappingProperties, currentUser);
    } catch (Exception e) {
      LOG.info("Error getting user: "******" caused by: " + e);
    }
    return user;
  }
Пример #2
0
  @Override
  public UserDetails loadUserByUsername(String userName)
      throws UsernameNotFoundException, DataAccessException {
    UserDetails user = null;
    try {
      User serverUser = userService.getUserByUsername(userName, false);
      genericService.fill(serverUser, "roles");
      user =
          (com.googlecode.semrs.model.proxy.User)
              BeanMapping.convert(mappingProperties, serverUser);

    } catch (Exception e) {
      LOG.error(e);
    }
    return user;
  }