Added public accessor
Removed non necessary async/await
MODIFY
src/async-task/tasks/SynchronizeCarCatalogsAsyncTask.ts
src/async-task/tasks/SynchronizeCarCatalogsAsyncTask.ts
@@ -14,7 +14,7 @@ export default class SynchronizeCarCatalogsAsyncTask extends AbstractAsyncTask {
const syncCarCatalogsLock = await LockingHelper.acquireSyncCarCatalogsLock(Constants.DEFAULT_TENANT);
if (syncCarCatalogsLock) {
try {
- const carDatabaseImpl = await CarFactory.getCarImpl();
+ const carDatabaseImpl = CarFactory.getCarImpl();
if (!carDatabaseImpl) {
throw new BackendError({
message: 'Car service is not configured',

MODIFY
src/integration/asset/AssetFactory.ts
src/integration/asset/AssetFactory.ts
@@ -15,7 +15,7 @@ import WitAssetIntegration from './wit/WitAssetIntegration';
const MODULE_NAME = 'AssetFactory';
export default class AssetFactory {
- static async getAssetImpl(tenant: Tenant, connectionID: string): Promise<AssetIntegration<AssetSetting>> {
+ public static async getAssetImpl(tenant: Tenant, connectionID: string): Promise<AssetIntegration<AssetSetting>> {
// Check if component is active
if (Utils.isTenantComponentActive(tenant, TenantComponents.ASSET)) {
// Get the Asset's settings

MODIFY
src/integration/billing/BillingFactory.ts
src/integration/billing/BillingFactory.ts
@@ -11,7 +11,7 @@ import Utils from '../../utils/Utils';
const MODULE_NAME = 'BillingFactory';
export default class BillingFactory {
- static async getBillingImpl(tenant: Tenant): Promise<BillingIntegration> {
+ public static async getBillingImpl(tenant: Tenant): Promise<BillingIntegration> {
// Check if billing is active
if (Utils.isTenantComponentActive(tenant, TenantComponents.PRICING) &&
Utils.isTenantComponentActive(tenant, TenantComponents.BILLING)) {

MODIFY
src/integration/car-connector/CarConnectorFactory.ts
src/integration/car-connector/CarConnectorFactory.ts
@@ -8,7 +8,7 @@ import TronityCarConnectorIntegration from './tronity-connector/TronityCarConnec
import Utils from '../../utils/Utils';
export default class CarConnectorFactory {
- static async getCarConnectorImpl(tenant: Tenant, carConnectorId: string): Promise<CarConnectorIntegration<CarConnectorSettings>> {
+ public static async getCarConnectorImpl(tenant: Tenant, carConnectorId: string): Promise<CarConnectorIntegration<CarConnectorSettings>> {
// Check if car connector component is active
if (Utils.isTenantComponentActive(tenant, TenantComponents.CAR_CONNECTOR)) {
const settings = await SettingStorage.getCarConnectorSettings(tenant);

MODIFY
src/integration/car/CarFactory.ts
src/integration/car/CarFactory.ts
@@ -2,7 +2,7 @@ import CarIntegration from './CarIntegration';
import EVDatabaseCarIntegration from './ev-database/EVDatabaseCarIntegration';
export default class CarFactory {
- static async getCarImpl(): Promise<CarIntegration> {
+ public static getCarImpl(): CarIntegration {
// Always return the EVDatabase
return new EVDatabaseCarIntegration();
}

MODIFY
src/integration/charging-station-vendor/ChargingStationVendorFactory.ts
src/integration/charging-station-vendor/ChargingStationVendorFactory.ts
@@ -6,8 +6,7 @@ import EVBOXChargingStationVendorIntegration from './evbox/EVBOXChargingStationV
import KebaChargingStationVendorIntegration from './keba/KebaChargingStationVendorIntegration';
export default class ChargingStationVendorFactory {
-
- static getChargingStationVendorImpl(chargingStation: ChargingStation): ChargingStationVendorIntegration {
+ public static getChargingStationVendorImpl(chargingStation: ChargingStation): ChargingStationVendorIntegration {
let chargingStationVendorImpl: ChargingStationVendorIntegration = null;
switch (chargingStation.chargePointVendor) {
case ChargerVendor.EVBOX:

MODIFY
src/integration/pricing/PricingFactory.ts
src/integration/pricing/PricingFactory.ts
@@ -8,7 +8,7 @@ import SettingStorage from '../../storage/mongodb/SettingStorage';
import Utils from '../../utils/Utils';
export default class PricingFactory {
- static async getPricingImpl(tenant: Tenant): Promise<PricingIntegration<PricingSetting>> {
+ public static async getPricingImpl(tenant: Tenant): Promise<PricingIntegration<PricingSetting>> {
// Check if the Pricing is active
if (Utils.isTenantComponentActive(tenant, TenantComponents.PRICING)) {
// Get the pricing settings

MODIFY
src/integration/refund/RefundFactory.ts
src/integration/refund/RefundFactory.ts
@@ -11,7 +11,7 @@ import Utils from '../../utils/Utils';
const MODULE_NAME = 'RefundFactory';
export default class RefundFactory {
- static async getRefundImpl(tenant: Tenant): Promise<RefundIntegration<RefundSetting>> {
+ public static async getRefundImpl(tenant: Tenant): Promise<RefundIntegration<RefundSetting>> {
// Check if Refund component is active
if (Utils.isTenantComponentActive(tenant, TenantComponents.REFUND)) {
const setting = await SettingStorage.getRefundSettings(tenant);

MODIFY
src/integration/smart-charging/SmartChargingFactory.ts
src/integration/smart-charging/SmartChargingFactory.ts
@@ -7,7 +7,7 @@ import SmartChargingIntegration from './SmartChargingIntegration';
import Utils from '../../utils/Utils';
export default class SmartChargingFactory {
- static async getSmartChargingImpl(tenant: Tenant): Promise<SmartChargingIntegration<SmartChargingSetting>> {
+ public static async getSmartChargingImpl(tenant: Tenant): Promise<SmartChargingIntegration<SmartChargingSetting>> {
// Check if Smart Charging is active
if (Utils.isTenantComponentActive(tenant, TenantComponents.SMART_CHARGING)) {
// Get the Smart Charging's settings

MODIFY
src/scheduler/tasks/SynchronizeCarsTask.ts
src/scheduler/tasks/SynchronizeCarsTask.ts
@@ -15,7 +15,7 @@ export default class SynchronizeCarsTask extends SchedulerTask {
const syncCarCatalogLock = await LockingHelper.acquireSyncCarCatalogsLock(Constants.DEFAULT_TENANT);
if (syncCarCatalogLock) {
try {
- const carDatabaseImpl = await CarFactory.getCarImpl();
+ const carDatabaseImpl = CarFactory.getCarImpl();
if (carDatabaseImpl) {
const synchronizeAction = await carDatabaseImpl.synchronizeCarCatalogs();
if (synchronizeAction.inError > 0) {

Added public accessor
Removed non necessary async/await