Package com.skyline.base.exception

Examples of com.skyline.base.exception.NoResourceException


  }

  @Override
  public List<Photo> listPhotoFilesOfAlbum(long albumId, int authority) {
    if (albumId == 0) {
      throw new NoResourceException("Id为0的相册不存在");
    }
    return photoDao.queryPhotoFilesOfAlbum(albumId, authority);
  }
View Full Code Here


  @Override
  public Album getUserPortraitAlbum(long ownerId) {
    List<Album> albums = albumDao.queryUserAlbumByActivity(ownerId, Activity.UNDELETABLE);
    if (CollectionUtils.isEmpty(albums)) {
      throw new NoResourceException("Id为" + ownerId + "的用户不存在头像相册");
    } else {
      return albums.get(0);
    }
  }
View Full Code Here

  public Video queryVideoById(@Param("id") Long id) throws NoResourceException {
    try {
      Video video = jdbcTemplate.queryForObject(queryVideoByIdSql, VideoMapper.getMapper(), id);
      return video;
    } catch (Exception e) {
      throw new NoResourceException("id为" + id + "的视频不存在");
    }
  }
View Full Code Here

  }

  public Article getArticleById(Long id) {
    Article article = articleDao.queryArticleById(id);
    if (article == null) {
      throw new NoResourceException();
    } else {

      return article;
    }
  }
View Full Code Here

      if (authority < albumAuth) {
        throw new NoVisitPermissionException("ID为:" + viewerId + "的用户没有访问ID为:"
            + photo.getId() + "图片的权限");
      }
    } else {
      throw new NoResourceException("ID为:" + photoId + "的图片不存在");
    }
    List<Photo> photos = albumService.listPhotoFilesOfAlbum(photo.getAlbumId(), authority);

    ModelAndView mav = new ModelAndView(ViewPaths.ALBUM_VIEWPHOTO);
    mav.addObject("photo", photo);
View Full Code Here

TOP

Related Classes of com.skyline.base.exception.NoResourceException

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.