it.dtt.ca.ppv
Class GenericProduct

java.lang.Object
  extended by it.dtt.ca.ppv.Product
      extended by it.dtt.ca.ppv.GenericProduct

public class GenericProduct
extends Product

This class represents products which can be bought through the CA system but which do not correspond to any of the other sub-classes of Product. It implements methods left abstract in base class Product.


Field Summary
 
Fields inherited from class it.dtt.ca.ppv.Product
GENERIC_PRODUCT, PPT_EVENT, PPV_EVENT, PPV_PACKAGE, SUBSCRIPTION
 
Constructor Summary
protected GenericProduct(java.lang.String id, java.lang.String name)
          Create an instance of GenericProduct representing content that can be purchased through the CA system.
 
Method Summary
 int getType()
          Returns the product type
 boolean isFree()
          Check if the product is freely viewable.
 
Methods inherited from class it.dtt.ca.ppv.Product
equals, getContainedProducts, getDescription, getExtendedDescription, getId, getName, getPreviewTime, getPrice, getPrivateData, getPurchaseWindowEndTime, getPurchaseWindowStartTime, hashCode, setDescription, setExtendedDescription, setPreviewTime, setPrivateData, setPurchaseWindowEndTime, setPurchaseWindowStartTime
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericProduct

protected GenericProduct(java.lang.String id,
                         java.lang.String name)
Create an instance of GenericProduct representing content that can be purchased through the CA system.

Parameters:
id - the product id.
name - the product name.
Method Detail

isFree

public boolean isFree()
               throws FieldNotPresentException
Description copied from class: Product
Check if the product is freely viewable.

Specified by:
isFree in class Product
Returns:
true if the product is free, false if the product is a pay per view product.
Throws:
FieldNotPresentException - if the field is not stored

getType

public int getType()
Returns the product type

Specified by:
getType in class Product
Returns:
product type
See Also:
Product.GENERIC_PRODUCT