public abstract class AbstractLicense extends java.lang.Object implements java.lang.Comparable, LicenseI
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DATEFORMAT_PATTERN_FULL |
static java.lang.String |
DATEFORMAT_PATTERN_SHORT |
static java.lang.String |
ENCODING |
static java.lang.String |
ENCODING_FOR_BASE64 |
static java.lang.String |
LICENSE_END |
static java.lang.String |
LICENSE_START |
static org.apache.log4j.Logger |
log |
static java.lang.String |
LSK_FEATURE |
static java.lang.String |
LSK_FOR_GROUPS |
static java.lang.String |
LSK_FOR_INSTANCE |
static java.lang.String |
LSK_FOR_NODEID |
static java.lang.String |
LSK_FOR_PROJECT |
static java.lang.String |
LSK_FOR_USERS |
static java.lang.String |
LSK_FOR_VALIDFROM |
static java.lang.String |
LSK_FOR_VALIDTO |
static java.lang.String |
LSK_FROM_CREA |
static java.lang.String |
LSK_FROM_CREAID |
static java.lang.String |
LSK_FROM_CREATOR |
static java.lang.String |
LSK_FROM_HOSTADDR |
static java.lang.String |
LSK_FROM_HOSTNAME |
static java.lang.String |
LSK_FROM_OSINFO |
static java.lang.String |
LSK_TOUCH |
static java.lang.String |
LSK_VAR_PREFIX |
static java.lang.String |
LSK_VERSION |
static java.lang.String |
NOT_CHAR |
static java.util.regex.Pattern |
patternFull |
static java.util.regex.Pattern |
patternPair |
static java.lang.String |
SEP_CHAR |
static java.lang.String |
version |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object _obj)
The natural ordering for AbstractLicenses, which is the one defined by
MostPowerfulLicenseComparator.
|
static java.lang.String |
decryptLicense(java.lang.String _strEnc,
FeatureManagerI _fm) |
static boolean |
equals(AbstractLicense _license1,
AbstractLicense _license2) |
boolean |
equals(java.lang.Object _obj) |
void |
fromLicenseString(java.lang.String _str)
Sets the data of this License from the values parsed from the given compact
license string.
|
java.lang.String[] |
getBenutzer() |
java.lang.String[] |
getBenutzer(boolean _doRefresh) |
java.lang.String |
getBeschreibung() |
java.lang.String |
getBeschreibung(boolean _fallbackToKey) |
java.lang.String |
getCustomValue(java.lang.String _key)
Some licenses may need/carry additional data, e.g. the maximum number of
allowed clients for FK_MAXCLIENTS.
|
java.lang.String |
getCustomValue(java.lang.String _key,
boolean _doRefresh) |
java.util.SortedMap |
getCustomValues() |
java.util.SortedMap |
getCustomValues(boolean _doRefresh) |
java.lang.String |
getFeature()
Returns (the name of) the feature this LicenseI is meant for.
|
java.lang.String |
getFeature(boolean _doRefresh) |
FeatureManagerI |
getFm() |
java.lang.String[] |
getGruppen() |
java.lang.String[] |
getGruppen(boolean _doRefresh) |
java.util.Date |
getGueltigBis()
Ending time up to which (inclusive) this LicenseI stays active.
|
java.util.Date |
getGueltigBis(boolean _doRefresh) |
java.util.Date |
getGueltigVon()
Starting time from when (inclusive) this LicenseI becomes active.
|
java.util.Date |
getGueltigVon(boolean _doRefresh) |
java.lang.String |
getInstanz() |
java.lang.String |
getInstanz(boolean _doRefresh) |
java.lang.String |
getLizenz() |
java.lang.String |
getName()
FIXME!
|
java.lang.Long |
getNodeID() |
java.lang.Long |
getNodeID(boolean _doRefresh) |
java.lang.String |
getProjekt() |
java.lang.String |
getProjekt(boolean _doRefresh) |
boolean |
handleAdditionalKey(java.lang.String _key)
Supposed to be overwritten by subclasses for easy introduction of
additional keys.
|
int |
hashCode() |
boolean |
isActive(FeatureManagerI _fm)
For compatibility with LicenseI.
|
boolean |
isAvailable(FeatureManagerI _fm) |
boolean |
matchesAdditionalCriteria()
Supposed to be overwritten by subclasses for easy checking of
additional criteria.
|
boolean |
matchesInstallation(java.lang.String _projekt,
java.lang.String _instanz,
java.lang.Long _nodeID)
Internal separate method for code clarity.
|
static boolean |
matchesInstallation(java.lang.String _projekt,
java.lang.String _projektWant,
java.lang.String _instanz,
java.lang.String _instanzWant,
java.lang.Long _nodeID,
java.lang.Long _nodeIDWant) |
void |
refreshFromLicense()
(Re)sets the cached properties from the encrypted data in the Lizenz.
|
void |
refreshFromLicense(FeatureManagerI _fm) |
void |
setBenutzer(java.lang.String[] _users) |
void |
setCustomValue(java.lang.String _key,
java.lang.String _value) |
void |
setFeature(java.lang.String _str) |
void |
setFm(FeatureManagerI $8) |
void |
setGruppen(java.lang.String[] _groups) |
void |
setGueltigBis(java.util.Date _date) |
void |
setGueltigVon(java.util.Date _date) |
void |
setInstanz(java.lang.String _str) |
void |
setLizenz(java.lang.String _strEnc) |
void |
setNodeID(java.lang.Long _nodeid) |
void |
setProjekt(java.lang.String _str) |
static boolean |
stringsEqual(java.lang.String[] _strs1,
java.lang.String[] _strs2) |
java.lang.String |
toString() |
java.lang.String |
toString(boolean _debug) |
public static final org.apache.log4j.Logger log
public static final java.lang.String version
public static final java.lang.String DATEFORMAT_PATTERN_SHORT
public static final java.lang.String DATEFORMAT_PATTERN_FULL
public static final java.lang.String ENCODING
public static final java.lang.String ENCODING_FOR_BASE64
public static final java.lang.String NOT_CHAR
public static final java.lang.String SEP_CHAR
public static final java.lang.String LICENSE_START
public static final java.lang.String LICENSE_END
public static final java.util.regex.Pattern patternFull
public static final java.util.regex.Pattern patternPair
public static final java.lang.String LSK_VAR_PREFIX
public static final java.lang.String LSK_VERSION
public static final java.lang.String LSK_FEATURE
public static final java.lang.String LSK_TOUCH
public static final java.lang.String LSK_FOR_PROJECT
public static final java.lang.String LSK_FOR_INSTANCE
public static final java.lang.String LSK_FOR_VALIDFROM
public static final java.lang.String LSK_FOR_VALIDTO
public static final java.lang.String LSK_FOR_NODEID
public static final java.lang.String LSK_FOR_USERS
public static final java.lang.String LSK_FOR_GROUPS
public static final java.lang.String LSK_FROM_CREATOR
public static final java.lang.String LSK_FROM_OSINFO
public static final java.lang.String LSK_FROM_CREA
public static final java.lang.String LSK_FROM_HOSTNAME
public static final java.lang.String LSK_FROM_HOSTADDR
public static final java.lang.String LSK_FROM_CREAID
public java.lang.String getName()
<jar jarfile="${build.lib}/MyProject.jar" ...>
...
<service type="de.ipcon.db.feature.LicenseI" provider="top.projectpackage.feature.CustomLicenseClass"/>
...
</jar>
public java.lang.String getBeschreibung()
public java.lang.String getBeschreibung(boolean _fallbackToKey)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean _debug)
public int compareTo(java.lang.Object _obj)
compareTo
in interface java.lang.Comparable
java.lang.IllegalArgumentException
- if licenses' features do not match and not
at least one of them is an _ALL_ license.public boolean equals(java.lang.Object _obj)
public static boolean equals(AbstractLicense _license1, AbstractLicense _license2)
public static boolean stringsEqual(java.lang.String[] _strs1, java.lang.String[] _strs2)
public int hashCode()
public void setFeature(java.lang.String _str)
public java.lang.String getFeature()
LicenseI
getFeature
in interface LicenseI
public java.lang.String getFeature(boolean _doRefresh)
public void setProjekt(java.lang.String _str)
public java.lang.String getProjekt()
public java.lang.String getProjekt(boolean _doRefresh)
public void setInstanz(java.lang.String _str)
public java.lang.String getInstanz()
public java.lang.String getInstanz(boolean _doRefresh)
public void setGueltigVon(java.util.Date _date)
public java.util.Date getGueltigVon()
LicenseI
getGueltigVon
in interface LicenseI
public java.util.Date getGueltigVon(boolean _doRefresh)
public void setGueltigBis(java.util.Date _date)
public java.util.Date getGueltigBis()
LicenseI
getGueltigBis
in interface LicenseI
public java.util.Date getGueltigBis(boolean _doRefresh)
public void setNodeID(java.lang.Long _nodeid)
public java.lang.Long getNodeID()
public java.lang.Long getNodeID(boolean _doRefresh)
public void setBenutzer(java.lang.String[] _users)
public java.lang.String[] getBenutzer()
public java.lang.String[] getBenutzer(boolean _doRefresh)
public void setGruppen(java.lang.String[] _groups)
public java.lang.String[] getGruppen()
public java.lang.String[] getGruppen(boolean _doRefresh)
public void setCustomValue(java.lang.String _key, java.lang.String _value)
public java.lang.String getCustomValue(java.lang.String _key)
LicenseI
getCustomValue
in interface LicenseI
public java.lang.String getCustomValue(java.lang.String _key, boolean _doRefresh)
public java.util.SortedMap getCustomValues()
public java.util.SortedMap getCustomValues(boolean _doRefresh)
public void setLizenz(java.lang.String _strEnc)
public void refreshFromLicense() throws LicenseException
LicenseException
public void refreshFromLicense(FeatureManagerI _fm) throws LicenseException
LicenseException
public static java.lang.String decryptLicense(java.lang.String _strEnc, FeatureManagerI _fm)
_strEnc
- the encrypted license string in Base64 format
FIXME! shouldn't/couldn't we actually not pass _strEnc but directly only read bytes from file or BO and only pass these?public void fromLicenseString(java.lang.String _str) throws LicenseException
LicenseException
public boolean handleAdditionalKey(java.lang.String _key)
public boolean isActive(FeatureManagerI _fm) throws LicenseException
isActive
in interface LicenseI
LicenseException
public boolean isAvailable(FeatureManagerI _fm) throws LicenseException
LicenseException
public boolean matchesInstallation(java.lang.String _projekt, java.lang.String _instanz, java.lang.Long _nodeID)
public static boolean matchesInstallation(java.lang.String _projekt, java.lang.String _projektWant, java.lang.String _instanz, java.lang.String _instanzWant, java.lang.Long _nodeID, java.lang.Long _nodeIDWant)
public boolean matchesAdditionalCriteria()
public java.lang.String getLizenz()
public FeatureManagerI getFm()
public void setFm(FeatureManagerI $8)
Copyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.