config.ts 811 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 const CONFIG_TARGET_DIRECTORY = "targetDirectory";

export class Config {

    protected config:any = {};

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

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

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

}