|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface License
Represents a license, which grants a set of rights to a user.
Nested Class Summary | |
---|---|
static class |
License.LicenseType
Identifies the type of license. |
Method Summary | |
---|---|
boolean |
getAllowLicenseCaching()
Indicates whether license caching is allowed. |
java.util.Date |
getLicenseCachingEndDate()
Retrieves the date after which a license may not be cached by the client. |
java.util.Date |
getLicenseEndDate()
Retrieves the date after which the license is not valid. |
java.lang.String |
getLicenseId()
Retrieves the license identifier for this license. |
java.util.Date |
getLicenseStartDate()
Retrieves the date from which the license is valid. |
License.LicenseType |
getLicenseType()
Indicates whether this is a root or leaf license. |
java.lang.String |
getPolicyId()
Retrieves the policy identifier used to generate the license. |
java.util.Collection |
getRights()
Retrieves the rights associated with the license. |
java.lang.String |
getRootLicenseId()
Retrieves the root license identifier, if this is a leaf license with chaining. |
Principal |
getUser()
Retrieves the user to which the license is issued, if applicable. |
void |
setAllowLicenseCaching(boolean allowCaching)
Sets whether license caching is allowed. |
void |
setLicenseCachingEndDate(java.util.Date endDate)
Sets the date after which a license may not be cached by the client. |
void |
setLicenseEndDate(java.util.Date endDate)
Sets the date after which the license is not valid. |
void |
setLicenseStartDate(java.util.Date startDate)
Sets the date from which the license is valid. |
void |
setRights(java.util.Collection rights)
Sets the rights allowed by this license. |
void |
setUser(Principal user)
Sets the user to which the license is issued, if applicable. |
Method Detail |
---|
java.lang.String getLicenseId()
License.LicenseType getLicenseType()
java.lang.String getRootLicenseId()
null
if this is not a leaf license with an associated root.java.lang.String getPolicyId()
java.util.Date getLicenseStartDate()
null
if content is valid immediately.void setLicenseStartDate(java.util.Date startDate)
All dates must be between January 1, 1970 and December 31, 9999 (GMT)
If the end date has been set, it must be after the start date.
startDate
- The date from which the license is valid, or null
if content is valid immediately.java.util.Date getLicenseEndDate()
The license end date also controls the deletion of client state associated with a license. For example, to enforce the Playback Window restriction, the client stores the time the user first plays the content. This information is deleted when the license end date passes. Therefore, if the user obtains a new license, the playback window would start again.
null
if there is no
expiration date.void setLicenseEndDate(java.util.Date endDate)
All dates must be between January 1, 1970 and December 31, 9999 (GMT)
If the start date has been set, it must be before the end date.
The license end date also controls the deletion of client state associated with a license. For example, to enforce the Playback Window restriction, the client stores the time the user first plays the content. This information is deleted when the license end date passes. Therefore, if the user obtains a new license, the playback window would start again.
endDate
- the date after which the license is not valid, or null
if there is no
expiration date.java.util.Date getLicenseCachingEndDate()
null
if there is no
license caching period end date (either license caching is not enabled, or licenses may
be cached indefinitely).void setLicenseCachingEndDate(java.util.Date endDate)
The end date is ignored if License.getAllowLicenseCaching()
returns false
.
Setting the end date to a non-null
value results in license caching
being enabled.
All dates must be between January 1, 1970 and December 31, 9999 (GMT)
endDate
- The date after which a license may not be cached by the client.boolean getAllowLicenseCaching()
null
, the license may be cached indefinitely.
true
if the license may be cached on the client, false
otherwise.void setAllowLicenseCaching(boolean allowCaching)
null
, the license may be cached indefinitely.
Setting the value to false
is equivalent to setting the license caching
duration in the policy to Policy.LICENSE_CACHING_DISABLED
.
If caching is disabled by calling this method and the license caching end date is
subsequently set to a non-null
value, setting the end date results in
license caching being re-enabled.
allowCaching
- true
if the license may be cached on the client, false
otherwise.java.util.Collection getRights()
Right
> containing rights associated with the license, or an empty list if no rights have been set.void setRights(java.util.Collection rights)
rights
- Collection<Right
> containing rights associated with the license.Principal getUser()
null
if the license is anonymous.void setUser(Principal user)
user
- The user to which the license is issued, or null
if the license is anonymous.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |