UserSetting.java 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. package com.genersoft.iot.vmp.conf;
  2. import org.springframework.boot.context.properties.ConfigurationProperties;
  3. import org.springframework.core.annotation.Order;
  4. import org.springframework.stereotype.Component;
  5. import java.util.ArrayList;
  6. import java.util.List;
  7. /**
  8. * 配置文件 user-settings 映射的配置信息
  9. */
  10. @Component
  11. @ConfigurationProperties(prefix = "user-settings", ignoreInvalidFields = true)
  12. @Order(0)
  13. public class UserSetting {
  14. private Boolean savePositionHistory = Boolean.FALSE;
  15. private Boolean autoApplyPlay = Boolean.FALSE;
  16. private Boolean seniorSdp = Boolean.FALSE;
  17. private Integer playTimeout = 18000;
  18. private int platformPlayTimeout = 60000;
  19. private Boolean interfaceAuthentication = Boolean.TRUE;
  20. private Boolean recordPushLive = Boolean.TRUE;
  21. private Boolean recordSip = Boolean.TRUE;
  22. private Boolean logInDatebase = Boolean.TRUE;
  23. private Boolean usePushingAsStatus = Boolean.TRUE;
  24. private Boolean useSourceIpAsStreamIp = Boolean.FALSE;
  25. private Boolean sipUseSourceIpAsRemoteAddress = Boolean.FALSE;
  26. private Boolean streamOnDemand = Boolean.TRUE;
  27. private Boolean pushAuthority = Boolean.TRUE;
  28. private Boolean syncChannelOnDeviceOnline = Boolean.FALSE;
  29. private Boolean sipLog = Boolean.FALSE;
  30. private Boolean sqlLog = Boolean.FALSE;
  31. private Boolean sendToPlatformsWhenIdLost = Boolean.FALSE;
  32. private Boolean refuseChannelStatusChannelFormNotify = Boolean.FALSE;
  33. private Boolean deviceStatusNotify = Boolean.FALSE;
  34. private Boolean useCustomSsrcForParentInvite = Boolean.TRUE;
  35. private String serverId = "000000";
  36. private String recordPath = null;
  37. private String thirdPartyGBIdReg = "[\\s\\S]*";
  38. private String civilCodeFile = "classpath:civilCode.csv";
  39. private List<String> interfaceAuthenticationExcludes = new ArrayList<>();
  40. private List<String> allowedOrigins = new ArrayList<>();
  41. private int maxNotifyCountQueue = 10000;
  42. private int registerAgainAfterTime = 60;
  43. private boolean registerKeepIntDialog = false;
  44. public Boolean getSavePositionHistory() {
  45. return savePositionHistory;
  46. }
  47. public Boolean isSavePositionHistory() {
  48. return savePositionHistory;
  49. }
  50. public Boolean isAutoApplyPlay() {
  51. return autoApplyPlay;
  52. }
  53. public Boolean isSeniorSdp() {
  54. return seniorSdp;
  55. }
  56. public Integer getPlayTimeout() {
  57. return playTimeout;
  58. }
  59. public Boolean isInterfaceAuthentication() {
  60. return interfaceAuthentication;
  61. }
  62. public Boolean isRecordPushLive() {
  63. return recordPushLive;
  64. }
  65. public List<String> getInterfaceAuthenticationExcludes() {
  66. return interfaceAuthenticationExcludes;
  67. }
  68. public void setSavePositionHistory(Boolean savePositionHistory) {
  69. this.savePositionHistory = savePositionHistory;
  70. }
  71. public void setAutoApplyPlay(Boolean autoApplyPlay) {
  72. this.autoApplyPlay = autoApplyPlay;
  73. }
  74. public void setSeniorSdp(Boolean seniorSdp) {
  75. this.seniorSdp = seniorSdp;
  76. }
  77. public void setPlayTimeout(Integer playTimeout) {
  78. this.playTimeout = playTimeout;
  79. }
  80. public void setInterfaceAuthentication(boolean interfaceAuthentication) {
  81. this.interfaceAuthentication = interfaceAuthentication;
  82. }
  83. public void setRecordPushLive(Boolean recordPushLive) {
  84. this.recordPushLive = recordPushLive;
  85. }
  86. public void setInterfaceAuthenticationExcludes(List<String> interfaceAuthenticationExcludes) {
  87. this.interfaceAuthenticationExcludes = interfaceAuthenticationExcludes;
  88. }
  89. public Boolean getLogInDatebase() {
  90. return logInDatebase;
  91. }
  92. public void setLogInDatebase(Boolean logInDatebase) {
  93. this.logInDatebase = logInDatebase;
  94. }
  95. public String getServerId() {
  96. return serverId;
  97. }
  98. public void setServerId(String serverId) {
  99. this.serverId = serverId;
  100. }
  101. public String getThirdPartyGBIdReg() {
  102. return thirdPartyGBIdReg;
  103. }
  104. public void setThirdPartyGBIdReg(String thirdPartyGBIdReg) {
  105. this.thirdPartyGBIdReg = thirdPartyGBIdReg;
  106. }
  107. public Boolean getRecordSip() {
  108. return recordSip;
  109. }
  110. public void setRecordSip(Boolean recordSip) {
  111. this.recordSip = recordSip;
  112. }
  113. public int getPlatformPlayTimeout() {
  114. return platformPlayTimeout;
  115. }
  116. public void setPlatformPlayTimeout(int platformPlayTimeout) {
  117. this.platformPlayTimeout = platformPlayTimeout;
  118. }
  119. public Boolean isUsePushingAsStatus() {
  120. return usePushingAsStatus;
  121. }
  122. public void setUsePushingAsStatus(Boolean usePushingAsStatus) {
  123. this.usePushingAsStatus = usePushingAsStatus;
  124. }
  125. public Boolean getStreamOnDemand() {
  126. return streamOnDemand;
  127. }
  128. public void setStreamOnDemand(Boolean streamOnDemand) {
  129. this.streamOnDemand = streamOnDemand;
  130. }
  131. public Boolean getUseSourceIpAsStreamIp() {
  132. return useSourceIpAsStreamIp;
  133. }
  134. public void setUseSourceIpAsStreamIp(Boolean useSourceIpAsStreamIp) {
  135. this.useSourceIpAsStreamIp = useSourceIpAsStreamIp;
  136. }
  137. public Boolean getPushAuthority() {
  138. return pushAuthority;
  139. }
  140. public void setPushAuthority(Boolean pushAuthority) {
  141. this.pushAuthority = pushAuthority;
  142. }
  143. public Boolean getSyncChannelOnDeviceOnline() {
  144. return syncChannelOnDeviceOnline;
  145. }
  146. public void setSyncChannelOnDeviceOnline(Boolean syncChannelOnDeviceOnline) {
  147. this.syncChannelOnDeviceOnline = syncChannelOnDeviceOnline;
  148. }
  149. public Boolean getSipUseSourceIpAsRemoteAddress() {
  150. return sipUseSourceIpAsRemoteAddress;
  151. }
  152. public void setSipUseSourceIpAsRemoteAddress(Boolean sipUseSourceIpAsRemoteAddress) {
  153. this.sipUseSourceIpAsRemoteAddress = sipUseSourceIpAsRemoteAddress;
  154. }
  155. public Boolean getSipLog() {
  156. return sipLog;
  157. }
  158. public void setSipLog(Boolean sipLog) {
  159. this.sipLog = sipLog;
  160. }
  161. public List<String> getAllowedOrigins() {
  162. return allowedOrigins;
  163. }
  164. public void setAllowedOrigins(List<String> allowedOrigins) {
  165. this.allowedOrigins = allowedOrigins;
  166. }
  167. public Boolean getSendToPlatformsWhenIdLost() {
  168. return sendToPlatformsWhenIdLost;
  169. }
  170. public void setSendToPlatformsWhenIdLost(Boolean sendToPlatformsWhenIdLost) {
  171. this.sendToPlatformsWhenIdLost = sendToPlatformsWhenIdLost;
  172. }
  173. public Boolean getRefuseChannelStatusChannelFormNotify() {
  174. return refuseChannelStatusChannelFormNotify;
  175. }
  176. public void setRefuseChannelStatusChannelFormNotify(Boolean refuseChannelStatusChannelFormNotify) {
  177. this.refuseChannelStatusChannelFormNotify = refuseChannelStatusChannelFormNotify;
  178. }
  179. public String getRecordPath() {
  180. return recordPath;
  181. }
  182. public void setRecordPath(String recordPath) {
  183. this.recordPath = recordPath;
  184. }
  185. public int getMaxNotifyCountQueue() {
  186. return maxNotifyCountQueue;
  187. }
  188. public void setMaxNotifyCountQueue(int maxNotifyCountQueue) {
  189. this.maxNotifyCountQueue = maxNotifyCountQueue;
  190. }
  191. public Boolean getDeviceStatusNotify() {
  192. return deviceStatusNotify;
  193. }
  194. public void setDeviceStatusNotify(Boolean deviceStatusNotify) {
  195. this.deviceStatusNotify = deviceStatusNotify;
  196. }
  197. public Boolean getUseCustomSsrcForParentInvite() {
  198. return useCustomSsrcForParentInvite;
  199. }
  200. public void setUseCustomSsrcForParentInvite(Boolean useCustomSsrcForParentInvite) {
  201. this.useCustomSsrcForParentInvite = useCustomSsrcForParentInvite;
  202. }
  203. public Boolean getSqlLog() {
  204. return sqlLog;
  205. }
  206. public void setSqlLog(Boolean sqlLog) {
  207. this.sqlLog = sqlLog;
  208. }
  209. public String getCivilCodeFile() {
  210. return civilCodeFile;
  211. }
  212. public void setCivilCodeFile(String civilCodeFile) {
  213. this.civilCodeFile = civilCodeFile;
  214. }
  215. public int getRegisterAgainAfterTime() {
  216. return registerAgainAfterTime;
  217. }
  218. public void setRegisterAgainAfterTime(int registerAgainAfterTime) {
  219. this.registerAgainAfterTime = registerAgainAfterTime;
  220. }
  221. public boolean isRegisterKeepIntDialog() {
  222. return registerKeepIntDialog;
  223. }
  224. public void setRegisterKeepIntDialog(boolean registerKeepIntDialog) {
  225. this.registerKeepIntDialog = registerKeepIntDialog;
  226. }
  227. }