'
Show / Hide Table of Contents

Class EmergencyMessageController

The Emergency Message Controller is a controller that allows data to be retrieved and updated within the Ayuda Platform.

Namespace: Ayuda.BMS.Splash.Areas.Pi.Controllers
Remarks

This web service can be accessed using an address similar to the following: https://[AYUDA DEPLOYMENT URL]/Juice/Pi/EmergencyMessage

Methods

AddFace(EmergencyMessageFaceModel)

Adds a digital face to the specified emergency message.

Declaration
public JsonResult AddFace(EmergencyMessageFaceModel model)
Parameters
Type Name Description
Ayuda.BMS.Splash.Shared.Models.EmergencyMessageFaceModel model

The model of the bundle design association to create.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded string containing the id of the newly created association.

AddFaces(EmergencyMessageFacesModel)

Adds multiple digital faces to a specified emergency message.

Declaration
public JsonResult AddFaces(EmergencyMessageFacesModel model)
Parameters
Type Name Description
EmergencyMessageFacesModel model

The model of the Emergency Message Faces.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded string containing the ids of the newly created association.

Create(EmergencyMessageModel)

Creates a new EmergencyMessage.

Declaration
public JsonResult Create(EmergencyMessageModel model)
Parameters
Type Name Description
EmergencyMessageModel model

The model of the EmergencyMessage to create.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded string containing the id of the newly created emergency message.

Delete(Guid)

Delete an emergency message.

Declaration
public JsonResult Delete(Guid id)
Parameters
Type Name Description
System.Guid id

The id of the emergency message to delete.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the delete succeeded, else false.

Get(Guid)

Gets all properties of a emergency message.

Declaration
public JsonResult Get(Guid id)
Parameters
Type Name Description
System.Guid id

ID of the emergency message.

Returns
Type Description
System.Web.Mvc.JsonResult

Model of the emergency message corresponding to the emergency message ID.

RemoveFace(Guid)

Removes a digital face from the emergency message.

Declaration
public JsonResult RemoveFace(Guid id)
Parameters
Type Name Description
System.Guid id

ID of the emergency message face which is the link between the emergency message and face.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the face successfully removed, else false.

Stop(Guid)

Stops an EmergencyMessage.

Declaration
public JsonResult Stop(Guid id)
Parameters
Type Name Description
System.Guid id

ID of the emergency message which needs to be stopped.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the operation was succeeded, else false.

Update(Guid, String, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, Nullable<DateTime>, Nullable<Single>)

Updates the emergency message with the specified parameters.

Declaration
public JsonResult Update(Guid id, string code, string name, bool? IsOverridingLoop, bool? IsAppendingLoop, DateTime? OverrideLoopStartDateTimeUTC, DateTime? OverrideLoopEndDateTimeUTC, DateTime? AppendLoopStartDateTimeUTC, DateTime? AppendLoopEndDateTimeUTC, float? Saturation)
Parameters
Type Name Description
System.Guid id

The id of the emergency message to be updated.

System.String code

The code of the emergency message (Optional).

System.String name

The name of the emergency message (Optional).

System.Nullable<System.Boolean> IsOverridingLoop

Boolean: If the emergency message should override a loop (Optional).

System.Nullable<System.Boolean> IsAppendingLoop

Boolean: If the emergency message should be appended to a loop (Optional).

System.Nullable<System.DateTime> OverrideLoopStartDateTimeUTC

Starting date-time of overriding a loop (Optional).

System.Nullable<System.DateTime> OverrideLoopEndDateTimeUTC

Ending date-time of overriding a loop (Optional).

System.Nullable<System.DateTime> AppendLoopStartDateTimeUTC

Starting date-time of appending to a loop (Optional).

System.Nullable<System.DateTime> AppendLoopEndDateTimeUTC

Ending date-time of appending to a loop (Optional).

System.Nullable<System.Single> Saturation

Number of times that EM is played each loop, if under saturated, value must be 1/n (Optional)

Returns
Type Description
System.Web.Mvc.JsonResult

true if the update was successful.

UpdateBundle(Guid, Guid)

Updates the bundle in an emergency message

Declaration
public JsonResult UpdateBundle(Guid id, Guid bundleID)
Parameters
Type Name Description
System.Guid id

The id of the emergency message to update.

System.Guid bundleID

The id of the bundle to associate with emergency message.

Returns
Type Description
System.Web.Mvc.JsonResult

A Json encoded boolean. true if the update succeeded, else false.

Back to top Generated by DocFX