Опции для линков @author kreon
| 33 | * |
| 34 | */ |
| 35 | @DatabaseTable(tableName = "linkoptions") |
| 36 | public class LinkOption { |
| 37 | public static final String BOOLEAN_IGNORE_PKTPWD = "ignorepktpwd"; |
| 38 | public static final String BOOLEAN_PACK_NETMAIL = "packnetmail"; |
| 39 | public static final String BOOLEAN_PACK_ECHOMAIL = "packechomail"; |
| 40 | public static final String BOOLEAN_CRASH_NETMAIL = "crashnetmail"; |
| 41 | public static final String BOOLEAN_CRASH_ECHOMAIL = "crashechomail"; |
| 42 | public static final String BOOLEAN_CRASH_FILEMAIL = "crashfilemail"; |
| 43 | public static final String BOOLEAN_AUTOCREATE_AREA = "areaautocreate"; |
| 44 | public static final String BOOLEAN_AUTOCREATE_FILE = "fileautocreate"; |
| 45 | public static final String BOOLEAN_POLL_BY_TIMEOT = "pollbytimeout"; |
| 46 | public static final String BOOLEAN_AREAFIX = "areafix"; |
| 47 | public static final String BOOLEAN_FILEFIX = "filefix"; |
| 48 | public static final String BOOLEAN_SCRIPTFIX = "scriptfix"; |
| 49 | public static final String BOOLEAN_PAUSE = "pause"; |
| 50 | public static final String BOOLEAN_FORWARD_AREAFIX = "forwardareafix"; |
| 51 | public static final String BOOLEAN_FORWARD_FILEFIX = "forwardfilefix"; |
| 52 | public static final String LONG_LINK_LEVEL = "level"; |
| 53 | public static final String SARRAY_LINK_GROUPS = "groups"; |
| 54 | public static final String STRING_AREAFIX_PWD = "areafixpwd"; |
| 55 | public static final String STRING_SCRIPTFIX_PWD = "scriptfixpwd"; |
| 56 | public static final String STRING_FILEFIX_PWD = "filefixpwd"; |
| 57 | public static final String STRING_OUR_AKA = "ouraka"; |
| 58 | private static final HashMap<String, String> options = generateOptionsMap(); |
| 59 | |
| 60 | /** |
| 61 | * Короткие названия |
| 62 | * |
| 63 | * @return |
| 64 | */ |
| 65 | private static HashMap<String, String> generateOptionsMap() { |
| 66 | HashMap<String, String> options = new HashMap<>(); |
| 67 | options.put("ignorepktpwd", "-nopwd"); |
| 68 | options.put("packnetmail", "-netpack"); |
| 69 | options.put("packechomail", "-echpack"); |
| 70 | options.put("crashnetmail", "-netcrash"); |
| 71 | options.put("crashechomail", "-echcrash"); |
| 72 | options.put("crashfilemail", "-fchcrash"); |
| 73 | options.put("areaautocreate", "-aacreate"); |
| 74 | options.put("fileautocreate", "-facreate"); |
| 75 | options.put("pollbytimeout", "-poll"); |
| 76 | options.put("areafix", "-afix"); |
| 77 | options.put("filefix", "-ffix"); |
| 78 | options.put("level", "-lvl"); |
| 79 | options.put("groups", "-grps"); |
| 80 | options.put("areafixpwd", "-afixpwd"); |
| 81 | options.put("filefixpwd", "-ffixpwd"); |
| 82 | options.put("ouraka", "-oaka"); |
| 83 | options.put("pause", "-pause"); |
| 84 | return options; |
| 85 | } |
| 86 | |
| 87 | public static String getOptByName(String name) { |
| 88 | return options.get(name); |
| 89 | } |
| 90 | |
| 91 | public static String getNameByOpt(String opt) { |
| 92 | String ret = null; |
nothing calls this directly
no test coverage detected