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.SerializableThe 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 voidcheckLicenceForExtension(java.lang.String name, java.lang.String licencekey)Check licence for the extension.intgetCacheLimit()protected org.joda.time.format.DateTimeFormattergetDateTimeFormatter()java.lang.IntegergetDaysLeft()Returns remaining days for this license or null in case of unlimited license.static LicencegetDefaultLicence()intgetDemoLicenseDays()Returns maximum number of days for which demo license is valid.java.util.DategetExpirationDate()java.lang.StringgetID()intgetItemCount(java.lang.String itemName)abstract java.util.PropertiesgetLicenceProperties()java.lang.StringgetLicenceProperty(java.lang.String key)java.lang.StringgetName()abstract byte[]getSignature()booleanisAdvancedSecurityPermitted()booleanisClusteringPermitted()booleanisDemoOrDevelopLicence()booleanisHighPerformanceOptionPermitted()booleanisMasterServerEnabled()static booleanisUnrestrictedForAllExtensions(Licence license)Deprecated.since ages - useisDemoOrDevelopLicence()java.lang.StringtoString()ValidationResultvalidate()ValidationResultvalidateDemoExpiration()
-
-
-
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:
toStringin 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.ErrorCheck 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
-
-