3737import com .mirth .connect .client .core .Permissions ;
3838import com .mirth .connect .client .core .api .BaseServletInterface ;
3939import com .mirth .connect .client .core .api .MirthOperation ;
40+ import com .mirth .connect .client .core .api .ApiContentTypes ;
4041import com .mirth .connect .client .core .api .Param ;
4142import com .mirth .connect .model .ChannelHeader ;
4243import com .mirth .connect .model .alert .AlertInfo ;
4546
4647@ Path ("/alerts" )
4748@ Tag (name = "Alerts" )
48- @ Consumes ({ MediaType .APPLICATION_XML , MediaType .APPLICATION_JSON })
49- @ Produces ({ MediaType .APPLICATION_XML , MediaType .APPLICATION_JSON })
49+ @ Consumes ({ MediaType .APPLICATION_XML , MediaType .APPLICATION_JSON , ApiContentTypes . APPLICATION_MIRTHAPI_JSON })
50+ @ Produces ({ MediaType .APPLICATION_XML , MediaType .APPLICATION_JSON , ApiContentTypes . APPLICATION_MIRTHAPI_JSON })
5051public interface AlertServletInterface extends BaseServletInterface {
5152
5253 @ POST
@@ -58,7 +59,8 @@ public void createAlert(
5859 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
5960 @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_xml" ) }),
6061 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
61- @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_json" ) }) }) AlertModel alertModel )
62+ @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_json" ) }),
63+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ) }) AlertModel alertModel )
6264 throws ClientException ;
6365
6466 @ GET
@@ -68,7 +70,8 @@ public void createAlert(
6870 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
6971 @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_xml" ) }),
7072 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
71- @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_json" ) }), })
73+ @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_json" ) }),
74+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
7275 @ MirthOperation (name = "getAlert" , display = "Get alerts" , permission = Permissions .ALERTS_VIEW )
7376 public AlertModel getAlert (
7477 @ Param ("alertId" ) @ Parameter (description = "The ID of the alert." , required = true ) @ PathParam ("alertId" ) String alertId )
@@ -81,7 +84,8 @@ public AlertModel getAlert(
8184 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
8285 @ ExampleObject (name = "alert_list" , ref = "../apiexamples/alert_list_xml" ) }),
8386 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
84- @ ExampleObject (name = "alert_list" , ref = "../apiexamples/alert_list_json" ) }), })
87+ @ ExampleObject (name = "alert_list" , ref = "../apiexamples/alert_list_json" ) }),
88+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
8589 @ MirthOperation (name = "getAlert" , display = "Get alerts" , permission = Permissions .ALERTS_VIEW )
8690 public List <AlertModel > getAlerts (
8791 @ Param ("alertIds" ) @ Parameter (description = "The ID of the alert(s). If absent, all alerts will be returned." ) @ QueryParam ("alertId" ) Set <String > alertIds )
@@ -94,14 +98,17 @@ public List<AlertModel> getAlerts(
9498 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
9599 @ ExampleObject (name = "alert_list" , ref = "../apiexamples/alert_list_xml" ) }),
96100 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
97- @ ExampleObject (name = "alert_list" , ref = "../apiexamples/alert_list_json" ) }) })
101+ @ ExampleObject (name = "alert_list" , ref = "../apiexamples/alert_list_json" ) }),
102+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
98103 @ MirthOperation (name = "getAlert" , display = "Get alerts" , permission = Permissions .ALERTS_VIEW )
99104 public List <AlertModel > getAlertsPost (
100105 @ Param ("alertIds" ) @ RequestBody (description = "The ID of the alert(s). If absent, all alerts will be returned." , content = {
101106 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
102107 @ ExampleObject (name = "alert_set" , ref = "../apiexamples/guid_set_xml" ) }),
103108 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
104- @ ExampleObject (name = "alert_set" , ref = "../apiexamples/guid_set_json" ) }) }) Set <String > alertIds )
109+ @ ExampleObject (name = "alert_set" , ref = "../apiexamples/guid_set_json" ) }),
110+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
111+ Set <String > alertIds )
105112 throws ClientException ;
106113
107114 @ GET
@@ -111,7 +118,8 @@ public List<AlertModel> getAlertsPost(
111118 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
112119 @ ExampleObject (name = "alert_status_list" , ref = "../apiexamples/alert_status_list_xml" ) }),
113120 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
114- @ ExampleObject (name = "alert_status_list" , ref = "../apiexamples/alert_status_list_json" ) }) })
121+ @ ExampleObject (name = "alert_status_list" , ref = "../apiexamples/alert_status_list_json" ) }),
122+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
115123 @ MirthOperation (name = "getAlertStatusList" , display = "Get alert status list" , permission = Permissions .ALERTS_VIEW , type = ExecuteType .ASYNC , auditable = false )
116124 public List <AlertStatus > getAlertStatusList () throws ClientException ;
117125
@@ -122,15 +130,18 @@ public List<AlertModel> getAlertsPost(
122130 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
123131 @ ExampleObject (name = "alert_info" , ref = "../apiexamples/alert_info_xml" ) }),
124132 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
125- @ ExampleObject (name = "alert_info" , ref = "../apiexamples/alert_info_json" ) }) })
133+ @ ExampleObject (name = "alert_info" , ref = "../apiexamples/alert_info_json" ) }),
134+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
126135 @ MirthOperation (name = "getAlertInfo" , display = "Get alert info" , permission = Permissions .ALERTS_VIEW , auditable = false )
127136 public AlertInfo getAlertInfo (// @formatter:off
128137 @ Param ("alertId" ) @ Parameter (description = "The ID of the alert." , required = true ) @ PathParam ("alertId" ) String alertId ,
129138 @ Param ("cachedChannels" ) @ RequestBody (description = "A map of ChannelHeader objects telling the server the state of the client-side channel cache." , required = true , content = {
130139 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
131140 @ ExampleObject (name = "channel_header_map" , ref = "../apiexamples/channel_header_map_xml" ) }),
132141 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
133- @ ExampleObject (name = "channel_header_map" , ref = "../apiexamples/channel_header_map_json" ) }) }) Map <String , ChannelHeader > cachedChannels )
142+ @ ExampleObject (name = "channel_header_map" , ref = "../apiexamples/channel_header_map_json" ) }),
143+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
144+ Map <String , ChannelHeader > cachedChannels )
134145 throws ClientException ;
135146 // @formatter:on
136147
@@ -141,23 +152,28 @@ public AlertInfo getAlertInfo(// @formatter:off
141152 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
142153 @ ExampleObject (name = "alert_info" , ref = "../apiexamples/alert_info_xml" ) }),
143154 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
144- @ ExampleObject (name = "alert_info" , ref = "../apiexamples/alert_info_json" ) }) })
155+ @ ExampleObject (name = "alert_info" , ref = "../apiexamples/alert_info_json" ) }),
156+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
145157 @ MirthOperation (name = "getAlertInfo" , display = "Get alert info" , permission = Permissions .ALERTS_VIEW )
146158 public AlertInfo getAlertInfo (
147159 @ Param ("cachedChannels" ) @ RequestBody (description = "A map of ChannelHeader objects telling the server the state of the client-side channel cache." , required = true , content = {
148160 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
149161 @ ExampleObject (name = "channel_header_map" , ref = "../apiexamples/channel_header_map_xml" ) }),
150162 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
151- @ ExampleObject (name = "channel_header_map" , ref = "../apiexamples/channel_header_map_json" ) }) }) Map <String , ChannelHeader > cachedChannels )
163+ @ ExampleObject (name = "channel_header_map" , ref = "../apiexamples/channel_header_map_json" ) }),
164+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
165+ Map <String , ChannelHeader > cachedChannels )
152166 throws ClientException ;
153167
154168 @ GET
155169 @ Path ("/options" )
156170 @ Operation (summary = "Returns all alert protocol options." )
157- @ ApiResponse (content = { @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
158- @ ExampleObject (name = "alert_protocol_options" , ref = "../apiexamples/alert_protocol_options_xml" ) }),
171+ @ ApiResponse (content = {
172+ @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
173+ @ ExampleObject (name = "alert_protocol_options" , ref = "../apiexamples/alert_protocol_options_xml" ) }),
159174 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
160- @ ExampleObject (name = "alert_protocol_options" , ref = "../apiexamples/alert_protocol_options_json" ) }) })
175+ @ ExampleObject (name = "alert_protocol_options" , ref = "../apiexamples/alert_protocol_options_json" ) }),
176+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
161177 @ MirthOperation (name = "getAlertProtocolOptions" , display = "Get alert protocol options" , permission = Permissions .ALERTS_VIEW , auditable = false )
162178 public Map <String , Map <String , String >> getAlertProtocolOptions () throws ClientException ;
163179
@@ -171,7 +187,9 @@ public void updateAlert(// @formatter:off
171187 @ Content (mediaType = MediaType .APPLICATION_XML , examples = {
172188 @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_xml" ) }),
173189 @ Content (mediaType = MediaType .APPLICATION_JSON , examples = {
174- @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_json" ) }) }) AlertModel alertModel )
190+ @ ExampleObject (name = "alert" , ref = "../apiexamples/alert_json" ) }),
191+ @ Content (mediaType = ApiContentTypes .APPLICATION_MIRTHAPI_JSON ), })
192+ AlertModel alertModel )
175193 throws ClientException ;
176194 // @formatter:on
177195
0 commit comments