Package org.focusns.model.photo

Examples of org.focusns.model.photo.Photo


    @RequestMapping("photo-edit")
    public String doEdit(@RequestParam(required = false) Long albumId, @WidgetAttribute Project project,
                         @WidgetAttribute ProjectUser projectUser, Model model) {
        //
        Photo photo = new Photo();
        photo.setAlbumId(albumId==null?0:albumId);
        photo.setProjectId(project.getId());
        photo.setCreatedById(projectUser.getId());
        model.addAttribute("photo", photo);
        //
        List<Album> albums = albumService.listAlbums(project.getId());
        model.addAttribute("albums", albums);
        //
View Full Code Here


                                             @RequestParam(required = false) Integer height, WebRequest webRequest) throws IOException {
        //
        boolean notModified = false;
        InputStream inputStream = null;
        //
        Photo photo = photoService.getPhoto(photoId);
        Object[] photoCoordinates = CoordinateHelper.getPhotoCoordinates(photo);
        if(width==null || height==null) {
            long lastModified = storageService.checkResource(photoCoordinates);
            if(lastModified>0 && webRequest.checkNotModified(lastModified)) {
                notModified = true;
View Full Code Here

    @Autowired
    private ProjectUserDao projectUserDao;

    @Override
    public Photo getPhoto(long photoId) {
        Photo photo = photoDao.select(photoId);
        return fillPhoto(photo);
    }
View Full Code Here

        if (album==null) {
            return album;
        }
        //
        if(album.getPhoto()==null && album.getPhotoId()>0) {
            Photo photo = photoDao.select(album.getPhotoId());
            album.setPhoto(photo);
        }
        if(album.getProject()==null && album.getProjectId()>0) {
            Project project = projectDao.select(album.getProjectId());
            album.setProject(project);
View Full Code Here

    @Autowired
    private PhotoService photoService;

    @Test
    public void testCreatePhoto() {
        Photo photo = new Photo();
        photo.setAlbumId(1);
        photo.setCreatedAt(new Date());
        photo.setCreatedById(1);
        photo.setProjectId(1);
        //
        photoService.createPhoto(photo);
    }
View Full Code Here

    @Event(on = "CREATE_PHOTO", point = Event.Point.AFTER)
    public void afterCreatePhoto(EventContext eventContext) {
        AlbumDao albumDao = eventContext.getApplicationContext().getBean(AlbumDao.class);
        //
        Photo photo = (Photo) eventContext.getArguments()[0];
        Album album = albumDao.select(photo.getAlbumId());
        album.setPhotoId(photo.getId());
        albumDao.update(album);
    }
View Full Code Here

TOP

Related Classes of org.focusns.model.photo.Photo

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.