コード例 #1
0
ファイル: UserProxyService.java プロジェクト: GUEDDES/semrs
  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
ファイル: UserProxyService.java プロジェクト: GUEDDES/semrs
  @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;
  }