⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alarmtype.java

📁 this is example use EJB with jboss.
💻 JAVA
字号:
/*
 * Copyright(C) 2008, NTT AT Co., Ltd.
 * Project: AWGView
 *
 * Notes:
 *  N/A
 *
 * Record of change:
 * Date         Version      Name       Content
 * 2008/12/15   1.0          TriNT      First create       
 */
package jp.co.ntt.awgview.server.common;

import java.util.ArrayList;

import jp.co.ntt.awgview.server.constant.Constants;

/**
 * Class name : AlarmType <BR>
 * Package : jp.co.ntt_at.awgview.server.common <BR>
 * 
 * Description : This class is provides function to get all Alarm type form configuration
 * file (alarm_type.ini)<BR>
 * 
 * @author : AI&T
 * @version : 1.0
 */
public class AlarmType {
	private static ArrayList<String> arrayAlarmType = new ArrayList<String>();

	/**
	 * Load Alarm Type form configuration file into ArrayList<String>
	 * 
	 * @return boolean
	 */
	public static boolean loadAlarmType() {

		String pathConf = Setting.getJBossHome()
				+ Constants.ALARM_TYPE_CONFIG_FILE;		
		LogWriter.getDBLogger().info(
				"Read file Alarm type configuration with path: " + pathConf);

		arrayAlarmType = Utils.readFile2ArrayList(pathConf);
		if (arrayAlarmType == null) {
			LogWriter.getDBLogger().error("Cout not read Alarm type setting");
			return false;
		} else if (arrayAlarmType.isEmpty()) {
			LogWriter.getDBLogger().error("Cout not read Alarm type setting");
			return false;
		}

		return true;
	}

	/**
	 * Get Alarm Type
	 * 
	 * @return arrayAlarmType is ArrayList<String>
	 */
	public static ArrayList<String> getAlarmType() {
		return arrayAlarmType;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -