pt.digitalis.dif.dem.objects
Interface ILicense

All Known Implementing Classes:
LicenseImpl

public interface ILicense

Author:
Pedro Viegas pviegas@digitalis.pt
Created on:
Nov 1, 2007

Method Summary
 String generateKey(String client, String entity, String date, LicenseEditionType edition)
          Generates full version key
 LicenseEditionType getEdition()
          Returns the License Edition
 Date getExpirationDate()
          Checks if the current license has expired
 String getKey()
           
 String getName()
           
 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
 

Method Detail

generateKey

String generateKey(String client,
                   String entity,
                   String date,
                   LicenseEditionType edition)
Generates full version key

Parameters:
client - the client name to the key association
entity - the entity to register
date - date to use in the encryption
edition - The edition type
Returns:
the generated full version key

getEdition

LicenseEditionType getEdition()
Returns the License Edition

Returns:
LicenseEditionType

getExpirationDate

Date getExpirationDate()
Checks if the current license has expired

Returns:
The expiration date, or null it it is a final license

getKey

String getKey()
Returns:
the key

getName

String getName()
Returns:
the name

hasExpirationDate

boolean hasExpirationDate()
Checks if the current license has an expiration date

Returns:
T if it has

hasExpired

boolean hasExpired()
Checks if the current license has expired

Returns:
T if the expiration date has passed

isRegistered

boolean isRegistered()
Checks if it is registered

Returns:
T if the key exists and is correct

isRegistrable

boolean isRegistrable()
Checks if the element is registrable

Returns:
T if it is registrable

register

boolean register(String key,
                 String entityId)
Create the registration

Parameters:
key - the key to register
entityId -
Returns:
the registered record

setName

void setName(String name)
Parameters:
name - the name to set

setRegistrable

void setRegistrable(boolean registrable)
Sets the registrability of this element

Parameters:
registrable - the registrability to set

unregister

void unregister()
Delete the registration



Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.