Examples of Album


Examples of org.osforce.connect.entity.gallery.Album

      model.put("teamMember", teamMember);
    } else if(StringUtils.equals(Event.NAME, activity.getEntity())) {
      Event event = eventService.getEvent(activity.getLinkedId());
      model.put("event", event);
    } else if(StringUtils.equals(Album.NAME, activity.getEntity())) {
      Album album = albumService.getAlbum(activity.getLinkedId());
      model.put("album", album);
    } else if(StringUtils.equals(Photo.NAME, activity.getEntity())) {
      Photo photo = photoService.getPhoto(activity.getLinkedId());
      model.put("photo", photo);
    } else if(StringUtils.equals(Question.NAME, activity.getEntity())) {
View Full Code Here

Examples of org.osforce.connect.entity.gallery.Album

    if(photo.getModifiedId()!=null) {
      User modifiedBy = userDao.get(photo.getModifiedId());
      photo.setModifiedBy(modifiedBy);
    }
    if(photo.getAlbumId()!=null) {
      Album album = albumDao.get(photo.getAlbumId());
      photo.setAlbum(album);
    }
    if(photo.getRealFileId()!=null) {
      Attachment realFile = attachmentDao.get(photo.getRealFileId());
      photo.setRealFile(realFile);
View Full Code Here

Examples of org.osforce.connect.entity.gallery.Album

  }

  @AfterReturning("execution(* org.osforce.connect.service.gallery.AlbumService.createAlbum(..)) ||" +
  "execution(* org.osforce.connect.service.gallery.AlbumService.updateAlbum(..))")
  public void updateAlbum(JoinPoint jp) {
    Album album = (Album) jp.getArgs()[0];
    Map<Object, Object> context = CollectionUtil.newHashMap();
    context.put("albumId", album.getId());
    context.put("template", TEMPLATE_ALBUM_UPDATE);
    albumActivityStreamTask.doAsyncTask(context);
  }
View Full Code Here

Examples of org.osforce.connect.entity.gallery.Album

  }

  @Override
  protected void doTask(Map<Object, Object> context) throws Exception {
    Long albumId = (Long) context.get("albumId");
    Album album = albumService.getAlbum(albumId);
    String template = (String) context.get("template");
    Activity activity = new Activity();
    activity.setLinkedId(albumId);
    activity.setEntity(Album.NAME);
    activity.setType(Album.NAME);
    activity.setDescription(template);
    activity.setFormat(Activity.FORMAT_FTL);
    activity.setProjectId(album.getProjectId());
    activity.setEnteredId(album.getModifiedId());
    activityService.createActivity(activity);
  }
View Full Code Here

Examples of org.richfaces.photoalbum.model.Album

     * This method observes <code>Constants.ALBUM_ADDED_EVENT</code> and invoked after the user add new album
     *
     * @param album - added album
     */
    public void onAlbumAdded(@Observes @EventType(Events.ALBUM_ADDED_EVENT) AlbumEvent ae) {
        Album album = ae.getAlbum();
        if (album.isShowAfterCreate()) {
            model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getOwner(), album.getShelf(), album, null, album.getImages());
        }
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.Album

     * This method observes <code>Constants.ALBUM_EDITED_EVENT</code> and invoked after the user edit her album
     *
     * @param album - edited album
     */
    public void onAlbumEdited(@Observes @EventType(Events.ALBUM_EDITED_EVENT) AlbumEvent ae) {
        Album album = ae.getAlbum();
        model.resetModel(NavigationEnum.ALBUM_PREVIEW, model.getSelectedUser(), model.getSelectedShelf(), album, null,
            album.getImages());
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.Album

     * @param image - deleted image
     * @param path - relative path of the image file
     */
    public void onImageDeleted(@Observes @EventType(Events.IMAGE_DELETED_EVENT) ImageEvent ie) {
        loggedUserBean.refreshUser();
        Album album = ie.getImage().getAlbum();
        model.resetModel(NavigationEnum.ALBUM_PREVIEW, getLoggedUser(), album.getShelf(), album, null, album.getImages());
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.Album

        if (!(getLoggedUser().getShelves().size() > 0)) {
            // If user have no shelves, that can start fileupload process
            showError("", Constants.FILE_UPLOAD_SHOW_ERROR);
            return;
        }
        Album alb = null;
        // If selected album belongs to user
        alb = setDefaultAlbumToUpload(alb);
        model.resetModel(NavigationEnum.FILE_UPLOAD, getLoggedUser(), alb != null ? alb.getShelf() : null, alb, null,
            alb != null ? alb.getImages() : null);
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.Album

            if (a.getName().equals(value)) {
                return a;
            }
        }

        return new Album();
    }
View Full Code Here

Examples of org.richfaces.photoalbum.model.Album

        Shelf shelf = em.createQuery("select s from Shelf s order by s.id", Shelf.class).getResultList().get(0);

        Assert.assertNotNull(shelf);

        Album newAlbum = new Album();
        newAlbum.setName("new album");
        newAlbum.setDescription("new album description");
        newAlbum.setShelf(shelf);
        newAlbum.setCreated(new Date());

        aa.addAlbum(newAlbum);

        Assert.assertTrue(helper.getAllAlbums(em).contains(newAlbum));
        Assert.assertEquals(originalSize + 1, helper.getAllAlbums(em).size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.