it.dtt.ca.util
Class ParentalControlLevel

java.lang.Object
  extended by it.dtt.ca.util.ParentalControlLevel

public class ParentalControlLevel
extends java.lang.Object

This class represent a parental control setting.

Parental Control levels will depend upon the current user.

The current user is defined and retrieved using the org.dvb.user.GeneralPreference("UserName", String userName).

The user name is stored by:

  • GeneralPreference myPref = new GeneralPreference("UserName", "John Doe");
  • UserPreferenceManager.getInstance().write(myPref);

    And can be read by:

  • GeneralPreference myPref = new GeneralPreference("UserName").
  • UserPreferenceManager.getInstance().read(myPref);
  • String myUserName = myPref.getMostFavourite();


    Field Summary
    static int PARENTAL_CONTROL_INTERMEDIATE_MODE
              This mode required an extra PIN input for viewing PPV events rated "RESTRICTED" and "ADULTS_ONLY", and no PIN for all other events.
    static int PARENTAL_CONTROL_PERMISSIVE_MODE
              This mode requires an extra PIN input for viewing PPV events rated "ADULTS_ONLY", and no PIN for all other events.
    static int PARENTAL_CONTROL_STRICT_MODE
              This mode requires an extra PIN input for viewing all PPV events except those rated "ALL_AUDIENCE".
     
    Constructor Summary
    protected ParentalControlLevel(int defaultValue)
              Construct an instance of this class.
     
    Method Summary
     int getValue()
              Get the parental control value; this is one of the values defined in this class.
     boolean isPinRequired(javax.tv.service.guide.ContentRatingAdvisory rating)
              Informs whether an extra PIN input is required for viewing all PPV events rated as indicated.
     void setValue(int value)
              Set the parental control level, which can be one of the levels defined as constants in this class.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    PARENTAL_CONTROL_STRICT_MODE

    public static final int PARENTAL_CONTROL_STRICT_MODE
    This mode requires an extra PIN input for viewing all PPV events except those rated "ALL_AUDIENCE".

    See Also:
    Constant Field Values

    PARENTAL_CONTROL_INTERMEDIATE_MODE

    public static final int PARENTAL_CONTROL_INTERMEDIATE_MODE
    This mode required an extra PIN input for viewing PPV events rated "RESTRICTED" and "ADULTS_ONLY", and no PIN for all other events.

    See Also:
    Constant Field Values

    PARENTAL_CONTROL_PERMISSIVE_MODE

    public static final int PARENTAL_CONTROL_PERMISSIVE_MODE
    This mode requires an extra PIN input for viewing PPV events rated "ADULTS_ONLY", and no PIN for all other events.

    See Also:
    Constant Field Values
    Constructor Detail

    ParentalControlLevel

    protected ParentalControlLevel(int defaultValue)
    Construct an instance of this class.

    Parameters:
    defaultValue - the initial value of the parental control setting (must be one of the constants defined in this class).
    Method Detail

    getValue

    public int getValue()
    Get the parental control value; this is one of the values defined in this class.

    Returns:
    the parental control level.

    setValue

    public void setValue(int value)
    Set the parental control level, which can be one of the levels defined as constants in this class. This allows the user to set which kind of PPV events should require an extra PIN input for viewing.

    Parameters:
    value - the new parental control level.

    isPinRequired

    public boolean isPinRequired(javax.tv.service.guide.ContentRatingAdvisory rating)
    Informs whether an extra PIN input is required for viewing all PPV events rated as indicated.

    Parameters:
    rating - the PPV event rating (@see Rating)
    Returns:
    TRUE if an extra PIN input is required for this rate