public abstract class AbstractUnicornTenantContextProvider<T extends TenantContext> extends AbstractTenantContextProvider<T>
It uses STUDIO_LICENSE_FILE to find the unicorn license file. It will default to the value of
DEFAULT_STUDIO_LICENSE_FILE. The application must supply the needed
file name configuration data by overriding the protected methods, as it is shown in the
UnicornTenantContextProviderTest
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_STUDIO_LICENSE_FILE |
static String |
STUDIO_LICENSE_FILE |
| Constructor and Description |
|---|
AbstractUnicornTenantContextProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected TenantContext |
fetchTenantContext(String tenantId)
Fetches the generic
TenantContext based on the supplied tenantId. |
protected abstract String |
getDatasourcePath()
Returns the relative path to the product Tomcat root context, starting from
catalina-base,
for example, catalina-base/conf/Catalina/localhost/ROOT.xml. |
protected abstract String |
getProductName()
Returns the product name, for example
jira or confluence. |
protected abstract String |
getServiceYamlFile()
Returns the product service yaml file name, for example,
/data/icebat/seamless/jira.yaml. |
protected String |
getStudioLicenseFile()
Returns the product (studio) licence file name.
|
decorate, getTenantContext, setProvisioningTenantContext, setTenantIdpublic static final String STUDIO_LICENSE_FILE
public static final String DEFAULT_STUDIO_LICENSE_FILE
public AbstractUnicornTenantContextProvider()
protected TenantContext fetchTenantContext(String tenantId) throws TenantContextException
TenantContext based on the supplied tenantId.
In Unicorn environment the tenantId parameter is unused and is ignored.
fetchTenantContext in class AbstractTenantContextProvider<T extends TenantContext>tenantId - the tenant IdTenantContextExceptionprotected abstract String getProductName()
jira or confluence.protected abstract String getServiceYamlFile()
/data/icebat/seamless/jira.yaml.protected abstract String getDatasourcePath()
catalina-base,
for example, catalina-base/conf/Catalina/localhost/ROOT.xml. The first half of the Tomcat
root context path is extracted from the file given by getServiceYamlFile().protected String getStudioLicenseFile()
Copyright © 2016 Atlassian. All rights reserved.