package com.reyun.util;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.ResourceBundle;



public class Constant {

	public static String CURRENT_ACCOUNT = "$CURRENT_ACCOUNT$";
	
	public static ResourceBundle resourceBundle = ResourceBundle.getBundle("db");
	public static String dburl = resourceBundle.getString("db.url");
	public static String dbusername = resourceBundle.getString("db.username");
	public static String dbpassword = resourceBundle.getString("db.password");
	public static String dbdriver = resourceBundle.getString("db.driver");

	public static ResourceBundle resourcePrestoBundle = ResourceBundle.getBundle("presto");
	public static String prestoDriverClass = resourcePrestoBundle.getString("presto.driver");
	public static String prestoUrl = resourcePrestoBundle.getString("presto.url");
	public static String prestoUsername = resourcePrestoBundle.getString("presto.username");

	public static ResourceBundle resourceHiveBundle = ResourceBundle.getBundle("hive");
	public static String hiveDriverClass = resourceHiveBundle.getString("hive.driver");
	public static String hiveUrl = resourceHiveBundle.getString("hive.url");
	public static String hiveUsername = resourceHiveBundle.getString("hive.username");
	
	public static ResourceBundle commonBundle = ResourceBundle.getBundle("common");
	public static String profileTable = commonBundle.getString("profile.table");
	public static String eventTable = commonBundle.getString("event.table");
	public static String usergroupTable = commonBundle.getString("usergroup.table");
	public static String accountCheckUrl = commonBundle.getString("account.check.url");
	public static String reportUrl = commonBundle.getString("report.url");
	public static String adminUrl = commonBundle.getString("admin.url");
	public static String trackingUrl = commonBundle.getString("trackingio.url");
	public static String receiverHost = commonBundle.getString("receiver.host");
	public static String receiverPort = commonBundle.getString("receiver.port");
	public static String ioreceiverHost = commonBundle.getString("io.receiver.host");
	public static String ioreceiverPort = commonBundle.getString("io.receiver.port");
	public static String demoUrl = commonBundle.getString("demo.url");
	public static String flowneed = commonBundle.getString("flowneed");
	public static String reportExportTask = commonBundle.getString("report.export.task");



	public static ResourceBundle mailBundle = ResourceBundle.getBundle("mail");
	public static String mailHost = mailBundle.getString("mail.host");
	public static String mailUsername = mailBundle.getString("mail.username");
	public static String mailPassword = mailBundle.getString("mail.password");
	public static String mailContentType = mailBundle.getString("mail.content_type");
	public static String mailValidTime = mailBundle.getString("mail.valid_time");
	public static String mailList = mailBundle.getString("mail.list");
	public static List<String> mlist = Arrays.asList(mailList.split(","));
	

	public static ResourceBundle redis = ResourceBundle.getBundle("redis");
	public static String REDIS_IP_REQUEST_TIMES = redis.getString("redis.ip.requesttimes");
	public static long cacheLiveTime = Long.parseLong(redis.getString("cache.livetime"));
	public static Integer iscache = Integer.parseInt(redis.getString("iscache"));


	public static ResourceBundle keyBuddle = ResourceBundle.getBundle("key");
	public static String accessKey = keyBuddle.getString("ddb.accesskey");
	public static String secretKey = keyBuddle.getString("ddb.secretkey");
	public static String bucket = keyBuddle.getString("bucket");
}
