Top Fields Methods
liquibase.license

public Interface LicenseService

extends Plugin
Imports
liquibase.plugin.Plugin, java.util.Date

Field Summary

Inherited from liquibase.plugin.Plugin:
PRIORITY_DATABASEPRIORITY_DEFAULTPRIORITY_NOT_APPLICABLEPRIORITY_SPECIALIZED

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the number of whole days until the license expires. Negative numbers would indicate that the license expired that many days ago.
daysTilExpiration
()

It is possible that users might have multiple licenses installed.

public void
disable()

Disable this LicenseService This can be used to turn off license checking after it has been determined that a license key is not valid

public default Date

Returns:

the expiration date, or null if no license can be found
getExpirationDate
()

Get the expiration date of the installed license.

public String

Returns:

a string representation of the license(s) installed for display in logs, etc.
getLicenseInfo
()

public LicenseInfo
public int

Returns:

int
getPriority
()

This method returns a priority value for an implementation.

public LicenseInstallResult

Returns:

A data structure that contains an overall exit code plus a list of strings that detail the locations checked and the result of checking each location.
installLicense
(Location...
- A variable number of Location objects, each of which has a name, a type, and a value.
locations
)

Given a list of potential locations that a license file could be located, check each one and install any .lic files that are found there, iterating until a valid license is installed successfully or all the locations have been tried.

public boolean

Returns:

true if any installed license is valid but will expire within the next 30 days.
licenseIsAboutToExpire
()

public boolean

Returns:

true if any license with any valid subject is installed.
licenseIsInstalled
()

This method checks whether there is any license with any valid subject installed.

public boolean

Returns:

true if the license with the given subject is valid.
licenseIsValid
(String subject)

Check if an installed license with the given subject is valid or not.

public default void
reset()

Delete any cached, installed licenses currently tracked by the implementation.

Method Detail

daysTilExpirationback to summary
public int daysTilExpiration()

It is possible that users might have multiple licenses installed. In that case, this will return the lowest number.

Returns:int

the number of whole days until the license expires. Negative numbers would indicate that the license expired that many days ago.

disableback to summary
public void disable()

Disable this LicenseService This can be used to turn off license checking after it has been determined that a license key is not valid

getExpirationDateback to summary
public default Date getExpirationDate()

Get the expiration date of the installed license.

Returns:Date

the expiration date, or null if no license can be found

getLicenseInfoback to summary
public String getLicenseInfo()
Returns:String

a string representation of the license(s) installed for display in logs, etc.

getLicenseInfoObjectback to summary
public LicenseInfo getLicenseInfoObject()
getPriorityback to summary
public int getPriority()

This method returns a priority value for an implementation. Liquibase uses this to determine which LicenseService is currently in use. There can only be a single LicenseService used at a time, and the highest priority implementation wins.

Returns:int

int

installLicenseback to summary
public LicenseInstallResult installLicense(Location... locations)

Given a list of potential locations that a license file could be located, check each one and install any .lic files that are found there, iterating until a valid license is installed successfully or all the locations have been tried. After calling this method, clients still need to check licenseIsValid().

Parameters
locations:Location[]

- A variable number of Location objects, each of which has a name, a type, and a value.

Returns:LicenseInstallResult

A data structure that contains an overall exit code plus a list of strings that detail the locations checked and the result of checking each location.

licenseIsAboutToExpireback to summary
public boolean licenseIsAboutToExpire()
Returns:boolean

true if any installed license is valid but will expire within the next 30 days.

licenseIsInstalledback to summary
public boolean licenseIsInstalled()

This method checks whether there is any license with any valid subject installed.

Returns:boolean

true if any license with any valid subject is installed.

licenseIsValidback to summary
public boolean licenseIsValid(String subject)

Check if an installed license with the given subject is valid or not. The set of subjects that are valid is defined by the implementation.

Returns:boolean

true if the license with the given subject is valid.

resetback to summary
public default void reset()

Delete any cached, installed licenses currently tracked by the implementation.