Package com.xebialabs.license
Class License
- java.lang.Object
-
- com.xebialabs.license.License
-
- Direct Known Subclasses:
LicenseVersion3,LicenseVersion4,MarketplaceLicense
public abstract class License extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLICENSE_PREAMBLEstatic intMAX_TRIAL_LICENSE_VALIDITYstatic java.lang.StringPRODUCT_OLD_DEPLOYITstatic java.lang.StringPRODUCT_XL_DEPLOYstatic java.lang.StringPRODUCT_XL_RELEASEstatic java.lang.StringPRODUCT_XL_TESTVIEWstatic java.util.Set<java.lang.String>PRODUCTSprotected LicensePropertyMapvalues
-
Constructor Summary
Constructors Modifier Constructor Description protectedLicense(LicensePropertyMap values)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.util.List<LicenseProperty>getLicenseProperties()abstract LicenseTypegetLicenseVersion()java.util.List<java.lang.String>getListValue(LicenseProperty property)org.joda.time.LocalDategetLocalDateValue(LicenseProperty key)java.util.Map<java.lang.String,java.lang.Integer>getMapValue(LicenseProperty key)abstract java.util.List<LicenseProperty>getRequiredProperties()java.lang.StringgetStringValue(LicenseProperty key)booleanhasLicenseProperty(LicenseProperty key)booleanisDateExpired()booleanisDateExpired(org.joda.time.LocalDate now)booleanisDummyLicense()java.lang.Stringpreamble()java.lang.StringtoLicenseContent()java.lang.StringtoString()voidvalidateLicenseFormat()protected voidvalidateProperties()protected voidvalidateSpecific()
-
-
-
Field Detail
-
PRODUCT_XL_DEPLOY
public static final java.lang.String PRODUCT_XL_DEPLOY
- See Also:
- Constant Field Values
-
PRODUCT_OLD_DEPLOYIT
public static final java.lang.String PRODUCT_OLD_DEPLOYIT
- See Also:
- Constant Field Values
-
PRODUCT_XL_RELEASE
public static final java.lang.String PRODUCT_XL_RELEASE
- See Also:
- Constant Field Values
-
PRODUCT_XL_TESTVIEW
public static final java.lang.String PRODUCT_XL_TESTVIEW
- See Also:
- Constant Field Values
-
LICENSE_PREAMBLE
public static final java.lang.String LICENSE_PREAMBLE
- See Also:
- Constant Field Values
-
PRODUCTS
public static final java.util.Set<java.lang.String> PRODUCTS
-
MAX_TRIAL_LICENSE_VALIDITY
public static final int MAX_TRIAL_LICENSE_VALIDITY
- See Also:
- Constant Field Values
-
values
protected LicensePropertyMap values
-
-
Constructor Detail
-
License
protected License(LicensePropertyMap values) throws LicenseViolationException
- Throws:
LicenseViolationException
-
-
Method Detail
-
getLicenseProperties
public abstract java.util.List<LicenseProperty> getLicenseProperties()
-
getRequiredProperties
public abstract java.util.List<LicenseProperty> getRequiredProperties()
-
getLicenseVersion
public abstract LicenseType getLicenseVersion()
-
preamble
public java.lang.String preamble()
-
validateSpecific
protected void validateSpecific()
-
validateProperties
protected void validateProperties() throws MissingLicensePropertyException- Throws:
MissingLicensePropertyException
-
validateLicenseFormat
public void validateLicenseFormat() throws LicenseViolationException- Throws:
LicenseViolationException
-
isDateExpired
public boolean isDateExpired()
-
isDateExpired
public boolean isDateExpired(org.joda.time.LocalDate now)
-
getStringValue
public java.lang.String getStringValue(LicenseProperty key)
-
isDummyLicense
public boolean isDummyLicense()
-
getLocalDateValue
public org.joda.time.LocalDate getLocalDateValue(LicenseProperty key)
-
getMapValue
public java.util.Map<java.lang.String,java.lang.Integer> getMapValue(LicenseProperty key)
-
getListValue
public java.util.List<java.lang.String> getListValue(LicenseProperty property)
-
hasLicenseProperty
public boolean hasLicenseProperty(LicenseProperty key)
-
toLicenseContent
public java.lang.String toLicenseContent()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-