Examples of PhotoAlbumException


Examples of org.richfaces.photoalbum.util.PhotoAlbumException

     */
    public List<Shelf> searchByShelves(String searchQuery, boolean searchInMyAlbums, boolean searchInShared)
        throws PhotoAlbumException {
        Query query = searchQueryFactory.getQuery(SearchEntityEnum.SHELF, user, searchInShared, searchInMyAlbums, searchQuery);
        if (null == query) {
            throw new PhotoAlbumException(Constants.WRONG_SEARCH_PARAMETERS_ERROR);
        }
        return (List<Shelf>) query.getResultList();
    }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

            // the image will be sent in an event
            image.setAlbum(parentAlbum);
        } catch (Exception e) {
            parentAlbum.addImage(image);
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

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

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

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

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

            Image image = comment.getImage();
            image.removeComment(comment);
            em.remove(em.merge(comment));
            em.flush();
        } catch (Exception e) {
            throw new PhotoAlbumException(e.getMessage());
        }
    }
View Full Code Here

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

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

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

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

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

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

            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

Examples of org.richfaces.photoalbum.util.PhotoAlbumException

            em.flush();

            //shelf.setOwner(owner);
        } catch (Exception e) {
            owner.addShelf(shelf);
            throw new PhotoAlbumException(e.getMessage());
        }
    }
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.