1 | import {ConfigurationBase} from "./config";
|
2 |
|
3 | export declare abstract class IApplication {
|
4 | /**
|
5 | * Registers an application strategy e.g. an singleton service which to be used in application contextr
|
6 | * @param {Function} serviceCtor
|
7 | * @param {Function} strategyCtor
|
8 | * @returns IApplication
|
9 | */
|
10 | abstract useStrategy(serviceCtor: void, strategyCtor: void): IApplication;
|
11 | /**
|
12 | * @param {Function} serviceCtor
|
13 | * @returns {boolean}
|
14 | */
|
15 | abstract hasStrategy(serviceCtor: void): boolean;
|
16 | /**
|
17 | * Gets an application strategy based on the given base service type
|
18 | * @param {Function} serviceCtor
|
19 | * @return {*}
|
20 | */
|
21 | abstract getStrategy(serviceCtor: void): IApplicationService;
|
22 |
|
23 | /**
|
24 | * Gets the configuration of this application
|
25 | * @returns {ConfigurationBase}
|
26 | */
|
27 | abstract getConfiguration():ConfigurationBase;
|
28 | }
|
29 |
|
30 | export declare abstract class IApplicationService {
|
31 | /**
|
32 | * Gets the application of this service
|
33 | * @returns {IApplication}
|
34 | */
|
35 | abstract getApplication():IApplication;
|
36 | }
|
37 |
|
38 | export declare class ApplicationService implements IApplicationService {
|
39 | /**
|
40 | * @constructor
|
41 | * @param {IApplication=} app
|
42 | */
|
43 | constructor(app: IApplication);
|
44 | /**
|
45 | * Gets the application of this service
|
46 | * @returns {IApplication}
|
47 | */
|
48 | getApplication():IApplication;
|
49 | /**
|
50 | * Registers an application strategy e.g. an singleton service which to be used in application contextr
|
51 | * @param {Function} serviceCtor
|
52 | * @param {Function} strategyCtor
|
53 | * @returns IApplication
|
54 | */
|
55 | useStrategy(serviceCtor: void, strategyCtor: void): IApplication;
|
56 | /**
|
57 | * @param {Function} serviceCtor
|
58 | * @returns {boolean}
|
59 | */
|
60 | hasStrategy(serviceCtor: void): boolean;
|
61 | /**
|
62 | * Gets an application strategy based on the given base service type
|
63 | * @param {Function} serviceCtor
|
64 | * @return {*}
|
65 | */
|
66 | getStrategy(serviceCtor: void): IApplicationService;
|
67 |
|
68 | /**
|
69 | * Gets the configuration of this application
|
70 | * @returns {ConfigurationBase}
|
71 | */
|
72 | getConfiguration():ConfigurationBase;
|
73 | }
|