it.dtt.ca.ppv
Class PPVEvent

java.lang.Object
  extended by it.dtt.ca.ppv.Product
      extended by it.dtt.ca.ppv.PPVEvent
Direct Known Subclasses:
PPTEvent

public class PPVEvent
extends Product

Class describing PPV events. 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 PPVEvent(java.lang.String id, java.lang.String name, javax.tv.locator.Locator locator, javax.tv.service.guide.ContentRatingAdvisory rating, java.util.Date startTime, java.util.Date endTime, PPVPackage[] packages)
          Create a PPVEvent.
 
Method Summary
 java.util.Date getEndTime()
          Get the ending time of the PPV event.
 javax.tv.locator.Locator getLocator()
          Returns the locator connected with this event.
 PPVPackage[] getPackages()
          Provides the list of packages in which this PPV event is contained.
 javax.tv.service.guide.ContentRatingAdvisory getRating()
          Get the rating of this event.
 java.util.Date getStartTime()
          Get the starting time of the PPV event.
 int getType()
          Returns the product type
 boolean isFree()
          Check if the product is freely viewable.
protected  void setEndTime(java.util.Date endTime)
          Deprecated. no replacement Set the ending time of the PPV event.
protected  void setPackages(PPVPackage[] packages)
          Deprecated. no replacement Set the list of packages in which this PPV event is contained.
protected  void setStartTime(java.util.Date startTime)
          Deprecated. no replacement Set the starting time of the PPV event.
 
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

PPVEvent

protected PPVEvent(java.lang.String id,
                   java.lang.String name,
                   javax.tv.locator.Locator locator,
                   javax.tv.service.guide.ContentRatingAdvisory rating,
                   java.util.Date startTime,
                   java.util.Date endTime,
                   PPVPackage[] packages)
Create a PPVEvent.

Parameters:
id - the PPV event id.
name - the PPV event name.
locator - the locator of this PPV event.
rating - the rating of this PPV event.
startTime - the start time of this PPV event.
endTime - the end time of this PPV event.
packages - the array containing all packages associated to this PPV event.
Method Detail

getRating

public javax.tv.service.guide.ContentRatingAdvisory getRating()
Get the rating of this event. Depending on the rating, the CAManager may require an extra PIN input in order to play the event.

Returns:
the rating of this event.

getLocator

public javax.tv.locator.Locator getLocator()
Returns the locator connected with this event.

Returns:
the locator.

getPackages

public PPVPackage[] getPackages()
                         throws FieldNotPresentException
Provides the list of packages in which this PPV event is contained.

Returns:
the list of packages in which the event is contained.
Throws:
FieldNotPresentException - if the information is not available.

setPackages

protected void setPackages(PPVPackage[] packages)
Deprecated. no replacement Set the list of packages in which this PPV event is contained.

Parameters:
packages - The packages to set.

getStartTime

public java.util.Date getStartTime()
                            throws FieldNotPresentException
Get the starting time of the PPV event.

Returns:
the start time and date of the PPV event.
Throws:
FieldNotPresentException - if the field is not stored

setStartTime

protected void setStartTime(java.util.Date startTime)
Deprecated. no replacement Set the starting time of the PPV event.

Parameters:
startTime - The startTime to set.

getEndTime

public java.util.Date getEndTime()
                          throws FieldNotPresentException
Get the ending time of the PPV event.

Returns:
time and date
Throws:
FieldNotPresentException - if the field is not stored

setEndTime

protected void setEndTime(java.util.Date endTime)
Deprecated. no replacement Set the ending time of the PPV event.

Parameters:
endTime - The endTime to set.

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.PPV_EVENT