alarmtype.java

来自「this is example use EJB with jboss.」· Java 代码 · 共 64 行

JAVA
64
字号
/*
 * 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 + =
减小字号Ctrl + -
显示快捷键?