Package org.richfaces.photoalbum.model.event

Examples of org.richfaces.photoalbum.model.event.ErrorEvent


    private void onError(boolean isShowOnUI) {
        stopSlideshow();
        errorDetected = true;
        ApplicationUtils.addToRerender(Constants.MAINAREA_ID);
        if (isShowOnUI) {
            error.fire(new ErrorEvent(Constants.NO_IMAGES_FOR_SLIDESHOW_ERROR));
        }
        return;
    }
View Full Code Here


        }

        Image image = (Image) selectedImage.getImage();

        if (!fileManager.isFilePresent(image.getFullPath())) {
            error.fire(new ErrorEvent(Constants.IMAGE_RECENTLY_DELETED_ERROR));
            active = false;
            errorDetected = true;
            ApplicationUtils.addToRerender(Constants.MAINAREA_ID);
            model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(),
                image.getAlbum(), null, image.getAlbum().getImages());
View Full Code Here

        this.event = (Event) event.getDropValue();

        // check if the album is already shared
        if (this.event.getGooglePlusAlbumIds().contains(albumId)) {
            setAlbumAlreadyShared(true);
            error.fire(new ErrorEvent("This album is already shared in this event"));
            return;
        }

        String albumName = "";
        try {
            albumName = gpac.getAlbum(albumId).getString("name");
        } catch (JSONException e) {
            // nothing, the exception will not be thrown
        }

        for (Album album : this.event.getShelf().getAlbums()) {
            if (album.getName() == albumName) {
                setAlbumAlreadyShared(true);
                error.fire(new ErrorEvent("Album with this name has already been imported to this event"));
                return;
            }
        }

        setAlbumAlreadyShared(false);
View Full Code Here

        event.getRemoteAlbumIds().add("G" + albumId);

        try {
            ea.editEvent(event);
        } catch (PhotoAlbumException pae) {
            error.fire(new ErrorEvent("Error saving event", pae.getMessage()));
        }
    }
View Full Code Here

    public void importAlbum() {
        try {
            fdm.setUpDownload(gpac.getAlbum(albumId).getString("name"), albumId, gpac.getImagesOfAlbum(albumId), event);
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error importing album", je.getMessage()));
        }

    }
View Full Code Here

        this.event = (Event) event.getDropValue();

        // check if the album is already shared
        if (this.event.getFacebookAlbumIds().contains(albumId)) {
            setAlbumAlreadyShared(true);
            error.fire(new ErrorEvent("This album is already shared in this event"));
            return;
        }

        String albumName = "";
        try {
            albumName = fac.getAlbum(albumId).getString("name");
        } catch (JSONException e) {
            // nothing, the exception will not be thrown
        }

        for (Album album : this.event.getShelf().getAlbums()) {
            if (album.getName() == albumName) {
                setAlbumAlreadyShared(true);
                error.fire(new ErrorEvent("Album with this name has already been imported to this event"));
                return;
            }
        }

        setAlbumAlreadyShared(false);
View Full Code Here

        event.getRemoteAlbumIds().add("F" + albumId);

        try {
            ea.editEvent(event);
        } catch (PhotoAlbumException pae) {
            error.fire(new ErrorEvent("Error saving event", pae.getMessage()));
        }
    }
View Full Code Here

    public void importAlbum() {
        try {
            fdm.setUpDownload(fac.getAlbum(albumId).getString("name"), albumId, fac.getImageMap(albumId), event);
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error importing album", je.getMessage()));
        }

    }
View Full Code Here

                }
                images.put(albumId, null);
                albums.put(albumId, jo);
            }
        } catch (JSONException je) {
            error.fire(new ErrorEvent("Error", je.getMessage()));
        }
    }
View Full Code Here

            storeAlbums(jo.getJSONArray("albums"), jo.getJSONArray("covers"));
            storeImagesToAlbum(jo.getJSONArray("images"));
            setNeedsUpdate(false);
        } catch (JSONException e) {
            error.fire(new ErrorEvent("Error: ", e.getMessage()));
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.photoalbum.model.event.ErrorEvent

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.