提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 用户的权限列表 |
|
6 |
* @date 2023/03/16 09:04:48 |
|
7 |
*/ |
|
8 |
public enum EM_ALARM_USERAUTHORITY { |
|
9 |
/** |
|
10 |
* 未知 |
|
11 |
*/ |
|
12 |
EM_ALARM_USERAUTHORITY_UNKNOWN(0, "未知"), |
|
13 |
/** |
|
14 |
* 布防 |
|
15 |
*/ |
|
16 |
EM_ALARM_USERAUTHORITY_ARMING(1, "布防"), |
|
17 |
/** |
|
18 |
* 强制布防 |
|
19 |
*/ |
|
20 |
EM_ALARM_USERAUTHORITY_FORCEARMING(2, "强制布防"), |
|
21 |
/** |
|
22 |
* 撤防 |
|
23 |
*/ |
|
24 |
EM_ALARM_USERAUTHORITY_DISARM(3, "撤防"), |
|
25 |
/** |
|
26 |
* 旁路 |
|
27 |
*/ |
|
28 |
EM_ALARM_USERAUTHORITY_BYPASS(4, "旁路"), |
|
29 |
/** |
|
30 |
* 永久旁路 |
|
31 |
*/ |
|
32 |
EM_ALARM_USERAUTHORITY_PERMANENTBYPASS(5, "永久旁路"), |
|
33 |
/** |
|
34 |
* 消警 |
|
35 |
*/ |
|
36 |
EM_ALARM_USERAUTHORITY_ALARMCONFIRM(6, "消警"), |
|
37 |
/** |
|
38 |
* 查询日志 |
|
39 |
*/ |
|
40 |
EM_ALARM_USERAUTHORITY_QUERYLOG(7, "查询日志"), |
|
41 |
/** |
|
42 |
* 调试模式 |
|
43 |
*/ |
|
44 |
EM_ALARM_USERAUTHORITY_DEBUGMODE(8, "调试模式"), |
|
45 |
/** |
|
46 |
* 更改基本程序,如:升级程序 |
|
47 |
*/ |
|
48 |
EM_ALARM_USERAUTHORITY_UPGRADE(9, "更改基本程序,如:升级程序"), |
|
49 |
/** |
|
50 |
* 添加/更改配置参数 |
|
51 |
*/ |
|
52 |
EM_ALARM_USERAUTHORITY_SYSTEMCONFIG(10, "添加/更改配置参数"), |
|
53 |
/** |
|
54 |
* 用户管理 |
|
55 |
*/ |
|
56 |
EM_ALARM_USERAUTHORITY_USERMANAGEMENT(11, "用户管理"); |
|
57 |
|
|
58 |
private int value; |
|
59 |
|
|
60 |
private String note; |
|
61 |
|
|
62 |
public String getNote() { |
|
63 |
return note; |
|
64 |
} |
|
65 |
|
|
66 |
public int getValue() { |
|
67 |
return value; |
|
68 |
} |
|
69 |
|
|
70 |
EM_ALARM_USERAUTHORITY(int givenValue, String note) { |
|
71 |
this.value = givenValue; |
|
72 |
this.note = note; |
|
73 |
} |
|
74 |
|
|
75 |
public static String getNoteByValue(int givenValue) { |
|
76 |
for (EM_ALARM_USERAUTHORITY enumType : EM_ALARM_USERAUTHORITY.values()) { |
|
77 |
if (givenValue == enumType.getValue()) { |
|
78 |
return enumType.getNote(); |
|
79 |
} |
|
80 |
} |
|
81 |
return null; |
|
82 |
} |
|
83 |
|
|
84 |
public static int getValueByNote(String givenNote) { |
|
85 |
for (EM_ALARM_USERAUTHORITY enumType : EM_ALARM_USERAUTHORITY.values()) { |
|
86 |
if (givenNote.equals(enumType.getNote())) { |
|
87 |
return enumType.getValue(); |
|
88 |
} |
|
89 |
} |
|
90 |
return -1; |
|
91 |
} |
|
92 |
} |