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

CRUD Handler for Zones. More...

#include <ZoneCRUD.hpp>

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

Static Public Member Functions

static CRUDResourceHandlerUPtr instanciate (RequestContext)
 
- Static Public Member Functions inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
static CRUDResourceHandlerUPtr instanciate (RequestContext)
 

Private Member Functions

 ZoneCRUD (RequestContext ctx)
 
virtual std::vector< ActionActionParamrequired_permission (Verb verb, const json &req) const override
 
virtual boost::optional< jsoncreate_impl (const json &req) override
 
virtual boost::optional< jsonread_impl (const json &req) override
 
virtual boost::optional< jsonupdate_impl (const json &req) override
 
virtual boost::optional< jsondelete_impl (const json &req) override
 

Additional Inherited Members

- Public Types inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
using Factory = CRUDResourceHandlerUPtr(*)(RequestContext)
 
- Public Types inherited from Leosac::Module::WebSockAPI::ICRUDResourceHandler
enum  Verb { Verb::CREATE, Verb::READ, Verb::UPDATE, Verb::DELETE }
 
- Public Member Functions inherited from Leosac::Module::WebSockAPI::ICRUDResourceHandler
boost::optional< jsonprocess (const ClientMessage &msg)
 
- Protected Types inherited from Leosac::Module::WebSockAPI::ICRUDResourceHandler
using ActionActionParam = std::pair< SecurityContext::Action, SecurityContext::ActionParam >
 A pair of Action and a generic ActionParam union. More...
 
- Protected Member Functions inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
 CRUDResourceHandler (RequestContext ctx)
 
virtual UserSecurityContextsecurity_context () const override
 Helper function that returns the security context. More...
 
- Protected Attributes inherited from Leosac::Module::WebSockAPI::CRUDResourceHandler
RequestContext ctx_
 

Detailed Description

CRUD Handler for Zones.

See also
See the *_impl() method for each requests parameters/response.

Definition at line 36 of file ZoneCRUD.hpp.

Constructor & Destructor Documentation

◆ ZoneCRUD()

ZoneCRUD::ZoneCRUD ( RequestContext  ctx)
private

Definition at line 34 of file ZoneCRUD.cpp.

Member Function Documentation

◆ create_impl()

boost::optional< json > ZoneCRUD::create_impl ( const json req)
overrideprivatevirtual

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 45 of file ZoneCRUD.cpp.

◆ delete_impl()

boost::optional< json > ZoneCRUD::delete_impl ( const json req)
overrideprivatevirtual

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 130 of file ZoneCRUD.cpp.

◆ instanciate()

CRUDResourceHandlerUPtr ZoneCRUD::instanciate ( RequestContext  ctx)
static

Definition at line 39 of file ZoneCRUD.cpp.

◆ read_impl()

boost::optional< json > ZoneCRUD::read_impl ( const json req)
overrideprivatevirtual

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 68 of file ZoneCRUD.cpp.

◆ required_permission()

std::vector< CRUDResourceHandler::ActionActionParam > ZoneCRUD::required_permission ( CRUDResourceHandler::Verb  verb,
const json req 
) const
overrideprivatevirtual

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 152 of file ZoneCRUD.cpp.

◆ update_impl()

boost::optional< json > ZoneCRUD::update_impl ( const json req)
overrideprivatevirtual

Implements Leosac::Module::WebSockAPI::ICRUDResourceHandler.

Definition at line 104 of file ZoneCRUD.cpp.


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