|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.slideme.slidelock.License
public final class License
Nested Class Summary | |
---|---|
static class |
License.Rights
This class will reflect permissions of a software unit, such as validity, type of license, etc. |
Constructor Summary | |
---|---|
License(java.lang.String uniqueAppIdentifier,
Context aContext)
This is the most comfortable constructor |
|
License(java.lang.String name,
java.lang.String uniqueAppIdentifier,
Context aContext)
|
|
License(java.lang.String name,
java.lang.String uniqueAppIdentifier,
TelephonyManager aTelephonyManager,
WifiManager aWifiManager,
ContentResolver aContentResolver)
|
|
License(java.lang.String uniqueAppIdentifier,
TelephonyManager aTelephonyManager,
WifiManager aWifiManager,
ContentResolver aContentResolver)
|
Method Summary | |
---|---|
void |
digest(byte[] license)
Digests the license and adjusts the rights/permissions. |
void |
digest(java.io.InputStream license)
Digests the license and adjusts the rights/permissions. |
byte[] |
fetch()
Retrieves the binary license data from SlideME License Server |
void |
fetch(java.io.OutputStream output)
Retrieves the license data from SlideME License Server |
java.lang.String |
getDisplayName()
|
License.Rights |
getFullRights()
Checks if this license grants ultimate rights for all features this application offers |
License.Rights |
getRights(java.lang.String aFeatureKey)
Checks if this license grants rights for parameter aFeatureKey |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public License(java.lang.String name, java.lang.String uniqueAppIdentifier, Context aContext)
name
- you may want to name your licenseuniqueAppIdentifier
- this is the SlideLock KeyaContext
- your application's Context
, used to pull the device identifier. This could be an activity or the application context.
java.lang.Error
- if unable to resolve at least one device unique identifier (wifi or mac or buildId)public License(java.lang.String uniqueAppIdentifier, Context aContext)
uniqueAppIdentifier
- this is the SlideLock KeyaContext
- your application's main Context
, used to pull the device identifiers (imei, mac, buildId)
java.lang.Error
- if unable to resolve at least one device unique identifier (wifi or mac or buildId)public License(java.lang.String name, java.lang.String uniqueAppIdentifier, TelephonyManager aTelephonyManager, WifiManager aWifiManager, ContentResolver aContentResolver)
name
- you may want to name your licenseuniqueAppIdentifier
- this is the SlideLock KeyaTelephonyManager
- required to pull the device unique identifieraWifiManager
- required to pull the device MAC addressaContentResolver
- required to pull the device Build ID
java.lang.Error
- if unable to resolve at least one device unique identifier (wifi or mac or buildId)public License(java.lang.String uniqueAppIdentifier, TelephonyManager aTelephonyManager, WifiManager aWifiManager, ContentResolver aContentResolver)
uniqueAppIdentifier
- this is the SlideLock KeyaTelephonyManager
- required to pull the device unique identifieraWifiManager
- required to pull the device MAC addressaContentResolver
- required to pull the device Build ID
java.lang.Error
- if unable to resolve at least one device unique identifier (wifi or mac or buildId)Method Detail |
---|
public void digest(byte[] license) throws java.io.IOException, java.lang.IllegalArgumentException
license
- binary representation of the license
java.io.IOException
java.lang.IllegalArgumentException
- when parameter license is null or its size is 0digest(java.io.InputStream)
public void digest(java.io.InputStream license) throws java.io.IOException, java.lang.IllegalArgumentException
license
- an input stream containing the binary representation of a SlideME license
java.io.IOException
- when attempting to read from parameter license throws an IOException
java.lang.IllegalArgumentException
- when parameter license is nullpublic byte[] fetch() throws java.io.IOException
java.io.IOException
- when unable to connect to SlideME License Server. You may want to retry.public void fetch(java.io.OutputStream output) throws java.io.IOException, java.lang.IllegalArgumentException
output
- data container
java.io.IOException
- when unable to connect to SlideME License Server. You may want to retry.
java.lang.IllegalArgumentException
- when public java.lang.String getDisplayName()
public License.Rights getFullRights()
License.Rights
public License.Rights getRights(java.lang.String aFeatureKey) throws java.lang.IllegalArgumentException
aFeatureKey
- an identifier for a feature supported by the licensed application
java.lang.IllegalArgumentException
- when parameter aFeatureKey is null or empty stringLicense.Rights
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |