Пример #1
0
  /** Converts an image to vo, with path data */
  public ImageVO toVO(final OwneredImage image, final String basePath) {
    if (image == null) {
      return null;
    }

    final ImageVO vo = toVO((Image) image, basePath);
    vo.setCaption(image.getCaption());
    return vo;
  }
Пример #2
0
 public ImageVO toVO(final Image image, final String basePath) {
   ImageVO vo = new ImageVO();
   Long id = image.getId();
   vo.setId(id);
   vo.setLastModified(image.getLastModified());
   if (basePath != null) {
     vo.setThumbnailUrl(basePath + "/thumbnail?id=" + id);
     vo.setFullUrl(basePath + "/image?id=" + id);
   }
   return vo;
 }