Package thejavaclasses.lecture4.enumfactories

Examples of thejavaclasses.lecture4.enumfactories.Gallery


            System.out.println(album.getName());
        }
    }

    public static void main(String[] args) {
        GalleryFactory flickrFactory = Factories.createFactory(PICASA);
        GalleryService flickrService = flickrFactory.getGalleryService("login", "password");
        addAlbums(flickrFactory, flickrService);
        printAlbums(flickrService);
    }
View Full Code Here


        }
    }

    public static void main(String[] args) {
        GalleryFactory flickrFactory = Factories.createFactory(PICASA);
        GalleryService flickrService = flickrFactory.getGalleryService("login", "password");
        addAlbums(flickrFactory, flickrService);
        printAlbums(flickrService);
    }
View Full Code Here

            System.out.println(album.getName());
        }
    }

    public static void main(String[] args) {
        Gallery gallery = Gallery.Picasa;
        GalleryService service = gallery.getGalleryService("another login", "encrypted password");
        addAlbums(gallery, service);
        printAlbums(service);
    }
View Full Code Here

    public GalleryService getGalleryService(String login, String password) {
        return new FlickrService(login, password);
    }

    public Album createAlbum(String name) {
        return new FlickrAlbum(name);
    }
View Full Code Here

* @author Qwest
*/
class FlickrFactory implements GalleryFactory {
   
    public GalleryService getGalleryService(String login, String password) {
        return new FlickrService(login, password);
    }
View Full Code Here

    public GalleryService getGalleryService(String login, String password) {
        return new PicasaService(login, password);
    }

    public Album createAlbum(String name) {
        return new PicasaAlbum(name);
    }
View Full Code Here

* @author Qwest
*/
class PicasaFactory implements GalleryFactory {

    public GalleryService getGalleryService(String login, String password) {
        return new PicasaService(login, password);
    }
View Full Code Here

TOP

Related Classes of thejavaclasses.lecture4.enumfactories.Gallery

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.