|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.dem.objects.LicenseImpl
public class LicenseImpl
This class will hold the information of a given registration. It allows the management of registrations including creation and deletion. TODO: Candidate for another project.
Constructor Summary | |
---|---|
LicenseImpl()
Constructor for an unregistered element |
|
LicenseImpl(String name)
Constructor for an unregistered element |
|
LicenseImpl(String name,
String key)
Constructor for a registered element |
Method Summary | |
---|---|
String |
generateKey(String client,
String entity,
String date,
LicenseEditionType edition)
Generates full version key |
protected String |
getClientName()
Get the Client Name |
LicenseEditionType |
getEdition()
Returns the License Edition |
Date |
getExpirationDate()
Checks if the current license has expired |
String |
getKey()
|
String |
getName()
|
protected String |
getSeed()
The defined default Seed for DIF. |
boolean |
hasExpirationDate()
Checks if the current license has an expiration date |
boolean |
hasExpired()
Checks if the current license has expired |
boolean |
isRegistered()
Checks if it is registered |
boolean |
isRegistrable()
Checks if the element is registrable |
boolean |
register(String key,
String entityId)
Create the registration |
void |
setName(String name)
|
void |
setRegistrable(boolean registrable)
Sets the registrability of this element |
void |
unregister()
Delete the registration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LicenseImpl()
public LicenseImpl(String name)
name
- the name of the elementpublic LicenseImpl(String name, String key)
name
- the name of the elementkey
- the key of the registered elementMethod Detail |
---|
public String generateKey(String client, String entity, String date, LicenseEditionType edition)
ILicense
generateKey
in interface ILicense
client
- the client name to the key associationentity
- the entity to registerdate
- date to use in the encryptionedition
- The edition type
ILicense.generateKey(java.lang.String, java.lang.String, java.lang.String,
pt.digitalis.dif.dem.objects.LicenseEditionType)
protected String getClientName()
public LicenseEditionType getEdition()
ILicense
getEdition
in interface ILicense
LicenseEditionType
ILicense.getEdition()
public Date getExpirationDate()
ILicense
getExpirationDate
in interface ILicense
ILicense.getExpirationDate()
public String getKey()
getKey
in interface ILicense
ILicense.getKey()
public String getName()
getName
in interface ILicense
ILicense.getName()
protected String getSeed()
public boolean hasExpirationDate()
ILicense
hasExpirationDate
in interface ILicense
ILicense.hasExpirationDate()
public boolean hasExpired()
ILicense
hasExpired
in interface ILicense
ILicense.hasExpired()
public boolean isRegistered()
ILicense
isRegistered
in interface ILicense
ILicense.isRegistered()
public boolean isRegistrable()
ILicense
isRegistrable
in interface ILicense
ILicense.isRegistrable()
public boolean register(String key, String entityId)
ILicense
register
in interface ILicense
key
- the key to register
ILicense.register(java.lang.String, java.lang.String)
public void setName(String name)
setName
in interface ILicense
name
- the name to setILicense.setName(java.lang.String)
public void setRegistrable(boolean registrable)
ILicense
setRegistrable
in interface ILicense
registrable
- the registrability to setILicense.setRegistrable(boolean)
public void unregister()
ILicense
unregister
in interface ILicense
ILicense.unregister()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |