public class YamlTenantContextProvider extends AbstractTenantContextProvider<TenantContext>
The expected mandatory yaml fields are shown below, all of these fields are of type String. If there are any additional fields in the yaml file, they will be parsed and included in extraContext. All these additional fields are also expected to be of type String. Sample yaml files are included in the test resources tenants folder.
The tenantId supplied to this provider is used as the name of the YAML file (with extension .yaml)
from which the tenant configuration data will be extracted. The tenant file will be loaded as a resource
from a tenants folder under the application resources root or from the file system if the
TENANT_DIRECTORY system property is specified.
| Constructor and Description |
|---|
YamlTenantContextProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected TenantContext |
decorate(TenantContext tc) |
protected TenantContext |
fetchTenantContext(String tenantFileName)
Creates the TenantContext for local environment from an yaml file named tenantFileName.
|
getTenantContext, setProvisioningTenantContext, setTenantIdprotected TenantContext fetchTenantContext(String tenantFileName) throws TenantContextException
fetchTenantContext in class AbstractTenantContextProvider<TenantContext>tenantFileName - the name of the yaml file from which the TenantContext configuration data will be read.TenantContextExceptionprotected TenantContext decorate(TenantContext tc)
decorate in class AbstractTenantContextProvider<TenantContext>tc - the TenantContext generic instance which has to be decorated to a product specific TenantContextCopyright © 2016 Atlassian. All rights reserved.