be.bastard.mtracker
Class MediaFactory

java.lang.Object
  extended by be.bastard.mtracker.MediaFactory

public class MediaFactory
extends java.lang.Object

Factory class for MediaItems.

Since:
1.0-SNAPSHOT
Author:
Jo Vandermeeren

Field Summary
static Dvd.ContentType defaultDvdContentType
           
protected static long mediaCatalogCounter
           
 
Constructor Summary
MediaFactory()
           
 
Method Summary
static Dvd createDvd()
          Factory method to create a default DVD.
static Dvd createDvd(Dvd.ContentType contentType)
          Factory method to create a DVD with default name and specific content type.
static Dvd createDvd(java.lang.String title)
          Factory method to create a DVD with name title and default content type.
static Dvd createDvd(java.lang.String title, Dvd.ContentType contentType)
          Factory method to create a DVD with specific name and content type.
static MediaCatalog createMediaCatalog()
          Factory method to create a default media catalog.
static MediaCatalog createMediaCatalog(java.lang.String catalogName)
          Factory method to create a media catalog with name catalogName.
static MediaId createMediaId()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mediaCatalogCounter

protected static long mediaCatalogCounter

defaultDvdContentType

public static final Dvd.ContentType defaultDvdContentType
Constructor Detail

MediaFactory

public MediaFactory()
Method Detail

createMediaId

public static MediaId createMediaId()

createMediaCatalog

public static MediaCatalog createMediaCatalog()
Factory method to create a default media catalog.
The name of the catalog will be "catalog-x", where 'x' is the number of catalogs that has been created with the factory method.

Returns:
Default MediaCatalog implementation

createMediaCatalog

public static MediaCatalog createMediaCatalog(java.lang.String catalogName)
Factory method to create a media catalog with name catalogName.

Parameters:
catalogName - The name you want to give to the catalog
Returns:
MediaCatalog implementation with name catalogName

createDvd

public static Dvd createDvd()
Factory method to create a default DVD.
The DVD's name will be "dvd-x", where 'x' is the number of DVD's that have been created with the factory method.
The DVD's content type will be set to Dvd.ContentType.MIXED

Returns:
Default Dvd implementation

createDvd

public static Dvd createDvd(java.lang.String title)
Factory method to create a DVD with name title and default content type.
The DVD's content type will be set to Dvd.ContentType.MIXED

Parameters:
title - The name of this DVD
Returns:
Dvd implementation with name title and default content type

createDvd

public static Dvd createDvd(Dvd.ContentType contentType)
Factory method to create a DVD with default name and specific content type.

Parameters:
contentType - The type of content this DVD contains
Returns:
Dvd implementation with specific content type

createDvd

public static Dvd createDvd(java.lang.String title,
                            Dvd.ContentType contentType)
Factory method to create a DVD with specific name and content type.

Parameters:
title - The name of this DVD
contentType - The type of content this DVD contains
Returns:
Dvd implementation with specific name and content type


Copyright 2006 null. All Rights Reserved.