diff --git a/src/ts/@loafer/application/ApplicationStater.ts b/src/ts/@loafer/application/ApplicationStater.ts index 0d4ba81..c4d7952 100644 --- a/src/ts/@loafer/application/ApplicationStater.ts +++ b/src/ts/@loafer/application/ApplicationStater.ts @@ -1,4 +1,4 @@ -interface ApplicationStater { +export interface ApplicationStater { start(): void; } diff --git a/src/ts/@loafer/application/decorator/App.ts b/src/ts/@loafer/application/decorator/Application.ts similarity index 67% rename from src/ts/@loafer/application/decorator/App.ts rename to src/ts/@loafer/application/decorator/Application.ts index 905ee6b..fbdc5e2 100644 --- a/src/ts/@loafer/application/decorator/App.ts +++ b/src/ts/@loafer/application/decorator/Application.ts @@ -15,16 +15,16 @@ import { ConfigurationAnnotation, } from '@loafer/context/decorator/Configuration'; -export class AppAnnotation extends ConfigurationAnnotation implements DecoratorHandler { +export class ApplicationAnnotation extends ConfigurationAnnotation implements DecoratorHandler { public constructor(qualifier?: PropertyType) { super(qualifier); } public onClassDecorator = (clazz: Class, target: TFunction): TFunction | void => { - console.log('App'); + console.log('Application'); } } -export const App = Decorator.create(AppAnnotation); +export const Application = Decorator.create(ApplicationAnnotation); -export default App; +export default Application; diff --git a/src/ts/@loafer/context/ConfigurableApplicationContext.ts b/src/ts/@loafer/context/ConfigurableApplicationContext.ts index d7b06e8..12bbe03 100644 --- a/src/ts/@loafer/context/ConfigurableApplicationContext.ts +++ b/src/ts/@loafer/context/ConfigurableApplicationContext.ts @@ -6,13 +6,6 @@ import ApplicationContext from '@loafer/context/ApplicationContext'; import Lifecycle from '@loafer/context/Lifecycle'; export interface ConfigurableApplicationContext extends ApplicationContext, Lifecycle { - setId(id: PropertyType): void; - setEnvironment(environment: ConfigurableEnvironment): void; - getEnvironment(): ConfigurableEnvironment; - addBeanFactoryPostProcessor(BeanFactoryPostProcessor postProcessor): void; - addApplicationListener(ApplicationListener< ? > listener ): void; - refresh(): void; - getBeanFactory(): ConfigurableListablePouchFactory; } export default ConfigurableApplicationContext; diff --git a/src/ts/@loafer/context/support/GenericApplicationContext.ts b/src/ts/@loafer/context/support/GenericApplicationContext.ts index acf0cdd..261510d 100644 --- a/src/ts/@loafer/context/support/GenericApplicationContext.ts +++ b/src/ts/@loafer/context/support/GenericApplicationContext.ts @@ -1,6 +1,9 @@ import AbstractApplicationContext from '@loafer/context/support/AbstractApplicationContext'; +import PouchDefinitionRegistry from '@loafer/pouches/factory/support/PouchDefinitionRegistry'; -export class GenericApplicationContext extends AbstractApplicationContext { + + +export class GenericApplicationContext extends AbstractApplicationContext implements PouchDefinitionRegistry { } diff --git a/src/ts/@loafer/core/AliasRegistry.ts b/src/ts/@loafer/core/AliasRegistry.ts new file mode 100644 index 0000000..3597200 --- /dev/null +++ b/src/ts/@loafer/core/AliasRegistry.ts @@ -0,0 +1,8 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + +export interface AliasRegistry { +} + +export default AliasRegistry; diff --git a/src/ts/@loafer/core/MethodParameter.ts b/src/ts/@loafer/core/MethodParameter.ts new file mode 100644 index 0000000..ac9ced9 --- /dev/null +++ b/src/ts/@loafer/core/MethodParameter.ts @@ -0,0 +1,15 @@ +import { + ClassType, + PropertyType, +} from '@loafer/core/constants/types'; + +import Executable from '@loafer/core/reflect/Executable'; +import Parameter from '@loafer/core/reflect/Parameter'; +import Method from '@loafer/core/reflect/Method'; +import Constructor from '@loafer/core/reflect/Constructor'; +import Annotation from '@loafer/core/annotation/Annotation'; + +export class MethodParameter { +} + +export default MethodParameter; diff --git a/src/ts/@loafer/core/SimpleAliasRegistry.ts b/src/ts/@loafer/core/SimpleAliasRegistry.ts new file mode 100644 index 0000000..5fcb43a --- /dev/null +++ b/src/ts/@loafer/core/SimpleAliasRegistry.ts @@ -0,0 +1,11 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + +import AliasRegistry from '@loafer/core/AliasRegistry'; + +export class SimpleAliasRegistry implements AliasRegistry { +} + +export default SimpleAliasRegistry; + diff --git a/src/ts/@loafer/core/env/ConfigurableEnvironment.ts b/src/ts/@loafer/core/env/ConfigurableEnvironment.ts index a64c171..01d13d3 100644 --- a/src/ts/@loafer/core/env/ConfigurableEnvironment.ts +++ b/src/ts/@loafer/core/env/ConfigurableEnvironment.ts @@ -1,11 +1,10 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + import Environment from '@loafer/core/env/Environment'; export interface ConfigurableEnvironment extends Environment { - setActiveProfiles(...profiles: string[]): void; - addActiveProfiles(profile: string): void; - setDefaultProfiles(...profiles: string[]): void; - getSystemEnvironment(): Map; - getSystemProperties(): Map; } export default Environment; diff --git a/src/ts/@loafer/core/env/Environment.ts b/src/ts/@loafer/core/env/Environment.ts index 059286e..7726d2a 100644 --- a/src/ts/@loafer/core/env/Environment.ts +++ b/src/ts/@loafer/core/env/Environment.ts @@ -1,9 +1,10 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + import PropertyResolver from '@loafer/core/env/PropertyResolver'; export interface Environment extends PropertyResolver { - getActiveProfiles(): string[]; - getDefaultProfiles(): string[]; - acceptsProfiles(...profiles: string[]): boolean; } export default Environment; diff --git a/src/ts/@loafer/core/env/EnvironmentCapable.ts b/src/ts/@loafer/core/env/EnvironmentCapable.ts index 045f804..7a361c3 100644 --- a/src/ts/@loafer/core/env/EnvironmentCapable.ts +++ b/src/ts/@loafer/core/env/EnvironmentCapable.ts @@ -1,7 +1,6 @@ import Environment from '@loafer/core/env/Environment'; export interface EnvironmentCapable { - getEnvironment(): Environment; } export default EnvironmentCapable; diff --git a/src/ts/@loafer/core/env/PropertyResolver.ts b/src/ts/@loafer/core/env/PropertyResolver.ts index 1e468c5..8d1ea78 100644 --- a/src/ts/@loafer/core/env/PropertyResolver.ts +++ b/src/ts/@loafer/core/env/PropertyResolver.ts @@ -1,6 +1,8 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + export interface PropertyResolver { - containsProperty(key: string): boolean; - getProperty(key: string, defaultValue?: string): string; } export default PropertyResolver; diff --git a/src/ts/@loafer/pouches/factory/DisposablePouch.ts b/src/ts/@loafer/pouches/factory/DisposablePouch.ts new file mode 100644 index 0000000..1be0f73 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/DisposablePouch.ts @@ -0,0 +1,4 @@ +export interface DisposablePouch { +} + +export default DisposablePouch; diff --git a/src/ts/@loafer/pouches/factory/FactoryPouch.ts b/src/ts/@loafer/pouches/factory/FactoryPouch.ts new file mode 100644 index 0000000..69b1678 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/FactoryPouch.ts @@ -0,0 +1,8 @@ +import { + ClassType, +} from '@loafer/core/constants/types'; + +export interface FactoryPouch { +} + +export default FactoryPouch; diff --git a/src/ts/@loafer/pouches/factory/HierarchicalPouchFactory.ts b/src/ts/@loafer/pouches/factory/HierarchicalPouchFactory.ts index 20d810c..851e7f7 100644 --- a/src/ts/@loafer/pouches/factory/HierarchicalPouchFactory.ts +++ b/src/ts/@loafer/pouches/factory/HierarchicalPouchFactory.ts @@ -1,7 +1,6 @@ import PouchFactory from '@loafer/pouches/factory/PouchFactory'; export interface HierarchicalPouchFactory extends PouchFactory { - getParentBeanFactory(): PouchFactory; } export default HierarchicalPouchFactory; diff --git a/src/ts/@loafer/pouches/factory/ListablePouchFactory.ts b/src/ts/@loafer/pouches/factory/ListablePouchFactory.ts index 5e9b2f6..223c6cf 100644 --- a/src/ts/@loafer/pouches/factory/ListablePouchFactory.ts +++ b/src/ts/@loafer/pouches/factory/ListablePouchFactory.ts @@ -1,9 +1,10 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + import PouchFactory from '@loafer/pouches/factory/PouchFactory'; export interface ListablePouchFactory extends PouchFactory { - containsPouchDefinition(pouchName: string): boolean; - getPouchDefinitionCount(): number; - getPouchDefinitionNames(): string[]; } export default ListablePouchFactory; diff --git a/src/ts/@loafer/pouches/factory/ObjectFactory.ts b/src/ts/@loafer/pouches/factory/ObjectFactory.ts new file mode 100644 index 0000000..cc3816f --- /dev/null +++ b/src/ts/@loafer/pouches/factory/ObjectFactory.ts @@ -0,0 +1,4 @@ +export interface ObjectFactory { +} + +export default ObjectFactory; diff --git a/src/ts/@loafer/pouches/factory/PouchFactory.ts b/src/ts/@loafer/pouches/factory/PouchFactory.ts index d6abbbf..cd96ac9 100644 --- a/src/ts/@loafer/pouches/factory/PouchFactory.ts +++ b/src/ts/@loafer/pouches/factory/PouchFactory.ts @@ -7,26 +7,8 @@ import { Class, } from '@loafer/core/reflect'; -interface PouchFactory { - /** - * @param name is identity of pouch - * @param type is type of pouch (if type is not specified, set the undefined) - * @param args are argument of target constructor - * @returns an instance of pouch - */ - getPouch(name: PropertyType, type: ClassType, ...args: any[]): any; - /** - * @param type is type of pouch - * @param qualifier is identity of pouch (if qualifier is not specified, set the undefined) - * @param args are argument of target constructor - * @returns an instance of pouch - */ - getPouchByType(type: ClassType, ...args: any[]): any; +export interface PouchFactory { - containsPouch(name: string): boolean; - isSingleton(name: string): boolean; - isTransient(name: string): boolean; - getClass(name: string): Class; } export default PouchFactory; diff --git a/src/ts/@loafer/pouches/factory/config/ConfigurablePouchFactory.ts b/src/ts/@loafer/pouches/factory/config/ConfigurablePouchFactory.ts new file mode 100644 index 0000000..e546411 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/config/ConfigurablePouchFactory.ts @@ -0,0 +1,16 @@ +import { + ClassType, + PropertyType, +} from '@loafer/core/constants/types'; +import PouchFactory from '@loafer/pouches/factory/PouchFactory'; +import HierarchicalPouchFactory from '@loafer/pouches/factory/HierarchicalPouchFactory'; +import PouchDefinition from '@loafer/pouches/factory/config/PouchDefinition'; +import SingletonPouchRegistry from '@loafer/pouches/factory/config/SingletonPouchRegistry'; +import PouchExpressionResolver from '@loafer/pouches/factory/config/PouchExpressionResolver'; + + + +export interface ConfigurablePouchFactory extends HierarchicalPouchFactory, SingletonPouchRegistry { +} + +export default ConfigurablePouchFactory; diff --git a/src/ts/@loafer/pouches/factory/config/InjectCapablePouchFactory.ts b/src/ts/@loafer/pouches/factory/config/InjectCapablePouchFactory.ts index f9e9e34..0129745 100644 --- a/src/ts/@loafer/pouches/factory/config/InjectCapablePouchFactory.ts +++ b/src/ts/@loafer/pouches/factory/config/InjectCapablePouchFactory.ts @@ -5,16 +5,6 @@ import { import PouchFactory from '@loafer/pouches/factory/PouchFactory'; export interface InjectCapablePouchFactory extends PouchFactory { - createPouch(type: ClassType, injectMode?: number, dependencyCheck?: boolean): any; - injectPouch(existingPouch: any): void; - configureBean(existingBean: any, pouchName: PropertyType): any; - inject(type: ClassType, injectMode: number, dependencyCheck: boolean): any; - injectPouchProperties(existingPouch: any, injectMode: number, dependencyCheck: boolean): void; - applyPouchPropertyValues(existingPouch: any, pouchName: PropertyType): void; - initializePouch?(existingPouch: any, pouchName: PropertyType): any; - applyPouchPostProcessorsBeforeInitialization?(existingPouch: any, pouchName: PropertyType): any; - applyPouchPostProcessorsAfterInitialization?(existingPouch: any, pouchName: PropertyType): any; - destroyPouch(existingPouch: any): void; } export default InjectCapablePouchFactory; diff --git a/src/ts/@loafer/pouches/factory/config/PouchExpressionContext.ts b/src/ts/@loafer/pouches/factory/config/PouchExpressionContext.ts new file mode 100644 index 0000000..3f340fc --- /dev/null +++ b/src/ts/@loafer/pouches/factory/config/PouchExpressionContext.ts @@ -0,0 +1,11 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + +import ConfigurablePouchFactory from '@loafer/pouches/factory/config/ConfigurablePouchFactory'; +import Scope from '@loafer/pouches/factory/config/Scope'; + +export class PouchExpressionContext { +} + +export default PouchExpressionContext; diff --git a/src/ts/@loafer/pouches/factory/config/PouchExpressionResolver.ts b/src/ts/@loafer/pouches/factory/config/PouchExpressionResolver.ts new file mode 100644 index 0000000..516ac19 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/config/PouchExpressionResolver.ts @@ -0,0 +1,11 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + +import PouchExpressionContext from '@loafer/pouches/factory/config/PouchExpressionContext'; + +export interface PouchExpressionResolver { + +} + +export default PouchExpressionResolver; diff --git a/src/ts/@loafer/pouches/factory/config/Scope.ts b/src/ts/@loafer/pouches/factory/config/Scope.ts new file mode 100644 index 0000000..45f088e --- /dev/null +++ b/src/ts/@loafer/pouches/factory/config/Scope.ts @@ -0,0 +1,11 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + +import ObjectFactory from '@loafer/pouches/factory/ObjectFactory'; + +export interface Scope { + +} + +export default Scope; diff --git a/src/ts/@loafer/pouches/factory/config/SingletonPouchRegistry.ts b/src/ts/@loafer/pouches/factory/config/SingletonPouchRegistry.ts index 40afa32..026ab81 100644 --- a/src/ts/@loafer/pouches/factory/config/SingletonPouchRegistry.ts +++ b/src/ts/@loafer/pouches/factory/config/SingletonPouchRegistry.ts @@ -1,14 +1,8 @@ import { - ClassType, PropertyType, } from '@loafer/core/constants/types'; -interface SingletonPouchRegistry { - registerSingleton(pouch: any, qualifier?: PropertyType): void; - getSingleton(qualifier: PropertyType, clazz?: ClassType): any; - getSingletonByClass(clazz: ClassType, qualifier?: PropertyType): any; - hasSingleton(qualifier: PropertyType, clazz?: ClassType): boolean; - hasSingletonByClass(clazz: ClassType, qualifier?: PropertyType): boolean; +export interface SingletonPouchRegistry { } export default SingletonPouchRegistry; diff --git a/src/ts/@loafer/pouches/factory/registry/PouchDefinitionRegistry.ts b/src/ts/@loafer/pouches/factory/registry/PouchDefinitionRegistry.ts deleted file mode 100644 index 3247c03..0000000 --- a/src/ts/@loafer/pouches/factory/registry/PouchDefinitionRegistry.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - ClassType, - PropertyType, -} from '@loafer/core/constants/types'; - -import PouchDefinition from '@loafer/pouches/factory/config/PouchDefinition'; - -interface PouchDefinitionRegistry { - registerPouchDefinition(pouchDefinition: PouchDefinition): void; - - removePouchDefinition(qualifier: PropertyType, clazz?: ClassType): void; - getPouchDefinition(qualifier: PropertyType, clazz?: ClassType): PouchDefinition; - hasPouchDefinition(qualifier: PropertyType, clazz?: ClassType): boolean; - - removePouchDefinitionByClass(clazz: ClassType, qualifier?: PropertyType): void; - getPouchDefinitionByClass(clazz: ClassType, qualifier?: PropertyType): PouchDefinition; - hasPouchDefinitionByClass(clazz: ClassType, qualifier?: PropertyType): boolean; -} - -export default PouchDefinitionRegistry; diff --git a/src/ts/@loafer/pouches/factory/support/AbstractInjectCapablePouchFactory.ts b/src/ts/@loafer/pouches/factory/support/AbstractInjectCapablePouchFactory.ts new file mode 100644 index 0000000..0443a9d --- /dev/null +++ b/src/ts/@loafer/pouches/factory/support/AbstractInjectCapablePouchFactory.ts @@ -0,0 +1,7 @@ +import AliasRegistry from '@loafer/core/AliasRegistry'; +import PouchDefinition from '@loafer/pouches/factory/config/PouchDefinition'; + +export abstract class AbstractInjectCapablePouchFactory extends AliasRegistry { +} + +export default AbstractInjectCapablePouchFactory; diff --git a/src/ts/@loafer/pouches/factory/support/AbstractPouchFactory.ts b/src/ts/@loafer/pouches/factory/support/AbstractPouchFactory.ts new file mode 100644 index 0000000..9f83ff0 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/support/AbstractPouchFactory.ts @@ -0,0 +1,7 @@ +import AliasRegistry from '@loafer/core/AliasRegistry'; +import FactoryPouchRegistrySupport from '@loafer/pouches/factory/support/FactoryPouchRegistrySupport'; + +export abstract class AbstractPouchFactory extends FactoryPouchRegistrySupport { +} + +export default AbstractPouchFactory; diff --git a/src/ts/@loafer/pouches/factory/support/DefaultListablePouchFactory.ts b/src/ts/@loafer/pouches/factory/support/DefaultListablePouchFactory.ts new file mode 100644 index 0000000..7831f4d --- /dev/null +++ b/src/ts/@loafer/pouches/factory/support/DefaultListablePouchFactory.ts @@ -0,0 +1,7 @@ +import AliasRegistry from '@loafer/core/AliasRegistry'; +import PouchDefinition from '@loafer/pouches/factory/config/PouchDefinition'; + +export class DefaultListablePouchFactory extends AliasRegistry { +} + +export default DefaultListablePouchFactory; diff --git a/src/ts/@loafer/pouches/factory/support/DefaultSingletonPouchRegistry.ts b/src/ts/@loafer/pouches/factory/support/DefaultSingletonPouchRegistry.ts new file mode 100644 index 0000000..fdf3fa4 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/support/DefaultSingletonPouchRegistry.ts @@ -0,0 +1,14 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; + +import SimpleAliasRegistry from '@loafer/core/SimpleAliasRegistry'; +import ObjectFactory from '@loafer/pouches/factory/ObjectFactory'; +import DisposablePouch from '@loafer/pouches/factory/DisposablePouch'; +import PouchDefinition from '@loafer/pouches/factory/config/PouchDefinition'; +import SingletonPouchRegistry from '@loafer/pouches/factory/config/SingletonPouchRegistry'; + +export class DefaultSingletonPouchRegistry extends SimpleAliasRegistry implements SingletonPouchRegistry { +} + +export default DefaultSingletonPouchRegistry; diff --git a/src/ts/@loafer/pouches/factory/support/FactoryPouchRegistrySupport.ts b/src/ts/@loafer/pouches/factory/support/FactoryPouchRegistrySupport.ts new file mode 100644 index 0000000..86d6ca0 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/support/FactoryPouchRegistrySupport.ts @@ -0,0 +1,14 @@ +import { + ClassType, + PropertyType, +} from '@loafer/core/constants/types'; + +import AliasRegistry from '@loafer/core/AliasRegistry'; +import FactoryPouch from '@loafer/pouches/factory/FactoryPouch'; +import DefaultSingletonPouchRegistry from '@loafer/pouches/factory/support/DefaultSingletonPouchRegistry'; + +export abstract class FactoryPouchRegistrySupport extends DefaultSingletonPouchRegistry { + +} + +export default FactoryPouchRegistrySupport; diff --git a/src/ts/@loafer/pouches/factory/support/PouchDefinitionRegistry.ts b/src/ts/@loafer/pouches/factory/support/PouchDefinitionRegistry.ts new file mode 100644 index 0000000..93ca388 --- /dev/null +++ b/src/ts/@loafer/pouches/factory/support/PouchDefinitionRegistry.ts @@ -0,0 +1,10 @@ +import { + PropertyType, +} from '@loafer/core/constants/types'; +import AliasRegistry from '@loafer/core/AliasRegistry'; +import PouchDefinition from '@loafer/pouches/factory/config/PouchDefinition'; + +export interface PouchDefinitionRegistry extends AliasRegistry { +} + +export default AliasRegistry;