예제 #1
0
  @Override
  public ProfileSummary get(int id) {
    ProfileSummary profileSummary = profilePersister.getProfileSummary(id);

    if (profileSummary == null) {
      throw new NotFoundException();
    }

    if (!authService.canRead(profileSummary.getProfile())) {
      throw new NotAuthorizedException();
    }

    return profileSummary;
  }
예제 #2
0
    @Override
    protected Profile retrieveConcrete() throws SQLException {
      ProfileSummary profileSummary = getProfileSummary(conn, input);

      return profileSummary == null ? null : profileSummary.getProfile();
    }