config.ts 707 Bytes
export const CONFIG_ITEM_KEY = "itemKey";
export const CONFIG_ITEM_VALUE = "itemValue";
export const CONFIG_ITEM_SOURCE_ATTRIBUTE = "itemSourceAttribute";
export const CONFIG_ITEM_TARGET_ATTRIBUTE = "itemTargetAttribute";
export const CONFIG_ITEM_VALIDATOR = "itemValidator";
export const CONFIG_RETRY_TIMEOUT = "retryTimeout";
export const CONFIG_FILE_HANDLER = "fileHandler";

export class Config {

    protected config:any = {};

    hasConfig(key:string) {
        if (this.config[key]) {
            return true;
        }
        return false;
    }

    getConfig(key:string) {
        return this.config[key];
    }

    setConfig(key:string, value:any) {
        this.config[key] = value;
    }

}