LOM2M  0.8.0
Static Public Member Functions | List of all members
ACPMapper Class Reference

#include <JsonMapper.h>

Static Public Member Functions

static int mapAttributes (JsonObject jsonObj, AccessControlPolicy *acp, int level=0, bool restCreation=false, bool mapAll=false)
 
static AccessControlPolicyparseResource (JsonObject o, const String &name, Entity *entityToFill=nullptr)
 

Detailed Description

Provide specific mapping and parsing methods dedicated to ACP resource

Member Function Documentation

◆ mapAttributes()

int ACPMapper::mapAttributes ( JsonObject  jsonObj,
AccessControlPolicy acp,
int  level = 0,
bool  restCreation = false,
bool  mapAll = false 
)
static

Map specific attributes of ACP resource

Parameters
jsonObjroot of the json object used to map the resource
eentity to map to a json object
levelof depth of mapping (in case of mapping with children resources)
restCreationboolean used to avoid serializing non permitted attributes (useful for REST creation of resource)
mapAllinternal parameter used for full serialization of all entities
Returns
int different from 0 if an error occurs

◆ parseResource()

AccessControlPolicy * ACPMapper::parseResource ( JsonObject  o,
const String &  name,
Entity entityToFill = nullptr 
)
static

Parse ACP resource (will map json object to an ACP entity)

Parameters
jsonObjroot of the json object used to map the resource
nameof the entity (to be handled externaly)
Returns
the created entity

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