com.adobe.flashaccess.sdk.license
Interface License


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

getLicenseId

java.lang.String getLicenseId()
Retrieves the license identifier for this license.

Returns:
The license identifier for this license.

getLicenseType

License.LicenseType getLicenseType()
Indicates whether this is a root or leaf license.

Returns:
The license type.

getRootLicenseId

java.lang.String getRootLicenseId()
Retrieves the root license identifier, if this is a leaf license with chaining.

Returns:
The root license identifier, or null if this is not a leaf license with an associated root.

getPolicyId

java.lang.String getPolicyId()
Retrieves the policy identifier used to generate the license.

Returns:
The policy identifier used to generate the license.

getLicenseStartDate

java.util.Date getLicenseStartDate()
Retrieves the date from which the license is valid. Content cannot be viewed before this date.

Returns:
The date from which the license is valid, or null if content is valid immediately.

setLicenseStartDate

void setLicenseStartDate(java.util.Date startDate)
Sets the date from which the license is valid. Content cannot be viewed before this date.

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.

Parameters:
startDate - The date from which the license is valid, or null if content is valid immediately.

getLicenseEndDate

java.util.Date getLicenseEndDate()
Retrieves the date after which the license is not valid. If set, content cannot be viewed after this 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.

Returns:
The date after which the license is not valid, or null if there is no expiration date.

setLicenseEndDate

void setLicenseEndDate(java.util.Date endDate)
Sets the date after which the license is not valid. If set, content cannot be viewed after this date.

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.

Parameters:
endDate - the date after which the license is not valid, or null if there is no expiration date.

getLicenseCachingEndDate

java.util.Date getLicenseCachingEndDate()
Retrieves the date after which a license may not be cached by the client. If set, a license cannot be cached after this date, but a user may still be able to download a license from the server each time they view the content.

Returns:
The date after which a license may not be cached by the client, or null if there is no license caching period end date (either license caching is not enabled, or licenses may be cached indefinitely).

setLicenseCachingEndDate

void setLicenseCachingEndDate(java.util.Date endDate)
Sets the date after which a license may not be cached by the client. As long as the license is cached and is valid, the client will not connect to the server to request a license.

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)

Parameters:
endDate - The date after which a license may not be cached by the client.

getAllowLicenseCaching

boolean getAllowLicenseCaching()
Indicates whether license caching is allowed. If caching is allowed, the license caching end date determines the amount of time the license can be cached; if the license caching end date is null, the license may be cached indefinitely.

Returns:
true if the license may be cached on the client, false otherwise.

setAllowLicenseCaching

void setAllowLicenseCaching(boolean allowCaching)
Sets whether license caching is allowed. If caching is allowed, the license caching end date determines the amount of time the license can be cached; if the license caching end date is 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.

Parameters:
allowCaching - true if the license may be cached on the client, false otherwise.

getRights

java.util.Collection getRights()
Retrieves the rights associated with the license. At least one right must be present in the license.

Returns:
Collection<Right> containing rights associated with the license, or an empty list if no rights have been set.

setRights

void setRights(java.util.Collection rights)
Sets the rights allowed by this license.

Parameters:
rights - Collection<Right> containing rights associated with the license.

getUser

Principal getUser()
Retrieves the user to which the license is issued, if applicable.

Returns:
The user to which the license is issued, or null if the license is anonymous.

setUser

void setUser(Principal user)
Sets the user to which the license is issued, if applicable.

Parameters:
user - The user to which the license is issued, or null if the license is anonymous.


[an error occurred while processing this directive] [an error occurred while processing this directive]