Table of Contents

Class DisplayController

Namespace
adas_core.Controllers
Assembly
adas-core.dll
[Route("displays")]
[ApiController]
public class DisplayController : ControllerBase
Inheritance
DisplayController
Inherited Members
Extension Methods

Constructors

DisplayController(IDisplayService, IDisplayConfigService)

public DisplayController(IDisplayService displayService, IDisplayConfigService displayConfigService)

Parameters

displayService IDisplayService
displayConfigService IDisplayConfigService

Methods

CreateDisplay(Display)

Insert display

[HttpPost]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
public Task<IActionResult> CreateDisplay(Display display)

Parameters

display Display

Returns

Task<IActionResult>

display

DefaultConfig(string, DisplayType)

Retrieves the default display configuration for a given identifier and display type, after validating the identifier format.

[HttpGet("{id}/unitId/{type}/type")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> DefaultConfig(string id, DisplayConfigEnums.DisplayType type)

Parameters

id string

The string representation of the object identifier to look up; must be a valid ObjectId.

type DisplayConfigEnums.DisplayType

The display type used to filter the configuration lookup.

Returns

Task<IActionResult>

An IActionResult containing the display configuration retrieved for the supplied identifier and type.

Exceptions

BadRequestException

Thrown when id is not a valid ObjectId format.

DeleteDisplay(string)

Delete display

[HttpDelete("{id}")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
public Task<IActionResult> DeleteDisplay(string id)

Parameters

id string

Returns

Task<IActionResult>

display

GetAllMinimalListByType()

Get By type all minimal display list on a DTO

[HttpGet("{type}/compact")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetAllMinimalListByType()

Returns

Task<IActionResult>

List

GetById(string, string)

Get display by object id

[HttpGet("{localeEnum}/{id}")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetById(string id, string localeEnum)

Parameters

id string
localeEnum string

Returns

Task<IActionResult>

display

GetByIdWithNoPermissions(string)

Retrieves a display entity by its identifier, intended for administrative panel access without enforcing user-level permissions.

[HttpGet("{id}/adm-panel")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetByIdWithNoPermissions(string id)

Parameters

id string

The string representation of the display's unique identifier.

Returns

Task<IActionResult>

An IActionResult containing the requested display entity.

Exceptions

BadRequestException

Thrown when the provided id is not a valid ObjectId format.

GetPaginatedDisplays(PaginationFilter)

Retrieves a paginated list of displays based on the provided pagination filter, after enforcing role-based and resource-level authorization.

[HttpPost("paginated")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetPaginatedDisplays(PaginationFilter request)

Parameters

request PaginationFilter

The pagination filter containing paging criteria sent in the request body.

Returns

Task<IActionResult>

An IActionResult containing the paginated displays wrapped in an HTTP 200 OK response.

Exceptions

BadRequestException

Thrown when the request payload is null, indicating missing required parameters.

GetPocAvailablebyDisplayId(List<string>)

Retrieves the list of available points of contact (POC) associated with the specified display identifiers.

[HttpPost("poc-available")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetPocAvailablebyDisplayId(List<string> displayIds)

Parameters

displayIds List<string>

The collection of display identifiers used to look up the available points of contact.

Returns

Task<IActionResult>

An IActionResult containing the list of available points of contact matching the provided display identifiers.

GetPocByDisplayId(string)

Retrieves the list of POCs associated with the specified display identifier. Validates that the provided displayId is a valid ObjectId format; if not, a bad request exception is thrown.

[HttpGet("{displayId}/pocs")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> GetPocByDisplayId(string displayId)

Parameters

displayId string

The display identifier used to look up the associated POCs.

Returns

Task<IActionResult>

An IActionResult containing the POC list returned by the display service.

Exceptions

BadRequestException

Thrown when displayId is not a valid ObjectId format.

List()

Get all display list

[HttpGet]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
public Task<IActionResult> List()

Returns

Task<IActionResult>

List

ListByPointOfCare(string)

Get display by name

[HttpGet("{name}/name")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> ListByPointOfCare(string name)

Parameters

name string

Returns

Task<IActionResult>

display

ListByPointOfCare(PointOfCare)

Get all display list by pointOfCare

[HttpPost("poc")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> ListByPointOfCare(PointOfCare pointOfCare)

Parameters

pointOfCare PointOfCare

Returns

Task<IActionResult>

List

ListByType(DisplayType)

Get By type all display list

[HttpGet("{type}/type")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> ListByType(DisplayConfigEnums.DisplayType type)

Parameters

type DisplayConfigEnums.DisplayType

Returns

Task<IActionResult>

List

ListCompact()

Retrieves a compact list of all displays, requiring the caller to be authenticated with the AuthSome role and to have the "Source" / "DisplayId" permission.

[HttpGet("compact")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> ListCompact()

Returns

Task<IActionResult>

An IActionResult containing the HTTP 200 response with the compact display list returned by the display service.

ListInfoId(string, bool?, bool?)

Get display info by it object id and fill options

[HttpGet("{id}/info")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> ListInfoId(string id, bool? fillPointOfCare, bool? fillDisplayList)

Parameters

id string
fillPointOfCare bool?
fillDisplayList bool?

Returns

Task<IActionResult>

display

ListUnitById(string)

Get display list by it unit object id

[HttpGet("{id}/unitId")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
[PermissionAuthorize("Source", "DisplayId")]
public Task<IActionResult> ListUnitById(string id)

Parameters

id string

Returns

Task<IActionResult>

List

UpdateConfig(string, string)

Update display config id and notify subscribers

[HttpPut("{idDisplay}/config-preset/{idConfig}")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
public Task<IActionResult> UpdateConfig(string idDisplay, string idConfig)

Parameters

idDisplay string
idConfig string

Returns

Task<IActionResult>

display

UpdateDisplayName(string, string)

Update display name

[HttpPut("{id}/{name}")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
public Task<IActionResult> UpdateDisplayName(string id, string name)

Parameters

id string
name string

Returns

Task<IActionResult>

display

UpdatePointOfCares(string, List<string>)

Update display PointOfCare id and notify subscribers

[HttpPut("{id}/pocs-ids")]
[AuthorizeRoles(PermissionEnum.RolesType.AuthSome)]
public Task<IActionResult> UpdatePointOfCares(string id, List<string> pointOfCareIdList)

Parameters

id string
pointOfCareIdList List<string>

Returns

Task<IActionResult>

display