Package de.hybris.platform.licence
Class Licence
- java.lang.Object
-
- de.hybris.platform.licence.Licence
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
LicenseFactory.InvalidLicence
,SAPLicense
public abstract class Licence extends java.lang.Object implements java.io.Serializable
The hybris licence object.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Licence()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
checkLicenceForExtension(java.lang.String name, java.lang.String licencekey)
Check licence for the extension.int
getCacheLimit()
protected org.joda.time.format.DateTimeFormatter
getDateTimeFormatter()
java.lang.Integer
getDaysLeft()
Returns remaining days for this license or null in case of unlimited license.static Licence
getDefaultLicence()
int
getDemoLicenseDays()
Returns maximum number of days for which demo license is valid.java.util.Date
getExpirationDate()
java.lang.String
getID()
int
getItemCount(java.lang.String itemName)
abstract java.util.Properties
getLicenceProperties()
java.lang.String
getLicenceProperty(java.lang.String key)
java.lang.String
getName()
abstract byte[]
getSignature()
boolean
isAdvancedSecurityPermitted()
boolean
isClusteringPermitted()
boolean
isDemoOrDevelopLicence()
boolean
isHighPerformanceOptionPermitted()
boolean
isMasterServerEnabled()
static boolean
isUnrestrictedForAllExtensions(Licence license)
Deprecated.since ages - useisDemoOrDevelopLicence()
java.lang.String
toString()
ValidationResult
validate()
ValidationResult
validateDemoExpiration()
-
-
-
Method Detail
-
getLicenceProperties
public abstract java.util.Properties getLicenceProperties()
-
getSignature
public abstract byte[] getSignature()
-
getDefaultLicence
public static final Licence getDefaultLicence()
-
validateDemoExpiration
public ValidationResult validateDemoExpiration()
-
validate
public ValidationResult validate()
-
isMasterServerEnabled
public boolean isMasterServerEnabled()
-
getLicenceProperty
public java.lang.String getLicenceProperty(java.lang.String key)
-
getExpirationDate
public java.util.Date getExpirationDate()
-
getDateTimeFormatter
protected org.joda.time.format.DateTimeFormatter getDateTimeFormatter()
-
getID
public java.lang.String getID()
-
getName
public java.lang.String getName()
-
getItemCount
public int getItemCount(java.lang.String itemName)
-
isAdvancedSecurityPermitted
public boolean isAdvancedSecurityPermitted()
-
isClusteringPermitted
public boolean isClusteringPermitted()
-
isHighPerformanceOptionPermitted
public boolean isHighPerformanceOptionPermitted()
-
getCacheLimit
public int getCacheLimit()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDaysLeft
public java.lang.Integer getDaysLeft()
Returns remaining days for this license or null in case of unlimited license.
-
getDemoLicenseDays
public int getDemoLicenseDays()
Returns maximum number of days for which demo license is valid.
-
checkLicenceForExtension
public static final void checkLicenceForExtension(java.lang.String name, java.lang.String licencekey) throws java.lang.Error
Check licence for the extension. If no licence found the method throws an error and print an info in the error console.- Parameters:
name
- The name of the Extensionlicencekey
- licenceconstant from the extension, needed for getLicenceProperty- Throws:
java.lang.Error
- throws if no valid licence- Since:
- 2.10
-
isDemoOrDevelopLicence
public boolean isDemoOrDevelopLicence()
-
isUnrestrictedForAllExtensions
@Deprecated public static boolean isUnrestrictedForAllExtensions(Licence license)
Deprecated.since ages - useisDemoOrDevelopLicence()
Checks whether license is valid demo or develop
-
-