/**
 * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org)  Apache License, Version 2.0  http://www.apache.org/licenses/LICENSE-2.0
 */
define(function () {

    "use strict";   // JS strict mode

    /**
     * Constants used by the siddhi editor design-view
     */
    var constants = {
        ALPHABETIC_VALIDATOR_REGEX: /^([a-zA-Z])$/,
        INT_LONG_VALIDATOR_REGEX: /^[-+]?\d+$/,
        DOUBLE_FLOAT_VALIDATOR_REGEX: /^[+-]?([0-9]*[.])?[0-9]+$/,
        TIME_VALIDATOR_REGEX: /^[_A-z0-9]*((-|\s)*[_A-z0-9])*$/g,
        START: "start",
        CRON_EXPRESSION: "cron-expression",
        EVERY: "every",
        AT: "at",
        SORT: "sort",
        FREQUENT: "frequent",
        LOSSY_FREQUENT: "lossyfrequent",
        DEFAULT_STORE_TYPE: "in-memory",
        RDBMS_STORE_TYPE: "rdbms",
        DEFAULT_MAPPER_TYPE: "passThrough",
        ATTRIBUTE: "attribute",
        MAP: "map",
        LIST: "list",
        MAPPER: "mapper",
        STORE: "store",
        PRIMARY_KEY: "primarykey",
        INDEX: "index",
        AGGREGATION: "aggregation",
        FUNCTION: "function",
        SINK: "sink",
        SOURCE: "source",
        TABLE: "table",
        STREAM: "stream",
        WINDOW: "window",
        TRIGGER: "trigger",
        PARTITION: "partition",
        JOIN_QUERY: "join-query",
        PATTERN_QUERY: "pattern-query",
        SEQUENCE_QUERY: "sequence-query",
        WINDOW_FILTER_PROJECTION_QUERY: "window-filter-projection-query",
        FILTER_QUERY_DROP: "filterQueryDrop",
        WINDOW_QUERY_DROP: "windowQueryDrop",
        FUNCTION_QUERY_DROP: "functionQueryDrop",
        PROJECTION_QUERY_DROP: "projectionQueryDrop",
        PROJECTION: "projection",
        FILTER: "filter",
        TYPE_USER_DEFINED: "user_defined",
        TYPE_ALL: "all",
        VALUE_ALL: "*",
        INT: "int",
        LONG: "long",
        DOUBLE: "double",
        FLOAT: "float",
        TIME: "time",
        BOOL: "bool",
        TRIGGERED_TIME: "triggered_time",
        INTERVAL: "interval",
        RANGE: "range",
        GROUP_BY: "group-by",
        ORDER_BY: "order-by",
        SIDDHI_TIME: ["seconds", "minutes", "hours", "days", "months", "years"],
        MINUTES: "minutes",
        AS: "as",
        RETENTION_PERIOD: "retentionperiod",
        JOIN: "join",
        LEFT: "left",
        RIGHT: "right",
        QUERY: "query",
        OPERATION: "operation",
        INSERT: "insert",
        UPDATE: "update",
        DELETE: "delete",
        UPDATE_OR_INSERT_INTO: "update_or_insert_into",
        CUSTOM: "custom",
        STREAM_HANDLER: "stream-handler",
        STREAM_FUNCTION: "stream-function",
        TYPE_HTTP_REQUEST: "http-request",
        TYPE_HTTP_RESPONSE: "http-response",
        TYPE_CALL: "call",
        TYPE_CALL_RESPONSE: "call-response",
        JOIN_QUERY_TITLE: "Join Query Configuration",
        AGGREGATION_TITLE: "Aggregation Configuration",
        APP_ANNOTATION_TITLE: "Siddhi App Configuration",
        FUNCTION_TITLE: "Function Configuration",
        PARTITION_TITLE: "Partition Configuration",
        PATTERN_QUERY_TITLE: "Pattern Query Configuration",
        SEQUENCE_QUERY_TITLE: "Sequence Query Configuration",
        SINK_TITLE: "Sink Configuration",
        SOURCE_TITLE: "Source Configuration",
        STREAM_TITLE: "Stream Configuration",
        TABLE_TITLE: "Table Configuration",
        TRIGGER_TITLE: "Trigger Configuration",
        QUERY_TITLE: "Query Configuration",
        WINDOW_TITLE: "Window Configuration",
        DATASOURCE: "datasource",
        INLINE_CONFIG: "inline-config",
        JNDI_RESOURCE: "jndi-resource",
        FAULT_STREAM_PREFIX: "!",
        PURGING: "purging",
        PURGE: "purge",
        CURRENT_EVENTS: "current_events",
        AGGREGATE_FUNCTION: "aggregate-function",
        KEYWORD: "keyword",
        OPERATOR: "operator",
        INPUT: "input",
        FOR: "for",
        ASC:"asc",
        DESC: "desc",
        BATCH_WINDOW_PROCESSOR: "batch",
        MULTI_VALUE: "...",
        EXTENSION_INSTALLED: "INSTALLED",
        EXTENSION_NOT_INSTALLED: "NOT_INSTALLED",
        EXTENSION_PARTIALLY_INSTALLED: "PARTIALLY_INSTALLED",
        EXTENSION_UNINSTALLED: "UNINSTALLED",
        EXTENSION_NOT_UNINSTALLED: "NOT_UNINSTALLED",
        EXTENSION_PARTIALLY_UNINSTALLED: "PARTIALLY_UNINSTALLED",
        RESTART_REQUIRED: "RESTART_REQUIRED",
        RESTART_REQUIRED_TEXT: "Restart Required",
        EXTENSION_INSTALLED_TEXT: "Installed",
        EXTENSION_NOT_INSTALLED_TEXT: "Not Installed",
        EXTENSION_PARTIALLY_INSTALLED_TEXT: "Partially Installed",
        INSTALL: "Install",
        UNINSTALL: "UnInstall"
    };

    return constants;
});
