it.dtt.ca.ppv
Class Subscription

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

public class Subscription
extends Product

This class represents a subscription for a service Where methods take an array as an input parameter, implementations should take a copy of the array. Where methods return an array, a copy should be returned and modifications to the array should be ignored by the implementation until or unless the array is passed back to the implementation as a parameter to a method call.


Field Summary
 
Fields inherited from class it.dtt.ca.ppv.Product
GENERIC_PRODUCT, PPT_EVENT, PPV_EVENT, PPV_PACKAGE, SUBSCRIPTION
 
Constructor Summary
protected Subscription(java.lang.String id, java.lang.String name, javax.tv.locator.Locator[] services, java.util.Date start, java.util.Date end)
          Create a Subscription object.
 
Method Summary
 javax.tv.locator.Locator[] getServices()
          Get the list of services that make part of this Subscription.
 java.util.Date getSubscriptionEnd()
          Retrieves the end date for validity of the subscription
 java.util.Date getSubscriptionStart()
          Retrieves the start date for validity of the subscription
 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

Subscription

protected Subscription(java.lang.String id,
                       java.lang.String name,
                       javax.tv.locator.Locator[] services,
                       java.util.Date start,
                       java.util.Date end)
Create a Subscription object.

Parameters:
id - the subscription service ID.
name - the subscription service name.
services - the services that make part of this Subscription.
start - the starting date of the subscription service.
end - the ending date of the subscription service.
Method Detail

getSubscriptionStart

public java.util.Date getSubscriptionStart()
Retrieves the start date for validity of the subscription

Returns:
the date

getSubscriptionEnd

public java.util.Date getSubscriptionEnd()
Retrieves the end date for validity of the subscription

Returns:
the date

getServices

public javax.tv.locator.Locator[] getServices()
Get the list of services that make part of this Subscription.

Returns:
array of locators indicating the services.

isFree

public boolean isFree()
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.

getType

public int getType()
Returns the product type

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