com.adobe.flashaccess.sdk.policyupdate
Class PolicyUpdateListFactory

java.lang.Object
  extended by com.adobe.flashaccess.sdk.policyupdate.PolicyUpdateListFactory

public class PolicyUpdateListFactory
extends java.lang.Object

This class is used to create policy update lists or load existing lists. The lists provide information to the server regarding policies which have been updated or revoked after having been used to package content. If a policy has been updated, the policy update lists a new policy which is to be used in its place. If a policy has been revoked, no license may be issued from the policy.

A policy update/revocation list may consist of:


Constructor Summary
PolicyUpdateListFactory(ServerCredential serverCredential)
          Creates a PolicyUpdateListFactory.
 
Method Summary
 void addEntries(PolicyUpdateList updateList)
          Add all entries from the given PolicyUpdateList.
 void addRevocationEntry(PolicyRevocationEntry revocationEntry)
          Adds a policy revocation entry to the policy update list.
 void addUpdatedEntry(PolicyUpdateEntry updateEntry)
          Adds a policy update entry to the policy update list.
 PolicyUpdateList generatePolicyUpdateList()
          Creates an unsigned policy update list.
static PolicyUpdateList loadPolicyUpdateList(java.io.InputStream pul)
          Parses an existing PolicyUpdateList.
 void setNextUpdateDate(java.util.Date nextUpdate)
          Sets the expiration date and time of the revocation list to be created.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyUpdateListFactory

public PolicyUpdateListFactory(ServerCredential serverCredential)
Creates a PolicyUpdateListFactory. The supplied license server credential will be used to sign the generated PolicyUpdateList.

Parameters:
serverCredential - The license server credential used to sign the generated policy update list.
Method Detail

loadPolicyUpdateList

public static PolicyUpdateList loadPolicyUpdateList(java.io.InputStream pul)
                                             throws PolicyUpdateListException
Parses an existing PolicyUpdateList. Call PolicyUpdateList.verifySignature() to check the signature before providing the PolicyUpdateList to any APIs. The expiration date of the Policy Update List should also be checked before using. Attempts to use an expired Policy Update List will result in an ExpiredPolicyUpdateListException.

Parameters:
pul - A serialized PolicyUpdateList.
Returns:
A valid policy update list.
Throws:
PolicyUpdateListException

addEntries

public void addEntries(PolicyUpdateList updateList)
Add all entries from the given PolicyUpdateList.

Parameters:
updateList - The policy update list to consume.

addUpdatedEntry

public void addUpdatedEntry(PolicyUpdateEntry updateEntry)
Adds a policy update entry to the policy update list. Only a single update entry can exist for any given policy identifier. Adding a policy update entry which has the same policy identifier as an existing PolicyUpdateEntry will result in only the newly-added entry existing in the list.

Policy revocation entries supersede the PolicyUpdateEntry in the policy update list.

If a policy revocation entry is added and a corresponding PolicyUpdateEntry exists in the list, the policy revocation entry will be added and the existing PolicyUpdateEntry will be removed.

If a policy revocation entry is added and a corresponding entry exists in the list, the policy revocation entry will not be added.

Parameters:
updateEntry - PolicyUpdateEntry to add to the PolicyUpdateList

addRevocationEntry

public void addRevocationEntry(PolicyRevocationEntry revocationEntry)
Adds a policy revocation entry to the policy update list. Only a single revocation entry can exist for any given policy identifier. Adding a policy revocation entry which has the same policy identifier as an existing policy revocation entry will result in only the newly-added entry existing in the list.

Policy revocation entries supersede the policy revocation entry in the policy update list.

If a policy revocation entry is added and a corresponding PolicyUpdateEntry exists in the list, the policy revocation entry will be added and the PolicyUpdateEntry removed.

If a PolicyUpdateEntry is added and a corresponding policy revocation entry exists in the list, the policy update entry will not be added.

Parameters:
revocationEntry - The policy revocation entry to add to the PolicyUpdateList.

setNextUpdateDate

public void setNextUpdateDate(java.util.Date nextUpdate)
Sets the expiration date and time of the revocation list to be created. (optional)

If set, the expiration date cannot be before the date and time of which this list was created.

Parameters:
nextUpdate - The expiration date and time of the revocation list to be created.

generatePolicyUpdateList

public PolicyUpdateList generatePolicyUpdateList()
                                          throws PolicyUpdateListException
Creates an unsigned policy update list.

Returns:
A newly-generated policy update list.
Throws:
PolicyUpdateListException - If a corrupted policy was specified, an I/O issue exists, or if the next update is in the past.


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