public static final class License.Builder extends Object
build().| Constructor and Description |
|---|
License.Builder() |
| Modifier and Type | Method and Description |
|---|---|
License.Builder |
addFeature(License.Feature feature)
Adds the existing feature object to this license.
|
License.Builder |
addFeature(String featureName)
Adds a feature to this license with no expiration date.
|
License.Builder |
addFeature(String featureName,
long goodBeforeDate)
Adds a feature to this license with the specified expiration date (millisecond timestamp).
|
License |
build()
Builds the license based on the criteria in this builder, then returns it.
|
License.Builder |
withFeature(License.Feature feature)
Deprecated.
|
License.Builder |
withFeature(String featureName)
Deprecated.
|
License.Builder |
withFeature(String featureName,
long goodBeforeDate)
Deprecated.
|
License.Builder |
withGoodAfterDate(long goodAfterDate)
Sets the valid date (millisecond timestamp) for this license (usually the equal or close to the issue date,
but that is not required.)
|
License.Builder |
withGoodBeforeDate(long goodBeforeDate)
Sets the expiration date (millisecond timestamp) for this license.
|
License.Builder |
withHolder(String holder)
Sets the holder for this license.
|
License.Builder |
withIssueDate(long issueDate)
Sets the issue date (millisecond timestamp) for this license.
|
License.Builder |
withIssuer(String issuer)
Sets the issuer for this license.
|
License.Builder |
withNumberOfLicenses(int numberOfLicenses)
Sets the number of licenses/seats/users this license is good for.
|
License.Builder |
withProductKey(String productKey)
Sets the product key for this license.
|
License.Builder |
withSubject(String subject)
Sets the subject for this license.
|
public License.Builder withProductKey(String productKey)
issuer,
holder, and subject are symbolically named; they are interchangeable
and can be used to hold any number of pieces of information. For example, one might use the holder to store a
hardware ID, or the subject to store a product name and version combination.productKey - The product keypublic License.Builder withIssuer(String issuer)
productKey, issuer,
holder, and subject are symbolically named; they are interchangeable
and can be used to hold any number of pieces of information. For example, one might use the holder to store a
hardware ID, or the subject to store a product name and version combination.issuer - The license issuerpublic License.Builder withHolder(String holder)
productKey, issuer,
holder, and subject are symbolically named; they are interchangeable
and can be used to hold any number of pieces of information. For example, one might use the holder to store a
hardware ID, or the subject to store a product name and version combination.holder - The license holderpublic License.Builder withSubject(String subject)
productKey, issuer,
holder, and subject are symbolically named; they are interchangeable
and can be used to hold any number of pieces of information. For example, one might use the holder to store a
hardware ID, or the subject to store a product name and version combination.subject - The license subjectpublic License.Builder withIssueDate(long issueDate)
issueDate - The date this license was issuedpublic License.Builder withGoodAfterDate(long goodAfterDate)
goodAfterDate - The date after which this license is validpublic License.Builder withGoodBeforeDate(long goodBeforeDate)
goodBeforeDate - The date after which this license is no longer validpublic License.Builder withNumberOfLicenses(int numberOfLicenses)
numberOfLicenses - The number of licenses this license is good forpublic License.Builder addFeature(String featureName)
featureName - The feature to add to this license@Deprecated public License.Builder withFeature(String featureName)
public License.Builder addFeature(String featureName, long goodBeforeDate)
featureName - The feature to add to this licensegoodBeforeDate - The expiration date for this license@Deprecated public License.Builder withFeature(String featureName, long goodBeforeDate)
public License.Builder addFeature(License.Feature feature)
feature - The feature object to add to this license@Deprecated public License.Builder withFeature(License.Feature feature)
public License build()
Copyright © 2010-2013 NWTS Java Code. All Rights Reserved. Licensed Under the Apache License version 2.0.