Leosac  0.8.0
Open Source Access Control
Leosac::Module::WebSockAPI::AccessPointSearch Class Reference

Search access point by alias. More...

#include <AccessPointSearch.hpp>

+ Inheritance diagram for Leosac::Module::WebSockAPI::AccessPointSearch:
+ Collaboration diagram for Leosac::Module::WebSockAPI::AccessPointSearch:

Public Member Functions

 AccessPointSearch (RequestContext ctx)
 
- Public Member Functions inherited from Leosac::Module::WebSockAPI::MethodHandler
 MethodHandler (RequestContext ctx)
 
virtual ~MethodHandler ()=default
 
json process (const ClientMessage &msg)
 The public process() method. More...
 
UserSecurityContextsecurity_context ()
 
ExecutionContext exec_context ()
 Returns a representation of the execution context of this request. More...
 

Static Public Member Functions

static MethodHandlerUPtr create (RequestContext)
 
- Static Public Member Functions inherited from Leosac::Module::WebSockAPI::MethodHandler
static MethodHandlerUPtr create (RequestContext)
 An example method that should be implemented in all subclasses. More...
 

Protected Member Functions

std::vector< ActionActionParamrequired_permission (const json &req) const override
 Return a list of "Action" / "ActionParam" that must pass before the request is processed. More...
 

Private Member Functions

virtual json process_impl (const json &req) override
 The API method implementation. More...
 

Additional Inherited Members

- Public Types inherited from Leosac::Module::WebSockAPI::MethodHandler
using Factory = MethodHandlerUPtr(*)(RequestContext)
 
- Protected Attributes inherited from Leosac::Module::WebSockAPI::MethodHandler
RequestContext ctx_
 

Detailed Description

Search access point by alias.

This API call is useful to provide type-ahead/autocomplete feature in the client.

The search is case insensitive.

Request:

  • 'partial_name': A part of the name we are looking for.

Response: A list of {id,alias} for doors that match the partial name. [ {id: $AP_ID, alias: $AP_ALIAS}, {...} ]

Definition at line 52 of file AccessPointSearch.hpp.

Constructor & Destructor Documentation

◆ AccessPointSearch()

AccessPointSearch::AccessPointSearch ( RequestContext  ctx)

Definition at line 32 of file AccessPointSearch.cpp.

Member Function Documentation

◆ create()

MethodHandlerUPtr AccessPointSearch::create ( RequestContext  ctx)
static

Definition at line 37 of file AccessPointSearch.cpp.

◆ process_impl()

json AccessPointSearch::process_impl ( const json req)
overrideprivatevirtual

The API method implementation.

Returns
A json object that will be assigned to the content key in the JSON message sent to the client.

Implements Leosac::Module::WebSockAPI::MethodHandler.

Definition at line 52 of file AccessPointSearch.cpp.

◆ required_permission()

std::vector< ActionActionParam > AccessPointSearch::required_permission ( const json req) const
overrideprotectedvirtual

Return a list of "Action" / "ActionParam" that must pass before the request is processed.

Implements Leosac::Module::WebSockAPI::MethodHandler.

Definition at line 92 of file AccessPointSearch.cpp.


The documentation for this class was generated from the following files: