use of org.killbill.billing.util.cache.TenantCatalogCacheLoader.LoaderCallback in project killbill by killbill.
the class EhCacheCatalogCache method initializeCacheLoaderArgument.
//
// Build the LoaderCallback that is required to build the catalog from the xml from a module that knows
// nothing about catalog.
//
// This is a contract between the TenantCatalogCacheLoader and the EhCacheCatalogCache
private CacheLoaderArgument initializeCacheLoaderArgument(final boolean filterTemplateCatalog) {
final LoaderCallback loaderCallback = new LoaderCallback() {
@Override
public Object loadCatalog(final List<String> catalogXMLs, final Long tenantRecordId) throws CatalogApiException {
return loader.load(catalogXMLs, filterTemplateCatalog, tenantRecordId);
}
};
final Object[] args = new Object[1];
args[0] = loaderCallback;
final ObjectType irrelevant = null;
final InternalTenantContext notUsed = null;
return new CacheLoaderArgument(irrelevant, args, notUsed);
}
Aggregations