public class LicenseTool extends java.lang.Object implements LicenseCreator, LicenseParser
Modifier and Type | Method and Description |
---|---|
void |
addGrant(org.iso.mpeg.mxm.tEngine.relTE.technologyhandler.RELRight right,
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Condition condition)
With this method the user may add a new Grant in the license.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource |
createDigitalResource(java.lang.String url)
This method creates a Digital Resource reference that is the Resource that is protected by the license.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource |
createDIReference(java.lang.String diIdentifier)
This method creates a Digital Item Reference that is the Resource that is protected by the license.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal |
createIdentityHolder(java.lang.String principalIdentifier)
This method enables the creation of principals that are identified by their identity.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal |
createKeyHolder(org.iso.mpeg.mxm.tEngine.securityTE.schemahandler.dsig.X509Data x509data)
This method creates a new key holder every time a user wishes to define a principal for a grant.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.PropertyPossessor |
createPropertyPossessor(java.lang.String propertyURI) |
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource |
createProtectedResource(java.lang.String url,
byte[] key)
This method creates a Digital Resource reference that is the Resource that is protected by the license.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Condition |
createValidityIntervalCondition(java.util.Date notBeforeDate,
java.util.Date notAfterDate)
With this method the user may create all types of conditions, including territory and temporal conditions.
|
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.License |
generateLicense()
This method generates a new license that contains all submitted data.
|
byte[] |
getEncryptedKey() |
java.util.List<java.lang.String> |
getPropertyPossessorRights(java.lang.String propertyURI) |
java.util.List<java.lang.String> |
getPropertyPossessors() |
java.lang.String |
getResourceUrl() |
static LicenseCreator |
newLicenseCreator() |
static LicenseParser |
newLicenseParser() |
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.License |
parseLicenseFile(java.io.File licenseFile) |
org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.License |
parseLicenseString(java.lang.String licenseStr) |
void |
setForAll(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.PropertyPossessor propertypossessor) |
void |
setIssuer(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal issuer)
Sets the issuer of a license in case this is needed before the actual issue of the license.
|
void |
setLicenseIdentifier(java.lang.String identifier)
Sets identifier of the license.
|
void |
setPrincipal(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal principal)
Adds a principal to the grants of the license.
|
void |
setResource(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource resource)
This method sets the Resource that is to be protected by the license.
|
boolean |
storeLicense(java.lang.String filePath) |
public static LicenseCreator newLicenseCreator()
public static LicenseParser newLicenseParser()
public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.License parseLicenseFile(java.io.File licenseFile)
parseLicenseFile
in interface LicenseParser
public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.License parseLicenseString(java.lang.String licenseStr)
parseLicenseString
in interface LicenseParser
public boolean storeLicense(java.lang.String filePath)
storeLicense
in interface LicenseParser
public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.PropertyPossessor createPropertyPossessor(java.lang.String propertyURI)
createPropertyPossessor
in interface LicenseCreator
public void setForAll(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.PropertyPossessor propertypossessor)
setForAll
in interface LicenseCreator
public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal createKeyHolder(org.iso.mpeg.mxm.tEngine.securityTE.schemahandler.dsig.X509Data x509data)
createKeyHolder
in interface LicenseCreator
x509data
- Certificate of the principal.public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal createIdentityHolder(java.lang.String principalIdentifier)
createIdentityHolder
in interface LicenseCreator
principalIdentifier
- The identifier of a principal.public void setLicenseIdentifier(java.lang.String identifier)
setLicenseIdentifier
in interface LicenseCreator
identifier
- The license identifier.public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource createDIReference(java.lang.String diIdentifier)
createDIReference
in interface LicenseCreator
diIdentifier
- The digital item identifier.public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource createDigitalResource(java.lang.String url)
createDigitalResource
in interface LicenseCreator
url
- The url to access the resource.public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource createProtectedResource(java.lang.String url, byte[] key)
createProtectedResource
in interface LicenseCreator
url
- The url to access the resource.public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Condition createValidityIntervalCondition(java.util.Date notBeforeDate, java.util.Date notAfterDate)
createValidityIntervalCondition
in interface LicenseCreator
notBeforeDate
- The type of the condition.public void setIssuer(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal issuer)
setIssuer
in interface LicenseCreator
issuer
- The issuer of the license.public void setPrincipal(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Principal principal)
setPrincipal
in interface LicenseCreator
principal
- The principal to add.public void addGrant(org.iso.mpeg.mxm.tEngine.relTE.technologyhandler.RELRight right, org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Condition condition)
addGrant
in interface LicenseCreator
right
- The right of the grant.condition
- The conditions that should be met.public void setResource(org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.Resource resource)
setResource
in interface LicenseCreator
resource
- The resource.public org.iso.mpeg.mxm.tEngine.relTE.schemahandler.relr.License generateLicense()
generateLicense
in interface LicenseCreator
public java.lang.String getResourceUrl()
getResourceUrl
in interface LicenseParser
public byte[] getEncryptedKey()
getEncryptedKey
in interface LicenseParser
public java.util.List<java.lang.String> getPropertyPossessorRights(java.lang.String propertyURI)
getPropertyPossessorRights
in interface LicenseParser
public java.util.List<java.lang.String> getPropertyPossessors()
getPropertyPossessors
in interface LicenseParser