/*-
 * ~~~~~~licensing~~~~~~
 * entaxy-management-plugin
 * ==========
 * Copyright (C) 2020 - 2021 EmDev LLC
 * ==========
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * ~~~~~~/licensing~~~~~~
 */
var Entaxy;
(function (Entaxy) {

    function getAllBundleStates() {
        return JSON.parse('["Active", "Installed", "Resolved", "Starting", "Stopping", "Uninstalled"]');
    }
    Entaxy.getAllBundleStates = getAllBundleStates;

    function getConnectorTemplates() {
        return JSON.parse('["uniform-service-active-in-connector", "uniform-service-passive-in-connector", "uniform-service-active-out-connector", "uniform-service-passive-out-connector", "odata-in-connector", "sql-out-connector"]');
    }
    Entaxy.getConnectorTemplates = getConnectorTemplates;

    function getConnectorTemplateParams(templateName) {
        let json = JSON.parse(connectorTemplateParams);
        return json[templateName];
    }
    Entaxy.getConnectorTemplateParams = getConnectorTemplateParams;

    let connectorTemplateParams = '{"uniform-service-active-in-connector":[' +
        '{' +
            '"label":"period",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":"1m"' +
        '},' +
        '{' +
            '"label":"username",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":"admin"' +
        '},' +
        '{' +
            '"label":"password",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":""' +
        '},' +
        '{' +
            '"label":"endpointUrl",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":""' +
        '},' +
        '{' +
            '"label":"connectionTimeout",' +
            '"type":"int",' +
            '"helpText":null,' +
            '"value":3000' +
        '},' +
        '{' +
            '"label":"connectionMaxThreads",' +
            '"type":"int",' +
            '"helpText":null,' +
            '"value":1' +
        '}' +
    '],' +
    '"uniform-service-active-out-connector":[' +
        '{' +
            '"label":"username",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":"admin"' +
        '},' +
        '{' +
            '"label":"password",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":""' +
        '},' +
        '{' +
            '"label":"endpointUrl",' +
            '"type":"java.lang.String",' +
            '"helpText":null,' +
            '"value":""' +
        '},' +
        '{' +
            '"label":"connectionTimeout",' +
            '"type":"int",' +
            '"helpText":null,' +
            '"value":3000' +
        '},' +
        '{' +
            '"label":"connectionMaxThreads",' +
            '"type":"int",' +
            '"helpText":null,' +
            '"value":1' +
        '}' +
    '],' +
    '"uniform-service-passive-in-connector":[],' +
    '"uniform-service-passive-out-connector":[],' +
    '"odata-in-connector":[],' +
    '"sql-out-connector":[' +
        '{' +
        '"label":"serverName",' +
        '"type":"java.lang.String",' +
        '"helpText":null,' +
        '"value":""' +
        '},' +
        '{' +
        '"label":"portNumber",' +
        '"type":"java.lang.Integer",' +
        '"helpText":null,' +
        '"value":5432' +
        '},' +
        '{' +
        '"label":"databaseName",' +
        '"type":"java.lang.String",' +
        '"helpText":null,' +
        '"value":""' +
        '},' +
        '{' +
        '"label":"user",' +
        '"type":"java.lang.String",' +
        '"helpText":null,' +
        '"value":""' +
        '},' +
        '{' +
        '"label":"password",' +
        '"type":"java.lang.String",' +
        '"helpText":null,' +
        '"value":""' +
        '},' +
        '{' +
        '"label":"dataSourceClass",' +
        '"type":"java.lang.String",' +
        '"helpText":null,' +
        '"value":"org.postgresql.ds.PGSimpleDataSource"' +
        '}' +
        ']' +
    '}';

})(Entaxy || (Entaxy = {}));
