Package org.richfaces.photoalbum.util

Examples of org.richfaces.photoalbum.util.PhotoAlbumException


     * @throws PhotoAlbumException
     */
    public void addComment(Comment comment) throws PhotoAlbumException {
        Image image = comment.getImage();
        if (!image.isAllowComments()) {
            throw new PhotoAlbumException("Cannot add comments to this image");
        }
        try {
            image.addComment(comment);
            em.persist(comment);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here


            }
            image.addMetaTag(metaTag);
            metaTag.addImage(image);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

        try {
            image.removeMetaTag(metaTag);
            metaTag.removeImage(image);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

            em.persist(shelf);
            // Add reference to user
            shelf.getOwner().addShelf(shelf);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

            em.flush();

            //shelf.setOwner(owner);
        } catch (Exception e) {
            owner.addShelf(shelf);
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

    public void editShelf(Shelf shelf) throws PhotoAlbumException {
        try {
            em.merge(shelf);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

        try {
            em.persist(album);
            album.getShelf().addAlbum(album);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

            em.flush();

            album.setShelf(parentShelf);
        } catch (Exception e) {
            parentShelf.addAlbum(album);
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

    public void editAlbum(Album album) throws PhotoAlbumException {
        try {
            em.merge(album);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

    public void register(User user) throws PhotoAlbumException {
        try {
            em.persist(user);
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.photoalbum.util.PhotoAlbumException

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.