From d57b166cc887853d062f60abd733475c0dadc1f0 Mon Sep 17 00:00:00 2001 From: Braun Patrik Date: Thu, 26 May 2016 12:05:10 +0200 Subject: [PATCH] refactoring object manager imports --- backend/model/ObjectManagerRepository.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/backend/model/ObjectManagerRepository.ts b/backend/model/ObjectManagerRepository.ts index 040528f0..72655389 100644 --- a/backend/model/ObjectManagerRepository.ts +++ b/backend/model/ObjectManagerRepository.ts @@ -1,12 +1,8 @@ +/// + import {IUserManager} from "./IUserManager"; import {IGalleryManager} from "./IGalleryManager"; -import {MongoGalleryManager} from "./mongoose/MongoGalleryManager"; -import {MongoUserManager} from "./mongoose/MongoUserManager"; -import {GalleryManager} from "./memory/GalleryManager"; -import {UserManager} from "./memory/UserManager"; import {ISearchManager} from "./ISearchManager"; -import {MongoSearchManager} from "./mongoose/MongoSearchManager"; -import {SearchManager} from "./memory/SearchManager"; export class ObjectManagerRepository { @@ -16,12 +12,18 @@ export class ObjectManagerRepository { private static _instance:ObjectManagerRepository = null; public static InitMongoManagers() { + let MongoGalleryManager = require("./mongoose/MongoGalleryManager"); + let MongoUserManager = require("./mongoose/MongoUserManager"); + let MongoSearchManager = require("./mongoose/MongoSearchManager"); ObjectManagerRepository.getInstance().setGalleryManager(new MongoGalleryManager()); ObjectManagerRepository.getInstance().setUserManager(new MongoUserManager()); ObjectManagerRepository.getInstance().setSearchManager(new MongoSearchManager()); } public static MemoryMongoManagers() { + let GalleryManager = require("./memory/GalleryManager"); + let UserManager = require("./memory/UserManager"); + let SearchManager = require("./memory/SearchManager"); ObjectManagerRepository.getInstance().setGalleryManager(new GalleryManager()); ObjectManagerRepository.getInstance().setUserManager(new UserManager()); ObjectManagerRepository.getInstance().setSearchManager(new SearchManager());